PHP update failed!

Support/Development for PHP
DarkF@der
Forum Regular
Forum Regular
Posts: 313
Joined: Thu May 07, 2009 12:46 pm

PHP update failed!

Unread post by DarkF@der »

Hello,

On the test machine we failed to update php to 5.3.26-19.el5.art

Code: Select all

[root@xxxxxxx /]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: Syntax error on line 31 of /etc/httpd/conf.d/php.conf:
Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
                                                           [FAILED]
there are some new lines added to /etc/httpd/conf.d/php.conf

Code: Select all

#
# Apache specific PHP configuration options
# those can be override in each configured vhost
#
php_value session.save_handler "files"
php_value session.save_path    "/var/lib/php/session"
It failed on that.
Any fix for this?

Greetz
mr_coko
New Forum User
New Forum User
Posts: 3
Joined: Wed Jun 12, 2013 7:42 pm
Location: Roosendaal, NL

Re: PHP update failed!

Unread post by mr_coko »

Yes, the problem is that the Atomic RPM places a broken /etc/httpd/conf.d/php.conf.

Simply add the following lines in the top of that file:

<IfModule prefork.c>
LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
LoadModule php5_module modules/libphp5-zts.so
</IfModule>

and restart Apache.
diego
Forum Regular
Forum Regular
Posts: 111
Joined: Tue Aug 05, 2008 5:01 pm

Re: PHP update failed!

Unread post by diego »

Same here, the same error!

Anyone has a fix?
Dree
New Forum User
New Forum User
Posts: 2
Joined: Sat Jan 13, 2007 9:03 am

Re: PHP update failed!

Unread post by Dree »

The update broke all our servers as well.

Add this at the top of /etc/httpd/conf.d/php.conf

<IfModule prefork.c>
LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
LoadModule php5_module modules/libphp5-zts.so
</IfModule>
diego
Forum Regular
Forum Regular
Posts: 111
Joined: Tue Aug 05, 2008 5:01 pm

Re: PHP update failed!

Unread post by diego »

Thank you Dree it works good, apache server its up and running!
itsmagic
New Forum User
New Forum User
Posts: 3
Joined: Sun Jun 16, 2013 7:21 am
Location: United Kingdom

Re: PHP update failed!

Unread post by itsmagic »

Those lines of code got my apache live again and my regular html sites display now. However, all my Joomla sites still do not and just display various php code when trying to access them.

Does anyone have a "fuller" fix for this issue?

Apparently it all centres on the php.conf file being incorrect and overwritten as far as I can ascertain but I don't have an old one to roll back to as the update was automatic and overwrote my original file :-(
diego
Forum Regular
Forum Regular
Posts: 111
Joined: Tue Aug 05, 2008 5:01 pm

Re: PHP update failed!

Unread post by diego »

If you use Plesk, change the way that the domains handle the php, in my server running apache as CGI Application didn't worked send errors, i switched to Apache Module, or FastCGI Application and the sites worked again.
itsmagic
New Forum User
New Forum User
Posts: 3
Joined: Sun Jun 16, 2013 7:21 am
Location: United Kingdom

Re: PHP update failed!

Unread post by itsmagic »

I don't use Plesk but a program called Virtualmin. Do you know where to look inorder to change the mode in that program by any chance?
Post Reply