Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Error: "Premature end of script headers"
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Error: "Premature end of script headers"
Error: "Premature end of script headers"
16-03-2010 6:43 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Im getting the following error:
Premature end of script headers
followed by Error 500
When running some, not all of my perl scripts
Googling found this:
http://httpd.apache.org/docs/1.3/misc/FAQ-F.html#premature-script-headers
But this will mean more to you than me.
EDIT: I see this has been raised before, but I dont have a .htacess file
http://community.plus.net/forum/index.php/topic,84357.0.html
Premature end of script headers
followed by Error 500
When running some, not all of my perl scripts
Googling found this:
http://httpd.apache.org/docs/1.3/misc/FAQ-F.html#premature-script-headers
But this will mean more to you than me.
EDIT: I see this has been raised before, but I dont have a .htacess file
http://community.plus.net/forum/index.php/topic,84357.0.html
Message 1 of 4
(4,001 Views)
3 REPLIES 3
Re: Error: "Premature end of script headers"
16-03-2010 10:02 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
My main site isn't working still, but I uploaded a test script just to get some confidence and that started off with getting the end of script error. A quick check of the permissions showed it was not executable, so I change the permissions to 700 (rwx------) and it then worked... just need to understand why my main app isn't showing any life....
Message 2 of 4
(620 Views)
Re: Error: "Premature end of script headers"
18-03-2010 10:12 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
This may help others.
I was getting this error and I was relying on $ENV{C_DOCUMENT_ROOT} to get the path to my scripts (perl).
As $ENV{C_DOCUMENT_ROOT} no longer existed, I amended the path manually so it was correct.
Now I dont get the "Premature end of script headers" error. I assume that because my path was wrong I was trying to access a script in an area of the webserver I was not allowed, hence the error.
I was getting this error and I was relying on $ENV{C_DOCUMENT_ROOT} to get the path to my scripts (perl).
As $ENV{C_DOCUMENT_ROOT} no longer existed, I amended the path manually so it was correct.
Now I dont get the "Premature end of script headers" error. I assume that because my path was wrong I was trying to access a script in an area of the webserver I was not allowed, hence the error.
Message 3 of 4
(620 Views)
Re: Error: "Premature end of script headers"
18-03-2010 10:48 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Or you could add this near the top of your script:
It'll be a bit more portable that way.
($ENV{'C_DOCUMENT_ROOT'} = $ENV{'SCRIPT_FILENAME'}) =~ s/$ENV{'SCRIPT_URL'}/\//;
It'll be a bit more portable that way.
Message 4 of 4
(620 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Error: "Premature end of script headers"