PDA

View Full Version : PHPAds error


Fenice
05-28-2001, 12:54 AM
I'm installing PHPAds in my site but I'm getting an error after I've ocnfigured everything:
[Sun May 27 23:28:56 2001] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: /big/dom/xps2fantasy/cgi-bin/phpAds/admin/index.php3

In the script troubleshootes the only problem I'm getting is

Checking for proper interpreter path...Failed:
Missing or invalid path line

What can I do?

PaulKroll
05-28-2001, 01:34 AM
I >THINK< that the server is trying to treat the script as a CGI script, because you have it in/are calling it via the cgi-bin directory.

CGI scripts have a shebang (that's the &quot;#&quot; and &quot;!&quot; characters together) and a full path to the appropriate language, so for Perl scripts, that's:

#!/usr/bin/perl

Or sometimes something close to that. I think PHP is either in usr/local/bin or the usr/bin, but in any case you may want to look more deeply into this:

...calling PHP as CGI is every bit as inefficient as calling anything else as CGI. All the advantages of PHP being a module in apache, are lost if you call it as CGI.[nbsp][nbsp]You might wanna put the PHP scripts in another directory (/big/dom/xps2fantasy/www/phpAds/admin/index.php3, for example) where the server won't try to run it as CGI.