Is there any way I could have php 4 and 5 installed in the same server, while keeping the same ".php" extension for both, and making it so only a specific folder (+subfolders) in the server run under php4?
I have CentOS 5.5 x64 with whm/cpanel, so I can install both with EasyApache, that part is not an issue.
Reason I want this is to keep an old script working; it's encoded with Zend and upgrading to php 5.3.x breaks it, it will only work on 5.2 (or 4.x), as it needs to be re-encoded if I am to run it on 5.3 (not an option). Decoding it didnt work quite well either, so I think the php4/5 approach would be a working solution, if I could restrict 4 to a folder and not have to change the extensions (obviously the script would fail with ".php4" because of hard-coded paths and filenames).
my current php.conf, handled by SuPHP
# SuPHP configuration for PHP5 LoadModule suphp_module modules/mod_suphp.so suPHP_Engine on AddType application/x-httpd-php5 .php5 .php .php3 .php2 .phtml <Directory /> suPHP_AddHandler application/x-httpd-php5 </Directory> # SuPHP configuration for PHP4 AddType application/x-httpd-php4 .php4 <Directory /> suPHP_AddHandler application/x-httpd-php4 </Directory>