psa-php5-configurator

Support/Development for PHP
Troy McClure
Forum Regular
Forum Regular
Posts: 196
Joined: Tue May 10, 2005 1:24 pm

psa-php5-configurator

Unread post 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?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Im not even sure what that is yet. Im guessing its something that comes with PSA 8?
Troy McClure
Forum Regular
Forum Regular
Posts: 196
Joined: Tue May 10, 2005 1:24 pm

Unread post 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.
Troy McClure
Forum Regular
Forum Regular
Posts: 196
Joined: Tue May 10, 2005 1:24 pm

Unread post 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.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post 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.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post 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:
  1. Set memory_limit to 32M
  2. Set the include path
  3. Set short_open_tag On
  4. Set file_uploads On
  5. 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...
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post 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.
thewolf
Forum User
Forum User
Posts: 24
Joined: Tue Dec 21, 2004 7:53 am

Unread post 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.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post 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
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post 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.
Lemonbit Internet Dedicated Server Management
thewolf
Forum User
Forum User
Posts: 24
Joined: Tue Dec 21, 2004 7:53 am

Unread post 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.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post 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.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post 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.
Lemonbit Internet Dedicated Server Management
thewolf
Forum User
Forum User
Posts: 24
Joined: Tue Dec 21, 2004 7:53 am

Unread post 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.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

The ART PHP packages have the advantage of being compatible with Plesk so you don't need to pull tricks like that. :)
Lemonbit Internet Dedicated Server Management
Post Reply