Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  T0m3kk Aug 2 '13 at 6:09

1 Answer 1

up vote 3 down vote accepted

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.
share|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. –  T0m3kk 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
    
Now I use 5.3.3 :) Thanks :) –  T0m3kk Aug 2 '13 at 8:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.