Re: CGI-executable Apache

From: Date: Mon, 05 Jun 2000 18:34:37 +0000
Subject: Re: CGI-executable Apache
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-1079@lists.php.net to get a copy of this message
Hi Victor! On Mon, 05 Jun 2000, Victor wrote: > My error log is what I posted > Premature end of script headers: /data/www/virtual_host/cgi-bin/test.cgi > I don't think I have a safe_exec_dir defined anywhere; is this an Apache > directive? nope, php one. Well, first off, probably you have something like AddHandler cgi-script .cgi and ScriptAlias /cgi-bin/ /path/to/cgi-bin/ right? and you want test.cgi to use the hash-bang feature to invoke php, maybe you should try instead installing php as per docs, with the following directives ... then remember, you cannot have both of them,i.e. a foo.php under a path declared as ScriptAlias,or with ExecCGI option won't work. [least IIRC] > How do I use php using addhandler, anyone remember the syntax? AddHandler "application/x-http-php" .php Action "application/x-http-php" "/cgi-bin/php" > > Teodor Cimpoesu wrote: > > > Hi Victor! > > On Mon, 05 Jun 2000, Victor wrote: > > > > > Well, it still does not work. The cgi version of php just doesn't seem to > > > get results out properly. Is there some switch I can set for more info/error > > > messages? > > > > > > My test.cgi works from command line when I am logged in and webadmin and > > > when I am logged in as nobody. However, when I call it from apache, it says > > > "Premature end of script headers: /data/www/virtual_host/cgi-bin/test.cgi" > > > > > > Any input still helpful. here is my test.cgi: > > > > > > #!/opt/apache/bin/php > > > <?php print "Hello World\n"; ?> > > try to debug it by running httpd in single mode(-X param.) > > Also, what do you see in your error logs? > > Also, do you have a 'safe_exec_dir' set somehow? > > > > -- teodor > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- teodor

« previous php.general (#1079) next »