My friend has allowed me to have access to his server, he has been coding PHP a lot longer than me and still uses php version 4.3.9 and doesn't want to upgrade this current version. Is there anyway for me to install php version 5.2 and use that while he still runs 4.3.9? I require some functions which are only available in 5.2. The server runs on redhat.
Asked
Active
Viewed 837 times
1
-
PHP 4 is really not safe anymore, I'd recommend trying really hard to convince your friend to upgrade ;-) – David Z Feb 24 '09 at 03:09
-
thanks david, any good reasons i could use to persuade him? – Ben McRae Feb 24 '09 at 03:23
-
Pretty sure PHP 4 met it's end-of-life at least a year ago ;) PHP 5 has much better OOP, a couple of tricks (__autoload and the rest of SPL), better libraries (e.g. MySQLi) and hell, upgrade just for security's sake. – Ross Feb 25 '09 at 18:53
-
its all done now :) thanks again! – Ben McRae Mar 01 '09 at 14:28
-
Here is a [similar question](http://stackoverflow.com/questions/524508/how-can-one-run-multiple-versions-of-php-5-x-on-a-development-lamp-server) check out . – Shoban Feb 24 '09 at 03:11
3 Answers
0
Yes, you can compile with concurrent dso to support this. I really do not recommend mixing 4 and 5, expect those results to be undefined. Its not just PHP that you worry about, its Apache2 and php4.
But, concurrent dso will allow both versions to co-exist peacefully, as far as the loader is concerned.

Tim Post
- 33,371
- 15
- 110
- 174
0
You can install PHP5 as FastCGI. Anyway, your friend has a problem. PHP4 is obsolete and no longer supported. See: http://www.php.net/downloads.php#v4

vartec
- 131,205
- 36
- 218
- 244
0
Yes you can, one php is run as CGI and other as MODULE.
OR
You could run 2 apache's. I have apache 1.3.x with php4 on port 82 and apache 2.2.x with php5 on port 80. In both cases php is run as module.
In both cases I do not recommend this for production server, only for development.

Glavić
- 42,781
- 13
- 77
- 107