Re: headers & passthru()
| From: | Plutarck | Date: | Thu, 05 Apr 2001 05:34:51 +0000 |
| Subject: | Re: headers & passthru() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47176@lists.php.net to get a copy of this message | ||
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" <niko@isl.net.mx> wrote in message
news:3ACBED89.26B8A5B3@isl.net.mx...
> 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: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>