1

I'm using CentOS 6.4 and I got Apache 2.2 and MySQL, but the PHP version is 5.5.1 which is a problem for me, because the application which we develop is working with php 5.3 and lower versions. I use this tutorial to install everything: http://www.if-not-true-then-false.com/2010/lamp-linux-apache-mysql-php-on-fedora-centos-red-hat-rhel/

Bust I can't find any answer in web to configure the server correctly to switch php version with cgi or fastcgi.

Can you help me?

  • How did you end up with PHP 5.5.1? – Michael Hampton Aug 1 '13 at 13:39
  • Running PHP via CGI is not a very good idea. And if it's apache pre-fork then I'd recommend mod_php over fastCGI – symcbean Aug 1 '13 at 15:58
  • @symcbean, just give me the steps and I'll try :) MichaelHampton, I just follow the steps. – user184004 Aug 2 '13 at 6:09
5

You should remove php with all its packages, disable repository from which you installed it (there is any for 5.5.1? wow) and install php package from CentOS base repository - there is 5.3.3.

  1. stop apache.
  2. yum remove php\*
  3. set enabled=0 in /etc/yum.repos.d/<php5.5.51-repository-file>
  4. yum install php (check if yum will catch correct version)
  5. edit /etc/php.ini as you need and start apache.
| improve this answer | |
  • Hi, this is alternative way. I need a way to switch versions fast. I don't need to install/config reinstall/reconfig and etc. – user184004 Aug 2 '13 at 6:14
  • This is as fast as it can be. php.ini will be saved after unistallation as php.ini.rpmsave so you can use it. I'm not sure if all config options are same for 5.5 and 5.3. – stderr Aug 2 '13 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy