In reply to:
But it doesn't work, and changing the location to include ../ thingies results in a 404.
Works for me!
Well let's try this again. I am assuming you are logging into a shell to do this ....
~ = shortcut for your home directory eg /home/username
domain = your domain name
1. mkdir ~/domain/cgi-bin
2. nano ~/domain/cgi-bin/dispatch.cgi
3. (paste contents of dispatch.cgi below and then press Ctrl-O, Enter, Ctrl-X)
4. chmod 755 dispatch.cgi
5. mkdir ~/domain/folder
6. nano ~/domain/folder/.htaccess
7. (past contents of .htaccess below and then press Ctrl-O, Enter, Ctrl-X)
8. nano ~/domain/folder/test.php
9. (past contents of test.php below and then press Ctrl-O, Enter, Ctrl-X)
10. (Copy your PHP.ini file to ~/domain/cgi-bin)
11. (Browse to http://domain/folder/test.php)
12. (Should show Loaded Configuration File: /home/.glob/username/domain/cgi-bin/PHP.ini )
dispatch.cgi
#!/bin/sh
export PHPRC=/home/username/domain/cgi-bin/PHP.ini
exec /dh/cgi-system/php5.cgi
.htaccess
AddHandler php5-cgi .php
Action php5-cgi /cgi-bin/dispatch.cgi
test.php
<?php phpinfo(); ?>
Note: This does not enable PHP FastCGI.Did you want FastCGI enabled?
Customer since 2000
openvein.org