You need to send the string Content-type: text/html before sending any data, or it fails with error 500. Google for the exact string. Miguel - Globalview wrote:
Hello all!I am facing a weird thing with running any binary or script of any language, PHP or Shell script in my Apache.When I run the .PHP script, error_log shows me:"... Premature end of script headers: /var/www/owner/any_domain.com/cgi-bin/php431"Browser shows me: "Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. "In addition, I created a test shell script testing, that usually works fine:"#!/bin/sh echo "<h1> Just for testing purposes..."; " I've got the same entry as above in error_log. My conf file for the virtual server looks like this: "<VirtualHost $IP> ServerName www.any_domain.com DocumentRoot /var/www/owner/any_domain.com/public_html User owner Group ownerDirectoryIndex index.php index.php3 index.html index.htm index.shtml default.htmCustomLog /var/www/owner/any_domain.com/logs/access_log combined RLimitCPU 60 80 RLimitNPROC 20 30 SetEnv PHPRC ScriptAlias /cgi-bin/ "/var/www/owner/any_domain.com/cgi-bin/" ScriptAlias /cgi-bin/php "/var/www/owner/any_domain.com/cgi-bin/php" <Files ~ "^\.ht"> Order allow,deny Deny from all </Files> Alias /errordocs/ "/sites/web1/listel/frioar.com/errordocs/" ErrorDocument 400 /errordocs/400.html ErrorDocument 401 /errordocs/401.html ErrorDocument 403 /errordocs/403.html ErrorDocument 404 /errordocs/404.html ErrorDocument 500 /errordocs/500.html Alias /icons "/usr/local/apache/icons" <Directory "/usr/local/apache/icons"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost>"But the most weird thing is that it is happening only for this user, for any domain created from now on for this user, and it always worked the same way we have always done.All the permissions and owners are accordingly set. I even tried some different combinations, but nothing seems to work for this user. I used the same files in other virtual host and it worked fine. I created a new virtual host, with different name, and it worked fine. I created a different virtual host for this user and it did not work again.I've get Apache 1.3.1 running on a Linux Fedora Core 2, kernel 2.6.I really don't understand what is going on. I just can't figure out how to fix it --and I don't know what I've broken :D.If anyone could help me, I am burning my brains in here. I might be missing something.Thank you all,
-- Jean-Christophe Montigny Responsable Commission Web, Association Planètes Responsable serveurs assoces.com, Association Planètes Etudiant de deuxième année à Grenoble Ecole de Management Majeure Conseil en Organisation des Systèmes d'Information
begin:vcard fn:Jean-Christophe Montigny n:Montigny;Jean-Christophe org;quoted-printable:Association Pl@n=C3=A8tes adr;quoted-printable:;;12, rue Pierre S=C3=A9mard;Grenoble;FR;38000;France email;internet:jcm@xxxxxxxxxxx title:Responsable Com Web x-mozilla-html:FALSE url:http://planetes.assoces.com/ version:2.1 end:vcard
--------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx