Re: headers & passthru()

From: Date: Thu, 05 Apr 2001 05:20:23 +0000
Subject: Re: headers & passthru()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47171@lists.php.net to get a copy of this message
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

« previous php.general (#47171) next »