Re: [PHP] Sending headers to server

2013-08-03 Thread Matijn Woudt
On Sat, Aug 3, 2013 at 11:46 AM, Karim Geiger wrote: > Am 02.08.13 18:03, schrieb Miguel Guedes: > > This is strange. I've just found out that the headers are sent > > correctly if I access the website outside of localhost. I don't > > understand why. > > I also don't. I've tried the exactly sam

Re: [PHP] Sending headers to server

2013-08-03 Thread Karim Geiger
Am 02.08.13 18:03, schrieb Miguel Guedes: > This is strange. I've just found out that the headers are sent > correctly if I access the website outside of localhost. I don't > understand why. I also don't. I've tried the exactly same code you posted on my localhost as well and it worked all proper

Re: [PHP] Sending headers to server

2013-08-02 Thread Miguel Guedes
This is strange. I've just found out that the headers are sent correctly if I access the website outside of localhost. I don't understand why. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sending headers to server

2013-08-02 Thread Karim Geiger
Hi Miguel, On 08/02/2013 04:34 PM, Miguel Guedes wrote: > > Here's my output: > > $ curl -v http://localhost/header-test.php > * About to connect() to localhost port 80 (#0) > * Trying 127.0.0.1... > * Connected to localhost (127.0.0.1) port 80 (#0) >> GET /header-test.php HTTP/1.1 >> User-Age

Re: [PHP] Sending headers to server

2013-08-02 Thread Miguel Guedes
Great tip, Karim! On 02/08/13 15:29, Karim Geiger wrote: Try getting the complete header by using curl -v http://url.com and paste it here. What is your output? Here's my output: $ curl -v http://localhost/header-test.php * About to connect() to localhost port 80 (#0) * Trying 127.0.0.1.

Re: [PHP] Sending headers to server

2013-08-02 Thread Karim Geiger
Hi Miguel, On 08/02/2013 10:50 AM, Miguel Guedes wrote: > Hi Karim, > > On 01/08/13 15:40, Karim Geiger wrote: >> >> Works for me. What happens exactly? Do you get a 200? >> > > That's exactly right - I always get a 200. How can I diagnose this? > Try getting the complete header by using curl

Re: [PHP] Sending headers to server

2013-08-02 Thread Miguel Guedes
On 02/08/13 14:10, Matijn Woudt wrote: Did you print some data before using header? No, not at all. I've PHP configured to complain about notices, warnings and errors; would've got a warning about headers already sent, which I don't get. -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] Sending headers to server

2013-08-02 Thread Matijn Woudt
On Thu, Aug 1, 2013 at 4:04 PM, Miguel Guedes wrote: > Hello List, > > > I'm running PHP 5.4.9 as CGI (via apache 2.2.22) and can't seem to be > able to send headers to the server. > > Both, > > header('Status: 500 Internal Server Error'); > > and, > > header('HTTP/1.1 500 Internal Server Error',

Re: [PHP] Sending headers to server

2013-08-02 Thread Miguel Guedes
Hi Karim, On 01/08/13 15:40, Karim Geiger wrote: Works for me. What happens exactly? Do you get a 200? That's exactly right - I always get a 200. How can I diagnose this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sending headers to server

2013-08-01 Thread Karim Geiger
Hi MiguelOn 08/01/2013 04:04 PM, Miguel Guedes wrote: > Hello List, > > > I'm running PHP 5.4.9 as CGI (via apache 2.2.22) and can't seem to be > able to send headers to the server. > > Both, > > header('Status: 500 Internal Server Error'); > > and, > > header('HTTP/1.1 500 Internal Server

[PHP] Sending headers to server

2013-08-01 Thread Miguel Guedes
Hello List, I'm running PHP 5.4.9 as CGI (via apache 2.2.22) and can't seem to be able to send headers to the server. Both, header('Status: 500 Internal Server Error'); and, header('HTTP/1.1 500 Internal Server Error', true, 500); result in nothing happening on the client side. What am I

Re: [PHP] sending headers

2003-06-23 Thread CPT John W. Holmes
> I try to include a redirect header in my script, but is fails with the > familiar ( headers already sent) error. > > I KNOW you should put the headers call where it will cause the first > output, and I do that, the only thing happening infront of the headers > call is an include statement to my m

Re: [PHP] sending headers

2003-06-23 Thread Mario Oberrauch
> Hi List > > I am having trouble using headers. > > I try to include a redirect header in my script, but is fails with the > familiar ( headers already sent) error. > > I KNOW you should put the headers call where it will cause the first > output, and I do that, the only thing happening infront

[PHP] sending headers

2003-06-23 Thread Petre Agenbag
Hi List I am having trouble using headers. I try to include a redirect header in my script, but is fails with the familiar ( headers already sent) error. I KNOW you should put the headers call where it will cause the first output, and I do that, the only thing happening infront of the headers ca