I've done some further digging/experimenting (taking advantage of the fact that I'm in UK and the client and its customers are in the USA - so it's still night there). The following setup seems to have worked - this utilises php-cgi without recourse to fastcgi - and I still get a good response time.
1) Leave pretty much everything intact in apache httpd.conf file - that includes existing libphp5.so that utilises existing 5.2 installation.
2) Install php 5.3 into a separate directory - in my case /opt/php53.
3) In httpd.conf, add the following (or ensure it's already there)
ScriptAlias /cgi-bin/ /var/www/mainsite/cgi-bin
AddHandler cgi-script .cgi
<Directory /var/www/mainsite/newapp>
Options -Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
AddHandler php5-cgi .php
Action php5-cgi /cgi-bin/php.cgi
DirectoryIndex index.php index.html
Order allow,deny
Allow from all
</Directory>
4) In directory /var/www/mainsite/cgi-bin/
create file php.cgi with the following content:
#!/bin/bash
PHP_CGI=/opt/php53/bin/php-cgi
PHP_FCGI_CHILDREN=5
PHP_FCGI_MAX_REQUESTS=1000
### no editing below ###
export PHP_FCGI_CHILDREN
export PHP_FCGI_MAX_REQUESTS
exec $PHP_CGI
5) Restart apache: /etc/init.d/httpd restart
After this, I placed a file with <?php phpinfo(); ?>
into the root of the web server and into my newapp
directory. Executed from the root of the server it produced (among other things):
PHP Version 5.2.5
Build Date Dec 11 2008 19:04:47
Server API Apache 2.0 Handler
When executed from the newapp
directory, it produced:
PHP Version 5.3.28
Build Date Feb 13 2014 17:00:43
Server API CGI/FastCGI
Which is exactly what I want.