• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Need Help: PHP 5.3 'on demand' (i.e. if called in htaccess)


Well-known member

I would need your help. I have a server which runs Apache 2.2 and PHP 5.4 als Apache-module.
For one site, I need a PDF-extension which is a little older (and expensive like hell) - it only supports PHP up to 5.3 (some error messages appear in log like Ext's API doesn't match PHP's).

Well, so I want to have this one site running PHP 5.3 instead of 5.4. I installed PHP 5.4 using dotdeb-backports and 5.3 using phpfarm. I enabled mod_actions in Apache and added this to my .htaccess:
AddHandler php53 .php .php5
Action php53 /opt/phpfarm/inst/bin/php-cgi-5.3.10
PHP 5.3 itself works:
root@cyberdyne2:/opt/phpfarm/inst/bin# /opt/phpfarm/inst/bin/php-cgi-5.3.10 --version
PHP 5.3.10 (cgi-fcgi) (built: Mar 31 2012 12:23:41) (DEBUG)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
But phpinfo() still shows PHP 5.4.

What's wrong? I would appreciate any help :)


Well-known member
Okay... Got pdflib 7 working with a patched version of libpdf-2.1.8 from PECL.

So switching PHP still doesn't work, but now with this error fixed, I don't actually need it any longer.