php script: Premature end of script headers
I have this in file called test.php:
Code:
<html> Quote:
(If I move the file out of the data directory, it works fine) |
Have you tried this for a test?
Code:
<?php HTH, Centinul |
Okay I tried that. I get the same exact error.
|
Have you tried searching google for this error? In my brief research it appears the script dies before it sends anything to the web server and that is where the error arises.
I would imagine this problem must have happened to someone before so I would think you could find a solution on the net. You mention that it works fine in another directory. Is that directory outside the web server's document root or not? What are the permissions of these two directories? Thanks Centinul |
Indeed, I tried Googling for the error but everything was about perl/cgi etc and not what I wanted.
No, the directory is still under the users account. data is simply a subdirectory. The permissions for data is drwxr-xr-x and for the main directory it's drwxr-x--- |
Hmm...
Could you post your webserver and php configuration so we can take a look at it? Thanks, Centinul |
The entire php.ini? Or something else?
|
What are your file permissions on the data directory?
|
iirc, 'premature end of header' usually means you've forgot that in HTML there have to be 2 (!) newline chars after the hdr, before the body.
|
I figured it out. Turns out the data directory had the wrong user permissions. I had to chown and chgrp the directory and now it works fine.
I wish the error messages actually told me something useful. Maybe mention something about permissions. Sigh. |
All times are GMT -5. The time now is 04:18 AM. |