[Asterisk-Users] Important note for AGI with PHP newbies

Steven Critchfield critch at basesys.com
Thu Jul 15 16:59:35 MST 2004


On Thu, 2004-07-15 at 16:35, Nathan Alpert wrote:
> I say this note is important only because I (a AGI PHP newbie) was
> tormented by this problem for many an hour, even though I'm sure it's
> documented somewhere or obvious to more experienced users.


> The thing that fixed it was putting the "-q" argument in the
> "#!/usr/local/php -q" thing that you put on the first line of your
> script file. Apparently this argument tells PHP to supress HTML headers
> or something according to the documentation. I'm still not %100 sure why
> this would make a difference, but it does!

Since the IO is buffered and your app mostlikely only expected one line
of return for every one line of output. If the headers go out and say
output 5 lines of headers, you would then have 5 responses to slug
through before you get to your good responses. Of course you are then
out of sync too. 

Now you have some more amunition as to why the -q is important.

-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-users mailing list