Upgrading PHP crashing PHP

so if I upgrade a site to php 5.4.45 from 5.3.3 php just doesn't work

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



Howdy -- what process did you use to upgrade PHP?

It's just available to me as an option under the virtual site and php versions

CentOS only comes with one PHP version though... the process of installing or upgrading PHP could cause the problems you're describing.

Can you describe the process used to install this new PHP version? In particular, what repository did it come from?

I didn't install anything.

This is where I tried to do it.

PHP 5.4 doesn't come with CentOS 6 though... someone would have had to install it.

If you didn't install PHP 5.4, someone else would have had to.

What is the output of this command:

rpm -qa | grep php

[root@vm1 ~]# rpm -qa | grep php php-imap-5.3.3-46.el6_6.i686 php-xmlrpc-5.3.3-46.el6_6.i686 atomic-php54-php-pdo-5.4.45-51.el6.art.i686 atomic-php54-php-gd-5.4.45-51.el6.art.i686 atomic-php54-php-mcrypt-5.4.45-51.el6.art.i686 atomic-php54-php-pspell-5.4.45-51.el6.art.i686 atomic-php54-php-recode-5.4.45-51.el6.art.i686 atomic-php54-php-process-5.4.45-51.el6.art.i686 php-common-5.3.3-46.el6_6.i686 atomic-php54-php-common-5.4.45-51.el6.art.i686 atomic-php54-php-mysqlnd-5.4.45-51.el6.art.i686 atomic-php54-php-bcmath-5.4.45-51.el6.art.i686 atomic-php54-php-enchant-5.4.45-51.el6.art.i686 atomic-php54-php-tidy-5.4.45-51.el6.art.i686 atomic-php54-php-soap-5.4.45-51.el6.art.i686 atomic-php54-php-embedded-5.4.45-51.el6.art.i686 atomic-php54-php-xml-5.4.45-51.el6.art.i686 atomic-php54-php-imap-5.4.45-51.el6.art.i686 atomic-php54-php-intl-5.4.45-51.el6.art.i686 atomic-php54-php-cli-5.4.45-51.el6.art.i686 wbm-php-pear-1.5-1.noarch ohiointernet-php54-release-1.0.1-1.noarch php-gd-5.3.3-46.el6_6.i686 php-mysql-5.3.3-46.el6_6.i686 php-pspell-5.3.3-46.el6_6.i686 php-xml-5.3.3-46.el6_6.i686 php-mbstring-5.3.3-46.el6_6.i686 php-pdo-5.3.3-46.el6_6.i686 php-5.3.3-46.el6_6.i686 php-odbc-5.3.3-46.el6_6.i686 php-intl-5.3.3-46.el6_6.i686 atomic-php54-php-ldap-5.4.45-51.el6.art.i686 atomic-php54-php-xmlrpc-5.4.45-51.el6.art.i686 atomic-php54-php-mbstring-5.4.45-51.el6.art.i686 atomic-php54-php-fpm-5.4.45-51.el6.art.i686 atomic-php54-php-dba-5.4.45-51.el6.art.i686 php-mcrypt-5.3.3-4.el6.i686 php-pear-1.9.4-4.el6.noarch php-cli-5.3.3-46.el6_6.i686

Okay, it looks like some third party repositories were enabled on your server. PHP 5.4 was installed from those third party repositories.

Packages from third party repositories can cause a variety of problems, including with PHP.

It's difficult to say what the exact problem is in this case, as we're not familiar with that repository. Though you could always look at the Apache error logs in $HOME/logs/error_log to see what error(s) show up in there.

However, we recommend against using third party repositories due to the number of unusual problems they can cause.

If you wish to be able to use PHP 5.4, the instructions here are our recommended way of doing that:


The above instructions make use of the CentOS SCL repository, which is a supported way of installing newer PHP versions on CentOS.

Unfortunately, the CentOS SCL repository only provides packages for 64 bit distributions... it looks like you may be using 32 bit there. Do you happen to have a 64 bit server you could do that on?

that was done by a previous user, how do I revert it back to normal

It's an openvz server running under cloudmin

You could use RPM, or Webmin's package manager, to remove packages you no longer need.

You could always use one of those to remove the PHP packages from the Atomic repository.

However, if you only have 32 bit CentOS, you wouldn't be able to use the PHP packages from the SCL repository, since those only support 64 bit CentOS.

Unfortunately, that means there isn't a supported way to get PHP 5.4 on CentOS 6, if your server is 32 bit.

How do I make sure my openvz i create is 64bit?

If you're using Cloudmin there, the architecture of the image should be included in the image name.

If you're not seeing that, let us know what image name you're looking at and we'll look deeper into that, as we'd definitely want them to be labeled correctly so people know what they're installing.

Jamie, do we have CentOS 7 OpenVZ images for Cloudmin? I didn't see any in the list provided by starr.

Also, what architecture are the CentOS 6 OpenVZ images?

We only have x86 centos 6 images.

OK, so what is the best solution to get a virtulmin vm at 64bit?

You could create a new empty OpenVZ instance on a 64-bit host and install CentOS 7 into it, then create an image from that VM.

is that proceedure documented somewhere?

Sure, I linked to that in Comment #17 above :-)

Note though that as Jamie mentions, the host itself would need to be 64 bit.

This is my host machine.

[root@prox1 ~]# uname -m x86_64 [root@prox1 ~]# getconf LONG_BIT 64 [root@prox1 ~]#

Login as root and go to Cloudmin Settings -> New System Images. Click Create image for Xen (or whatever virtualization type you are using).

I don't have the option for "Create image"

Sorry, the docs are out of date - you should go to Cloudmin Settings -> Import System Image.

I did that, I cant find where you actually create it from the image

So you managed to import an image, but now you want to create a system from it? This can be done on the Create System -> Create OpenVZ Instance page.