Page 1 of 2
psa-php5-configurator
Posted: Mon Apr 24, 2006 2:10 pm
by Troy McClure
After using your script to install CentOS 4.2 on my server, I upgraded php to 5.0.4 in your atomic-testing archive. I have a question though. It left psa-php4-configurator. After looking in the PSA files and your archives, I can't find a psa-php5-configurator for CentOS 4.2. Is it ok to leave this off?
Posted: Mon Apr 24, 2006 2:30 pm
by scott
Im not even sure what that is yet. Im guessing its something that comes with PSA 8?
Posted: Mon Apr 24, 2006 2:37 pm
by Troy McClure
Yeah, I think it only comes with 8. I don't remember seeing it in 7.5.4, but I could be wrong. Everything seems to work ok.
Posted: Mon Apr 24, 2006 2:56 pm
by Troy McClure
Well, I went back and installed the psa-php4-configurator rpm just to see what happened and this was the output.
Code: Select all
Preparing... ########################################### [100%]
1:psa-php4-configurator ########################################### [100%]
===> configuring php4 using /etc/php.ini file
Trying to set memory limit to 32M... done
Trying to add '.' to 'include_path'... Unable to find 'include_path' varibale in /etc/php.ini
Adding new entry
done
Trying to set 'short_open_tag' to On... done
Trying to set 'file_uploads' to On... done
Trying to set 'safe_mode' to On... done
Could this just run once to configure php? I didn't have to force this, it just ran.
Posted: Mon Apr 24, 2006 5:16 pm
by scott
Rough guess, they're using it as a Mule RPM (one that does something, but doesnt contain anything). Mules go in and reconfigure other packages, in this case my guess is that its modifying the php.ini file, and perhaps contains some triggers for PHP addons.
Posted: Mon May 01, 2006 7:03 am
by breun
I was thinking the same. I guess we're right:
Code: Select all
# rpm -qi psa-php4-configurator
...snip...
This is simple scritpt which configure php4 to make it work with Plesk
(Yes, Plesk is full of spelling errors.)
It's a mule alright:
Code: Select all
# rpm -ql psa-php4-configurator
(contains no files)
And yes, it's new with Plesk 8. To see the script (it's pretty lengthy, you might want to pipe it to
less):
Code: Select all
rpm -q --scripts psa-php4-configurator
It seems to do the following things with your PHP configuration:
- Set memory_limit to 32M
- Set the include path
- Set short_open_tag On
- Set file_uploads On
- Set safe_mode On
The script logs to /tmp/php4-configurator.log.
Next to that it has a whole lot of functions for services (ftp, smtp(s), poppassd, named). I have no idea what they are doing in a package called psa-php4-configurator...
Posted: Mon May 01, 2006 8:36 pm
by scott
Yeah thats a good choice on their part. The nice thing about a mule is you can do things like that to back out your changes. Ive thought about making some to do basic security duty on a box, or optimize it for more performance. In the future I'll see what I can do about taking advantage of this.
Posted: Thu Nov 30, 2006 12:19 pm
by thewolf
Hi,
After upgrading RHEL4 PHP 4 packages with the ART PHP 5 packages, do I need to re-run the scripts included in psa-php4-configurator package to have them work correctly with Plesk 8?
If so, how do I re-run them?
Thanks.
Posted: Thu Nov 30, 2006 2:05 pm
by scott
If they did it as a trigger as I suspect they did, then its going to run every time you update the php rpm. Look at the man page of rpm for the variables to extract the trigger information from the rpm. There will be a way for you to manually run the trigger as well, I think its --triggeronly or something similiar
Posted: Thu Nov 30, 2006 2:08 pm
by breun
I don't think you need re-run the configurator. At least I didn't and PHP 5 just works. I believe the configurator only edits /etc/php.ini to change settings like memory_limit and safe_mode to SWsoft's defaults.
Posted: Thu Nov 30, 2006 2:45 pm
by thewolf
scott wrote:If they did it as a trigger as I suspect they did, then its going to run every time you update the php rpm. Look at the man page of rpm for the variables to extract the trigger information from the rpm. There will be a way for you to manually run the trigger as well, I think its --triggeronly or something similiar
It looks like it's not a trigger (rpm -q --triggers psa-php4-configurator doesn't return anything), it's a script, you can look at it using using the following command:
rpm -q --scripts psa-php4-configurator
I've removed and reinstalled the psa-php4-configurator RPM to have it apply the Plesk changes to the new PHP 5 php.ini.
BTW, I had to install a fake php-domxml RPM to satisfy Plesk dependencies (e.g. when adding new components using the autoinstaller), since PHP 5 doesn't have that package anymore.
Is there a better way to handle that?
Thanks.
Posted: Thu Nov 30, 2006 7:23 pm
by scott
You shouldnt have to do that, the php-xml package has a Provides for php-domxml that should have picked that up automatically.
Posted: Fri Dec 01, 2006 5:12 am
by breun
My guess is that Troy missed the
PHP Project page which tells all about the things you need to do when upgrading using these PHP 5 packages.
Posted: Fri Dec 01, 2006 6:22 am
by thewolf
scott wrote:You shouldnt have to do that, the php-xml package has a Provides for php-domxml that should have picked that up automatically.
Hi,
I stand corrected, in the end I used the CentosPlus PHP 5 packages (since they are at version 5.1.6, newer than the atomica stable RPMs):
http://mirror.centos.org/centos/4/centosplus/i386/RPMS/
That's why I had to install the fake php-domxml package.
Thanks.
Posted: Fri Dec 01, 2006 7:00 am
by breun
The ART PHP packages have the advantage of being compatible with Plesk so you don't need to pull tricks like that.
