Topic: php-5.4.7-10 and php_value

I've never been involved in how a repo is built and/or maintained and so I don't know who is responsible but I thought this would be a good place to start.

Between php-5.4.7-1 and php-5.4.7-10 a change to /etc/httpd/conf.d/php.conf was made.  It totally hosed our environment when it was installed.  We had installed the -1 version on our test environment and when we rolled out 5.4.7 to production, we didn't realize the -1 had changed to -10.

The change to the file was to add:
php_value session.save_path "/var/lib/php/session"

Why this would be put into an rpm base (apache) configuration file is beyond me but the net effect was that our session.save_handler = memcached had no idea what to do with session.save_path = "/var/lib/php/session"

Anyone know who or why this was done?  Was it an oversight perhaps?

Re: php-5.4.7-10 and php_value

First, sorry if this update breaks your configuration.

Remember that the remi repo goal is to provide the "latest", only the latest. And yes, some changes can have side effects, even if I try to minimize them (like the day I will decide to move php 5.4 from remi-test to remi, drop php-mysql or update MySQL to 5.6)

PHP configuration have a very old configuration issue.
This setting (to a directory owned by apache user) was very badly set in the system (all users) configuration file. So it have be moved to
- apache configuration file
- php-fpm pool configuration file (1 directory per pool)

So this solves problem raised by lighttpd, nginx and some other users.

In your case just add your correct value (or comment this php_value option)

I will probably add a comment on the memcache(d).ini file to point to the httpd configuration file.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-5.4.7-10 and php_value

I will probably add a comment on the memcache(d).ini file to point to the httpd configuration file.

Done in https://github.com/remicollet/remirepo/ … 587d436fcb

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-5.4.7-10 and php_value

Hey Remi, thanks for maintaining your repo's, they are invaluable.  I understand the dilemma. 

Wouldn't it make more sense to set the default session.save_path in the base php.ini file? Have installation of apache or nginx or lighthttpd, etc set the appropriate permissions of that directory to the user configured to run for the web software?

I can only see this setting of php_value in base configs as a bad things for most anyone that uses apache.  It took me quite some time to figure out why/how this value was being changed, had production downtime due to it. 

In reality it was an unfortunate confluence of events, we had already been running 5.4.7-1 on our test environment for a week or two, when I went to install 5.4.7 on production, I did not realize the -10 change or I would have put that in our test environment for a while before rolling it out.

At any rate, thanks again for doing what you do, myself and I'm sure hundreds of others are very thankful for your work!

Re: php-5.4.7-10 and php_value

cpriest wrote:

Wouldn't it make more sense to set the default session.save_path in the base php.ini file?

No, as explained.

cpriest wrote:

Have installation of apache or nginx or lighthttpd, etc set the appropriate permissions of that directory to the user configured to run for the web software?

It doesn't work, because permissions are reset on each php update.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-5.4.7-10 and php_value

I have a feeling you're going to find that a lot more people are going to have their environments broken...  The difficulty there is that setting it in the apache config over-rides any php.d settings that they may have installed.  The apache php_value takes precedence over php.d/* or php.ini settings.