Page 1 of 1
Premature end of script headers
Posted: Sun Apr 02, 2006 5:39 pm
by tekcubtib
Hello,
I un-tarred the serendipity-0.9.1.tar.gz file. When I visit the serendipity directory with my browser I receive the log message "Premature end of script headers: index.php" I also noticed that file @LongLink is created in the directory that contains the serendipity directory.
I am currently successfully running the latest release of phpBB2 and the IntegraMod implementation of phpBB2.
I changed the directory permissions to 777 and the release of php and MySQL are ...
PHP Version 5.1.2
MySQL 4.1.16
Any thoughts or help?
Thanks!
Posted: Mon Apr 03, 2006 3:33 am
by judebert
I think the @LongLink thing is an IIS thing. I don't think anyone's worked on getting Serendipity to work on IIS; we're all using Apache, lighthttpd, or some other Apache-compatible server.
It's probably possible, but nobody's tried it.
First, you'll want to figure out what happenned with that long link. Check the structure of your website against the structure of the tar file and see what's different.
The premature end of headers thing seems like a bad upload, although we've seen similar stuff when text comes before the Serendipity calls. Did you upload in ASCII mode? BINARY mode can cause problems with systems using different encodings (like Linux to Windows or vice-versa).
Posted: Mon Apr 03, 2006 4:29 am
by mgroeninger
Serendipity should work on IIS... I used to use it on IIS with php running under a fastCGI dll... It was actually faster that way than running under windows apache with mod_php. If I remember correctly you needed a simple hack to get 0.7 working, but 0.8 worked straight out the box.
I would assume 0.9 and 1.0_beta would work fine out of the box, too...
But I don't think @LongLInk is an IIS thing... I believe it is created by tar (or gz) when a filename is too long for the filesystem. Have you tried to take a look at the contents of the file? It should have the names of the files which were extracted incorrectly... You might be able to find those files and rename them in order to get the install to work...
(Some sources online
http://www.google.com/search?q=%40LongL ... art=0&sa=N suggest using GNU tar as a way to fix the problem.)
Posted: Mon Apr 03, 2006 5:12 am
by tekcubtib
Thanks for the tips! I am using Apache (I host on a UNIX environment from prohosting.com), but they support frontpage extensions although I don't use them. I uploaded the tar file and was able to view / extract it okay. I thought it might be the app so I tried another PHP / MySQL application that I unzipped on my local machine then FTP'd using Macromedia Dreamweaver MX and I received the same premature end of headers. I am completely baffled since I have successfully installed and run several other PHP / MySQL apps, but I am convinced it is something in my environment. I am checking with my ISP.
Posted: Mon Apr 03, 2006 10:41 am
by garvinhicking
Hi!
The "premature end of script headers" is actually a very generic error message. It could mean all and nothing, all that it really says is: "The script could nto be run and returned an error".
"Premature end of Script Headers" can only happen if you run PHP as a CGI, because CGI's usually can do "all and nothing", so their error messages are often unspecific.
The most usual errors for this message are:
1. A garbaged file. Try to run the php binary with "php -l index.php" (if you can) to check if the PHP file does validate fine for the interpretert. Sometimes TAR utilities do not extract files properly and insert weird characters.
2. The Applications tries to send HTTP headers that are not allowed for the CGI. Serendipity does emit HTTP headers, especially the "HTTP 1/.1 OK" one. Some servers might have issues with that.
3. The application had a fatal error because of failed PHP/module dependencies.
Talking to your provider is the best thing to do.
Regards,
Garvin
Posted: Tue Apr 04, 2006 3:30 pm
by tekcubtib
It was the permissions on the serendipity directory. Changed to 755 and it worked. I originally had them at 777 (just trying to trouble shoot) and it would not execute with 777.
Thanks for your help! I am off and running now.