httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] 500 Err - Script headers...
Date Fri, 13 Sep 2002 07:08:49 GMT
The list of possible bugs wasn't mean't to be exhaustive - I'm just thinking of a few common
things off the top of my head in the few free minutes I have to voluntarily answer your posts...

Since you're new, I should explain that "Premature end of script headers" is a generic error
message which occurs whenever a server-sided program fails to generate a proper CGI header.
Basically, it means your program doesn't work. Other than that, the message is not much use
(it is like 404 Not Found).

Technically, the problem has nothing to do with apache - it is your PHP script which is failing
so you have to look into the program and see what is wrong. You could try ScriptLog to help
you (see docs for details) - basically:

- create a logfile called "script_log" in the logs directory
- make it writeable by apache user (this is different from the other logfiles)
- put "ScriptLog logs/script_log" in the config
- restart

now when the CGI fails, you will see its output in this file. This will give you more information
than you get in the error_log.

Rgds,

Owen Boyle




>-----Original Message-----
>From: Iván Vega Rivera [mailto:ivan@i-sol.biz]
>Sent: Donnerstag, 12. September 2002 23:01
>To: users@httpd.apache.org
>Subject: RV: [users@httpd] 500 Err - Script headers...
>
>
>Thanks for your response.
>
>If you look at my original post, I state the error message I get (so
>your first 2 reasons don't apply):
>
>Server error!
>Premature end of script headers: php.exe 
>Error 500
>
>As for an inexistent DocRoot, I checked it, and it exists. Deny
>directives: The only Deny in the whole httpd.conf file is the one that
>protects .htaccess files. And the DirectoryIndex directive is correct.
>
>Let me know if you need more info to find the problem.
>
>By the way, I do feel ashamed that I'm only using this list to solve my
>problems, but as you may already realized, I'm completely new to Apache
>(and PHP), so... :)
>
>Regards,
>Ivan V.
>
>-----Mensaje original-----
>De: Boyle Owen [mailto:Owen.Boyle@swx.com] 
>Enviado el: Jueves, 12 de Septiembre de 2002 03:33 a.m.
>Para: users@httpd.apache.org
>Asunto: RE: [users@httpd] 500 Err - Script headers...
>
>
>I think the reason your setup "works" is that you are using the same
>string to name the sub-directory on the filesystem and the URL in the
>web-space. There is nothing wrong with this but it is obscuring what it
>going on. What is happening is that your "root site" 
>(http://localhost/)
>is working with a DocumentRoot of d:/sites. If you then try the URL
>http://localhost/mydomain.com, it goes into the directory d:/sites and
>looks for a file or directory called "mydomain.com" which it finds and
>so serves it.
>
>When you try http://mydomain.com directly, "...it doesn't work". There
>are a dozen reason why not:
>
>- DNS doesn't resolve mydomain.com to an active IP on the machine,
>- apache not listening to IP
>- the VH is incorrectly configured (e.g. non-existent DocRoot)
>- Deny directive,
>- faulty DirectoryIndex
>- etc...
>
>Check again your VH config and think about what IP the VH is coming
>from. If you don't get it, post the VH config with real 
>DocRoot and show
>the Listen directives. Post also the exact error message in the browser
>(don't say "it doesn't work" :-) Also, post any error message in the
>error log.
>
>Rgds,
>
>Owen Boyle
>
>
>
>
>>-----Original Message-----
>>From: Iván Vega Rivera [mailto:ivan@i-sol.biz]
>>Sent: Mittwoch, 11. September 2002 18:44
>>To: users@httpd.apache.org
>>Subject: RE: [users@httpd] 500 Err - Script headers...
>>
>>
>>Mmmh, I do have an index file (index.php). The strangest thing is that
>>if I access the site from the "root" site, it works ok!
>>
>>i.e., the site root is d:/sites, and inside that folder there are
>>several other subfolders where I keep my sites (i.e. 
>>d:/sites/mydomain.com), and mydomain.com points to 
>>d:/sites/mydomain.com... So, if I access 
>http://localhost/mydomain.com,
>
>>it works OK! But if I access http://mydomain.com, it doesn't!
>>
>>Regards,
>>Ivan V.
>>
>>-----Mensaje original-----
>>De: Boyle Owen [mailto:Owen.Boyle@swx.com]
>>Enviado el: Miércoles, 11 de Septiembre de 2002 03:04 a.m.
>>Para: users@httpd.apache.org
>>Asunto: RE: [users@httpd] 500 Err - Script headers...
>>
>>
>>What is the default document in your DocumentRoot? Try putting a plain
>>HTML file called "index.html" in there and see if it works 
>(it should!)
>>
>>Your problem is that something is executing php.exe as a CGI but that
>>program is not working (i.e. it is not producing a 
>CGI-header). Nothing
>
>>wrong with your config...
>>
>>Rgds,
>>
>>Owen Boyle
>>
>>>-----Original Message-----
>>>From: Iván Vega Rivera [mailto:ivan@i-sol.biz]
>>>Sent: Dienstag, 10. September 2002 21:38
>>>To: users@httpd.apache.org
>>>Subject: [users@httpd] 500 Err - Script headers...
>>>
>>>
>>>Hi,
>>>
>>>I'm having some trouble in configuring a vhost in Apache.
>>>
>>>I have Apache 2.0.39 + PHP 4.2.1 on Windows XP Pro.
>>>
>>>I added a line in my hosts file so "mydomain.com" would resolve to 
>>>127.0.0.1
>>>
>>>Then I added a vhost in httpd.conf:
>>>
>>><VirtualHost *>
>>>    DocumentRoot somepath
>>>    ServerName mydomain.com
>>>    <Directory "somepath">
>>>	Options Indexes FollowSymLinks
>>>	AllowOverride All
>>>	Order allow,deny
>>>	Allow from all
>>>    </Directory>
>>></VirtualHost>
>>>
>>>And when I open "mydomain.com" I get "Premature end of script
>>headers:
>>>php.exe"
>>>
>>>Is there something wrong with my vhost config?
>>>
>>>Thanks in advance.
>>>
>>>- Ivan V.
>>>
>>>
>>>---------------------------------------------------------------------
>>>The official User-To-User support forum of the Apache HTTP Server
>>>Project. See <URL:http://httpd.apache.org/userslist.html> for more 
>>>info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>>For additional commands, e-mail: users-help@httpd.apache.org
>>>
>>>
>>
>>---------------------------------------------------------------------
>>The official User-To-User support forum of the Apache HTTP Server
>>Project. See <URL:http://httpd.apache.org/userslist.html> for more 
>>info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>The official User-To-User support forum of the Apache HTTP Server 
>>Project. See <URL:http://httpd.apache.org/userslist.html> for more 
>>info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server
>Project. See <URL:http://httpd.apache.org/userslist.html> for 
>more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message