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 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 stackoverflow.com 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
add comment

2 Answers 2

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
add comment

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
add comment

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.