Home - Reference

PHP TroubleShooting

My PHP scripts download instead of run.

Check the AddType and Action directives in your .htaccess file. See CGI Support for more information.

PHP tries to interpret the PHP binary, not my script

This appears to be a bug. The work around is to use a perl script in place of the php binary, and fix some values prior to calling php. Don't forget to modify it for your site. Your php.ini file will be in your home directory.

===> cgi-bin/php4 <===
#!/usr/bin/perl
$ENV{'SCRIPT_FILENAME'}=$ENV{'PATH_TRANSLATED'};
system('/usr/lib/cgi-bin/php4 -c ~/ 2>&1');

 

Top