Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache2 error - please help

Status
Not open for further replies.

SkyHigh

Technical User
May 30, 2002
309
CA
Hi

I am running apache 2 webserver on a linux box, and I am getting the following error when browsing to pages which use some php or perl scripts :

--------Snipp from script.log-----Start

%% [Fri Sep 13 16:14:40 2002] GET /cgi-bin/flashmemo.cgi?mode=read&125.307877548039 HTTP/1.1
%% 500 /var/%request
Host: Connection: keep-alive
Accept: */*
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
X-Forwarded-For: 24.103.23.11
Via: 1.0 wc14 (NetCache NetApp/5.2.1R1D9)
%response

%% [Fri Sep 13 16:21:53 2002] POST /login.php HTTP/1.1
%% 500 /var/%request
Host: Connection: keep-alive
Accept: */*
Content-Type: application/x-
--------Snipp from script.log-----End

--------Snipp from error.log------Start

[Fri Sep 13 16:14:40 2002] [error] [client 66.185.85.81] Premature end of script headers: flashmemo.cgi
[Fri Sep 13 16:20:32 2002] [error] [client 66.185.85.81] Premature end of script headers: flashmemo.cgi
[Fri Sep 13 16:21:20 2002] [error] [client 66.185.85.81] Premature end of script headers: flashmemo.cgi

[Fri Sep 13 16:22:08 2002] [error] [client 66.185.85.81] Premature end of script headers: login.php
[Fri Sep 13 16:22:08 2002] [error] [client 66.185.85.81] Premature end of script headers: login.php

--------Snipp from error.log------End

--------Snipp from access.log-----Start

66.185.85.81 - - [13/Sep/2002:16:22:46 -0400] "GET /cgi-bin/flashmemo.cgi?mode=read&71.5879942290485 HTTP/1.1" 500 647

66.185.85.81 - - [13/Sep/2002:16:22:41 -0400] "GET /login.php HTTP/1.1" 500 647
66.185.85.81 - - [13/Sep/2002:16:22:43 -0400] "GET /login.php HTTP/1.1" 500 647

--------Snipp from access.log-----End


your help would be much appreciated
Thanks
Brenda
 
Coupla questions.

flashmemo.cgi: what language is the script in?

login.php: you're using PHP as a standalone cgi? ______________________________________________________________________
TANSTAAFL!
 
Hi

flashmemo.cgi: is a perl script

>login.php: you're using PHP as a standalone cgi?

I don't quite get it, I have installed php with apxs, here is a snipp of the virtualhost entry in the httpd.conf file:

----------Snipp-------

<VirtualHost *>
UseCanonicalName off
ServerName ServerAlias example.info
ServerAdmin admin@example.info
DocumentRoot /var/ ScriptAlias /cgi-bin/ &quot;/var/ ErrorLog logs/example/error.log
CustomLog logs/example/access.log common
CustomLog logs/example/referer.log referer
CustomLog logs/example/agent.log agent
ScriptLog logs/example/script.log
ServerSignature EMail
ScriptAlias /php4/ &quot;/var/ Action application/x-httpd-php4 &quot;/usr/local/bin/php&quot;
AddType application/x-httpd-php4 .php
AddType application/x-httpd-php4 .php3
AddType application/x-httpd-php4 .php4
<Directory &quot;/var/ Options +ExecCGI FollowSymLinks
</Directory>
<Directory &quot;/var/ Options +ExecCGI FollowSymLinks
</Directory>
</VirtualHost>

--------Snipp----------

I also created a small php script like &quot;hello world&quot; and test which also resulted in the above error msgs, I took out the following entery from httpd.conf and tried it, it produces the same error msg, so looks like either theres a problem with configuration of cgi-bin in httpd.conf or php/perl executables which the scripts are not finding ??

LoadModule php4_module modules/libphp4.so

Please see if you can come up some possible resolution to this problem, I am running the same scripts on a winxp box with appache successfully, under linux I have changed the path of the executable in each script like from #!c:/perl/bin/perl.exe in winxp to #!/usr/bin/perl in linux.

Thanks for your help
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top