Re: [PHP] cgi error --- please help

2004-01-28 Thread Len Borowski
I recently had this error. Turns out that my php binary was the
CLI(command line interface only) version, not the cgi version and so it
wasn't sending the headers before parsing the php file.  You should look
at getting the right php binary.

Also, if you have a question, you don't make 2 seperate posts asking the
same question.

-Len



On Wed, 2004-01-28 at 15:17, Dale Hersh wrote:
 CGI Error
 The specified CGI application misbehaved by not returning a complete set of
 HTTP headers.
 
 I am getting this error and I can't figure out what is causing the problem.
 If I hit refresh on the broswer, the page loads just fine. Any ideas???
 
 Thanks,
 Dale
 
 RUNNING IIS 6.0  MSSQL 2000

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] No headers from CGI scripts?

2004-01-27 Thread Len Borowski
I'm in the process of moving some scripts from a RH linux 7.x box(using
apache 1.3 and php4) to Debian stable.  I've installed apache 2 and php4
from source since Debian stable does not support apache 2 but I'm having
trouble with some of the scripts that were being executed as CGI on the
old RH 7.x box.  These scripts no longer seem to generate valid headers
if I run them as cgi scripts.

Typical code that failts might look like this...

#!/usr/bin/php
?php
require_once('body.inc');
setcookie(lsl_entry,set);

$body = introBody();

echo $body;
?

I tried inserting header('Content-Type: text/html') but that doesn't
seem to do anything.  I tried executing the script using CLI php and the
same thing happens, no headers are sent.

The relevant lines from the apache configuration look like...
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
Directory /usr/lib/cgi-bin
 AllowOverride FileInfo
 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
 Order allow,deny
 Allow from all
/Directory

Additionally, we need to be able to execute php scripts outside the
cgi-bin and so I have added the following to the apache2 config...

AddType application/x-httpd-php .php

What am I doing wrong here?  I'm most confused because the header
function doesn't seem to be working as expected. Can anyone lend some
insight?

-Len

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php