Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a major problem.. I've been asked to manage a web application that's from a dinosaur era.. I think they used 5.2 or lesser. Tried to run their application in my setup which i am using PHP 5.3. Too many deprecated errors. So now I'm in a tight situation to uninstall my lamp to run this application.

Few questions:

  1. If I set up two versions of PHP, will my other applications still run smoothly?
  2. Is having two versions of PHP a good idea? I'm pretty sure it will have some flaws.
  3. If I indeed install different versions of PHP will it be compatible with my Apache and MySQL, or will I need to install other software as well?
  4. How do I set this all up?

Hope anyone can help me here...

share|improve this question

migrated from Nov 12 '11 at 14:40

This question came from our site for professional and enthusiast programmers.

PHP 5.2 is the dinosaur era? – animuson Nov 11 '11 at 2:36
actually what I meants was the system is using codeigniter mvc version 1.7.0 which now its in 2.0.3. For more info the application is using php 5.2.10 but I'm using 5.3. I guess my last resort is using cgi but don't know how to set that up. – Dean Nov 11 '11 at 7:55
The only way I know is effectively to run PHP in cgi and/org fastcgi mode. Some distribution may facilitate the job (gentoo maybe?). You shoudl ask for such support on servfault instead of stack overflow. – regilero Nov 11 '11 at 13:12

PHP 5.2, is a pretty decent version of PHP. Anyway, if you need to upgrade, why don't you just turn off the deprecation warnings? They shouldn't be on in production anyway, they are useful only for your development.

Find the error_reporting line in your php.ini and change as:

error_reporting  = E_ALL & ~E_DEPRECATED & ~E_NOTICE;

Or at runtime:

error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);

If you really want to install two versions of PHP, which I don't recommend you, you can bind them to different extensions. You can run only one version as module, while other versions can run as CGI.

share|improve this answer
tried that., but it didn't ignore those errors. set_magic_quotes_runtime() is deprecated others are &=. Tried changing the codes php 5.3 will accept and it fix those errors but still can't run the application. T_T. – Dean Nov 11 '11 at 7:50

Only one version of the PHP module can be loaded into Apache at a time. You'll have to pick which one that is.

share|improve this answer
What you say is true, but you can run more than one PHP version if only one runs as module and others run as CGI. I won't recommend it, though. – stivlo Nov 11 '11 at 4:09

Your Answer


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.