php-windows Digest 17 Feb 2001 10:18:54 -0000 Issue 450 Topics (messages 5608 through 5616): sending by timestamp 5608 by: afan Re: CGI error: incomplete headers? 5609 by: Toby Butzon 5610 by: Chaz Yoon 5612 by: Maurice Barnes 5614 by: Toby Butzon good site for techies - hytes.com 5611 by: Vasudeva Varma 5613 by: phobo shell scripting. 5615 by: kill-9 I'd love to join this list 5616 by: Jaun Fick Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
Hi guys, I work on newsletters and I send them using PHP. I want to send them in couple groups. My question: is there any chance that first group e-mails would be start sending themselves at noon. 2nd group at 1PM etc. - depend on time (timestamp)? Thanks for any help! Afan
You might want to double check your location commands... Maurice's omits a necessary space between "Location:" and the URL - this space MUST be here... ie header("Location: xxxx") is correct but header("Location:xxxx") is not. Chaz's header statement seems to omit the colon... maybe it's a typo in the email, but if the colon is omitted from the source file itself, that very well could be causing some sort of problem. Specifically, header("Location .../list.php?f=1") will not work, but header("Location: .../list.php?f=1") will. As a side-note, I see no reason for three dots at the beginning of that URL. That could also be throwing things off. If I hadn't noticed these two things to be errors, I probably wouldn't have commented on this thread because I don't see any reason for a POST to work but not a GET. I've been doing this on Win2k/PHP4/IIS5 for 6 months at least with no problems... Good luck - --toby Maurice Barnes wrote: > > While I dont have a solution for this problem I can confirm that the problem > is in the Header("Location:xxxx") command. Because of this obvious quirk > with IIS and PHP4 we have had to resort to PHP3 for a major e-business site > we were trying to upgrade to PHP4. I am not sure why this has not yet been > corrected as it has been discussed and I think its also in the bugs > database. We even tried using include files to get around the problme but > tht proved too messy. If there is anyone out there who has a solution or > willing to look into please do. This is a showstopper for users on the > Windows platform and should be fixed asap > > Regards, > Maurice > > ----- Original Message ----- > From: "Chaz Yoon" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, February 15, 2001 8:01 PM > Subject: [PHP-WIN] CGI error: incomplete headers? > > > I'm having a curious problem with PHP on IIS while setting up a message > > board (Phorum) on IIS 5.0, SQL Server 2000, and PHP 4.0.4pl1 (latest). > While > > posting a message, post.php receives a POST, processes the passed data to > > check for completeness, inserts a row into the database, and then > redirects > > the user via the header("Location .../list.php?f=1") function. However, > > once the redirect occurs, I receive the following message: > > > > CGI Error > > The specified CGI application misbehaved by not returning a complete set > of > > HTTP headers. The headers it did return are: > > > > Now, I know this has been in the archives, and I checked it out. The thing > > that's different for me is that when I refresh the page, it works just > fine. > > Somehow, the GET is different from the POST. Does anybody have any > thoughts > > on how I can fix this? Thanks. > > > > Chaz > > > > > > -- > > PHP Windows 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 Windows 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]
The header is actually correct, complete with the colon. I just used ellipses to omit the whole mess of the URL that I was using for that page -- sorry for the confusion. If I swap out the URL with http://www.cnn.com/ or something else and it works beautifully. I spotted an archived note on Usenet that indicated that this was a new bug after 4.0.2, so I'm going to go back a couple of versions and see if I can get it working. Chaz -----Original Message----- From: Toby Butzon [mailto:[EMAIL PROTECTED]] Sent: Friday, February 16, 2001 4:00 PM To: Maurice Barnes Cc: Chaz Yoon; [EMAIL PROTECTED]; Zeev Suraski Subject: Re: [PHP-WIN] CGI error: incomplete headers? You might want to double check your location commands... Maurice's omits a necessary space between "Location:" and the URL - this space MUST be here... ie header("Location: xxxx") is correct but header("Location:xxxx") is not. Chaz's header statement seems to omit the colon... maybe it's a typo in the email, but if the colon is omitted from the source file itself, that very well could be causing some sort of problem. Specifically, header("Location .../list.php?f=1") will not work, but header("Location: .../list.php?f=1") will. As a side-note, I see no reason for three dots at the beginning of that URL. That could also be throwing things off. If I hadn't noticed these two things to be errors, I probably wouldn't have commented on this thread because I don't see any reason for a POST to work but not a GET. I've been doing this on Win2k/PHP4/IIS5 for 6 months at least with no problems... Good luck - --toby Maurice Barnes wrote: > > While I dont have a solution for this problem I can confirm that the problem > is in the Header("Location:xxxx") command. Because of this obvious quirk > with IIS and PHP4 we have had to resort to PHP3 for a major e-business site > we were trying to upgrade to PHP4. I am not sure why this has not yet been > corrected as it has been discussed and I think its also in the bugs > database. We even tried using include files to get around the problme but > tht proved too messy. If there is anyone out there who has a solution or > willing to look into please do. This is a showstopper for users on the > Windows platform and should be fixed asap > > Regards, > Maurice > > ----- Original Message ----- > From: "Chaz Yoon" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, February 15, 2001 8:01 PM > Subject: [PHP-WIN] CGI error: incomplete headers? > > > I'm having a curious problem with PHP on IIS while setting up a message > > board (Phorum) on IIS 5.0, SQL Server 2000, and PHP 4.0.4pl1 (latest). > While > > posting a message, post.php receives a POST, processes the passed data to > > check for completeness, inserts a row into the database, and then > redirects > > the user via the header("Location .../list.php?f=1") function. However, > > once the redirect occurs, I receive the following message: > > > > CGI Error > > The specified CGI application misbehaved by not returning a complete set > of > > HTTP headers. The headers it did return are: > > > > Now, I know this has been in the archives, and I checked it out. The thing > > that's different for me is that when I refresh the page, it works just > fine. > > Somehow, the GET is different from the POST. Does anybody have any > thoughts > > on how I can fix this? Thanks. > > > > Chaz > > > > > > -- > > PHP Windows 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 Windows 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 Windows 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]
Hi Toby, Sorry about that.. the format is header("location: http://www.somewhere.com"); This is what gives the error. Have you been doing redirects or just straight POSTS? Maurce ----- Original Message ----- From: "Toby Butzon" <[EMAIL PROTECTED]> To: "Maurice Barnes" <[EMAIL PROTECTED]> Cc: "Chaz Yoon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Zeev Suraski" <[EMAIL PROTECTED]> Sent: Friday, February 16, 2001 4:00 PM Subject: Re: [PHP-WIN] CGI error: incomplete headers? > You might want to double check your location commands... > > Maurice's omits a necessary space between "Location:" and the URL - this > space MUST be here... ie header("Location: xxxx") is correct but > header("Location:xxxx") is not. > > Chaz's header statement seems to omit the colon... maybe it's a typo in > the email, but if the colon is omitted from the source file itself, that > very well could be causing some sort of problem. Specifically, > header("Location .../list.php?f=1") will not work, but header("Location: > .../list.php?f=1") will. > > As a side-note, I see no reason for three dots at the beginning of that > URL. That could also be throwing things off. > > > If I hadn't noticed these two things to be errors, I probably wouldn't > have commented on this thread because I don't see any reason for a POST > to work but not a GET. I've been doing this on Win2k/PHP4/IIS5 for 6 > months at least with no problems... > > Good luck - > > --toby > > Maurice Barnes wrote: > > > > While I dont have a solution for this problem I can confirm that the problem > > is in the Header("Location:xxxx") command. Because of this obvious quirk > > with IIS and PHP4 we have had to resort to PHP3 for a major e-business site > > we were trying to upgrade to PHP4. I am not sure why this has not yet been > > corrected as it has been discussed and I think its also in the bugs > > database. We even tried using include files to get around the problme but > > tht proved too messy. If there is anyone out there who has a solution or > > willing to look into please do. This is a showstopper for users on the > > Windows platform and should be fixed asap > > > > Regards, > > Maurice > > > > ----- Original Message ----- > > From: "Chaz Yoon" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Thursday, February 15, 2001 8:01 PM > > Subject: [PHP-WIN] CGI error: incomplete headers? > > > > > I'm having a curious problem with PHP on IIS while setting up a message > > > board (Phorum) on IIS 5.0, SQL Server 2000, and PHP 4.0.4pl1 (latest). > > While > > > posting a message, post.php receives a POST, processes the passed data to > > > check for completeness, inserts a row into the database, and then > > redirects > > > the user via the header("Location .../list.php?f=1") function. However, > > > once the redirect occurs, I receive the following message: > > > > > > CGI Error > > > The specified CGI application misbehaved by not returning a complete set > > of > > > HTTP headers. The headers it did return are: > > > > > > Now, I know this has been in the archives, and I checked it out. The thing > > > that's different for me is that when I refresh the page, it works just > > fine. > > > Somehow, the GET is different from the POST. Does anybody have any > > thoughts > > > on how I can fix this? Thanks. > > > > > > Chaz > > > > > > > > > -- > > > PHP Windows 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 Windows 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 Windows 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] > >
Hi Maurice - I've been doing both. I use redirects a LOT in some of my applications and have had no problems so far. The exception is that IE 5 sometimes alerts with a "redirection error" but this only occurs if I hit "refresh" - actually posting with the form has yeilded no problems. I'm using POST, not GET, on these redirects as well. I just thought I'd post my observations to the list; apparently they weren't of much help to Chaz, which is OK, but I don't have any more to add. Anyway, good luck to everybody that is experiencing this problem - --toby Maurice Barnes wrote: > > Hi Toby, > Sorry about that.. the format is header("location: > http://www.somewhere.com"); > This is what gives the error. Have you been doing redirects or just > straight POSTS? > > Maurce > ----- Original Message ----- > From: "Toby Butzon" <[EMAIL PROTECTED]> > To: "Maurice Barnes" <[EMAIL PROTECTED]> > Cc: "Chaz Yoon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Zeev > Suraski" <[EMAIL PROTECTED]> > Sent: Friday, February 16, 2001 4:00 PM > Subject: Re: [PHP-WIN] CGI error: incomplete headers? > > > You might want to double check your location commands... > > > > Maurice's omits a necessary space between "Location:" and the URL - this > > space MUST be here... ie header("Location: xxxx") is correct but > > header("Location:xxxx") is not. > > > > Chaz's header statement seems to omit the colon... maybe it's a typo in > > the email, but if the colon is omitted from the source file itself, that > > very well could be causing some sort of problem. Specifically, > > header("Location .../list.php?f=1") will not work, but header("Location: > > .../list.php?f=1") will. > > > > As a side-note, I see no reason for three dots at the beginning of that > > URL. That could also be throwing things off. > > > > > > If I hadn't noticed these two things to be errors, I probably wouldn't > > have commented on this thread because I don't see any reason for a POST > > to work but not a GET. I've been doing this on Win2k/PHP4/IIS5 for 6 > > months at least with no problems... > > > > Good luck - > > > > --toby > > > > Maurice Barnes wrote: > > > > > > While I dont have a solution for this problem I can confirm that the > problem > > > is in the Header("Location:xxxx") command. Because of this obvious quirk > > > with IIS and PHP4 we have had to resort to PHP3 for a major e-business > site > > > we were trying to upgrade to PHP4. I am not sure why this has not yet > been > > > corrected as it has been discussed and I think its also in the bugs > > > database. We even tried using include files to get around the problme > but > > > tht proved too messy. If there is anyone out there who has a solution or > > > willing to look into please do. This is a showstopper for users on the > > > Windows platform and should be fixed asap > > > > > > Regards, > > > Maurice > > > > > > ----- Original Message ----- > > > From: "Chaz Yoon" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Thursday, February 15, 2001 8:01 PM > > > Subject: [PHP-WIN] CGI error: incomplete headers? > > > > > > > I'm having a curious problem with PHP on IIS while setting up a > message > > > > board (Phorum) on IIS 5.0, SQL Server 2000, and PHP 4.0.4pl1 (latest). > > > While > > > > posting a message, post.php receives a POST, processes the passed data > to > > > > check for completeness, inserts a row into the database, and then > > > redirects > > > > the user via the header("Location .../list.php?f=1") function. > However, > > > > once the redirect occurs, I receive the following message: > > > > > > > > CGI Error > > > > The specified CGI application misbehaved by not returning a complete > set > > > of > > > > HTTP headers. The headers it did return are: > > > > > > > > Now, I know this has been in the archives, and I checked it out. The > thing > > > > that's different for me is that when I refresh the page, it works just > > > fine. > > > > Somehow, the GET is different from the POST. Does anybody have any > > > thoughts > > > > on how I can fix this? Thanks. > > > > > > > > Chaz > > > > > > > > > > > > -- > > > > PHP Windows 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 Windows 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 Windows 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] > > > >
good site for techies - hytes.com Vasu _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
hehe just don't accidently go to hyte.com :) I love that java popup mouseover stuff ;) Siggy ----- Original Message ----- From: "Vasudeva Varma" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 16, 2001 9:21 PM Subject: [PHP-WIN] good site for techies - hytes.com > good site for techies - hytes.com > > Vasu > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > -- > PHP Windows 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] > >
does anyone know if it is possible to pass code to the php executable. for example. php <?php echo "hello world"; ?> I have tried but it didn't work maybe I'm just doing it wrong. If it doesn't is there a way of running a script that is in memory. say I use fopen to read a php script into a variable how then can I run this script? eval didn't seem to work right. thanks in advance kill-9 www.kill-9.dk
Please.... Jaun Fick www.pdsg.co.za +27 83 276 5612 +27 11 975 4492