Re: [PHP] headers & passthru()

2001-04-04 Thread Plutarck

If your program does not explicitly set the content type header, then I
believe it is Apache which will send it automatically. So that may be part
of your problem.

--
Plutarck
Should be working on something...
...but forgot what it was.


"Nikolai Vladychevski" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> i got this problem, when I use an executable to produce the output for
> the html php sends headers screwing it all. For example, my script is
> like this:
>
>
>  .
> some stuff in php using database to prepare tempfile
> 
> 
> passthru("cat $tempfile | /usr/local/bin/somecgi");
> unlink($tempfile);
> exit;
> ?>
>
> in this example PHP does not generate HTML code, but the problem is it
> still sends header "Content-type: text/html". Why? I really dont need
> this , because my "somecgi" script produces its own headers and  actualy
> it is redirecting. So, this "content-type: text/html" that php generates
> is really screwing it all and redirect is failing. How can I disable php
> printing headers at all?
>
> I am sure no HTML nor headers are printed during php execution before
> "passthru" command. To make sure I placed a call to headers_sent()
> before passthru() and it returned false, after passthru() it returns
> true.
>
> Any ideas what to do?
> Thanks a lot
> nikolai
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] headers & passthru()

2001-04-04 Thread David Robley

On Thu,  5 Apr 2001 13:29, Nikolai Vladychevski wrote:
> Hi,
>
> i got this problem, when I use an executable to produce the output for
> the html php sends headers screwing it all. For example, my script is
> like this:
>
>
>  .
> some stuff in php using database to prepare tempfile
> 
> 
> passthru("cat $tempfile | /usr/local/bin/somecgi");
> unlink($tempfile);
> exit;
> ?>
>
> in this example PHP does not generate HTML code, but the problem is it
> still sends header "Content-type: text/html". Why? I really dont need
> this , because my "somecgi" script produces its own headers and 
> actualy it is redirecting. So, this "content-type: text/html" that php
> generates is really screwing it all and redirect is failing. How can I
> disable php printing headers at all?
>
> I am sure no HTML nor headers are printed during php execution before
> "passthru" command. To make sure I placed a call to headers_sent()
> before passthru() and it returned false, after passthru() it returns
> true.
>
> Any ideas what to do?
> Thanks a lot
> nikolai

php -q should prevent headers being produced. php -h for any other help.
-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] headers & passthru()

2001-04-04 Thread Nikolai Vladychevski

Hi,

i got this problem, when I use an executable to produce the output for
the html php sends headers screwing it all. For example, my script is
like this:




in this example PHP does not generate HTML code, but the problem is it
still sends header "Content-type: text/html". Why? I really dont need
this , because my "somecgi" script produces its own headers and  actualy
it is redirecting. So, this "content-type: text/html" that php generates
is really screwing it all and redirect is failing. How can I disable php
printing headers at all?

I am sure no HTML nor headers are printed during php execution before
"passthru" command. To make sure I placed a call to headers_sent()
before passthru() and it returned false, after passthru() it returns
true. 

Any ideas what to do? 
Thanks a lot
nikolai

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]