Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Apache fails to execute Perl after apt update

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Odd probelm with getting Apache running  
Author Message
user2778

External


Since: May 11, 2004
Posts: 6



(Msg. 1) Posted: Tue May 11, 2004 2:49 pm
Post subject: Apache fails to execute Perl after apt update
Archived from groups: alt>apache>configuration (more info?)

Hi,

i just have updated my server (running with redhat 9.0) with apt update,
and it has also updated the apache httpd to version 2.0.40 (built Apr 21
2004 11:49:03). Since the update all my perl scripts fail to work. The
only error I get is "Premature end of script headers: whatever.pl". The
scripts still work properly when called through command-line.

Even such a tiny-simple test script like the one below produces this error.

#!/usr/bin/perl -w

use CGI;
my $q = new CGI();
print $q->header(-type=>'text/html',);
print "test\n";
exit;

the configuration of the server seems to be ok according to
/etc/init.d/httpd configtest

any suggestions?

regards
Maros

 >> Stay informed about: Apache fails to execute Perl after apt update 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Tue May 11, 2004 2:54 pm
Post subject: Re: Apache fails to execute Perl after apt update [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Maros Kollar <mar.removethisfornospam.os.TakeThisOut@k-1.com> wrote:
 > Since the update all my perl scripts fail to work.

....and peoples asks me why I don't like 'automatic' updates...

 > only error I get is "Premature end of script headers: whatever.pl"

Premature end means that your script didn't send the correct http
heades (content-type and the like).

 > use CGI;

Can your script find the CGI lib? Remember that when called by
Apache he doesn't have the full path.

Davide

--
| Have you reconsidered a computer career?
|
|
|<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Apache fails to execute Perl after apt update 
Back to top
Login to vote
user2778

External


Since: May 11, 2004
Posts: 6



(Msg. 3) Posted: Tue May 11, 2004 3:13 pm
Post subject: Re: Apache fails to execute Perl after apt update [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Davide Bianchi schrieb:

 > ...and peoples asks me why I don't like 'automatic' updates...

I just have started to dislike automatic updates ;-(

  >>only error I get is "Premature end of script headers: whatever.pl"
 >
 >
 > Premature end means that your script didn't send the correct http
 > heades (content-type and the like).

the problem presists even when i output the http header whithout CGI.pm

e.g.
print "Content-Type: text/html\n\n";
print "test\n";
exit;

is it possible that the newer versions of apache need some modules or
special directives to parse cgi headers properly?

regards
Maros<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache fails to execute Perl after apt update 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 4) Posted: Tue May 11, 2004 3:32 pm
Post subject: Re: Apache fails to execute Perl after apt update [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Maros Kollar <mar.removethisfornospam.os.RemoveThis@k-1.com> wrote:
 > is it possible that the newer versions of apache need some modules or
 > special directives to parse cgi headers properly?

The point of a CGI is that is called and it returns to the Web
Server something that looks like an HTML page, nothing more, nothing
less, the web server shouldn't require anything special to process
the headers.

Try this: call your cgi from the command-line and save the result in
a file, then check if the file contains strange things (tabs instead
of spaces or so on).

Davide

--
| USER, n.: The word computer professionals use when they mean "idiot."
|
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache fails to execute Perl after apt update 
Back to top
Login to vote
user2778

External


Since: May 11, 2004
Posts: 6



(Msg. 5) Posted: Tue May 11, 2004 4:10 pm
Post subject: Re: Apache fails to execute Perl after apt update [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I have done some further research and i have found out that the scripts
are not even being executed when called through apache. (i have changed
the test-script so that it writes a small file whenever it is executed).
so i guess that the problem must be somewhere in the server
configuration. here are some further infomation on the file and the
server configuration:

file in /www/k-1/html:
-rwxr-xr-x k-1 k-1_grp test.pl

httpd.conf:
LoadModule cgid_module modules/mod_cgid.so
[...]
User apache
Group apache
[...]
AddHandler cgi-script cgi pl
[...]
<Directory "/www/*/html">
Options ExecCGI Indexes
AllowOverride Limit Options AuthConfig
Order allow,deny
Allow from all
</Directory>
[...]
<VirtualHost some.ip.add.res:80>
[...]
DocumentRoot /www/k-1/html
SuexecUserGroup k-1 k-1_grp
[...]
</VirtualHost>

regards
Maros
 >> Stay informed about: Apache fails to execute Perl after apt update 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Perl CGI doesn't want to execute !! - Hi, I've set up ipaudit on my RH9 webserver, but cgi doesn't want to execute !! Those files are chmod +x and I've put the ExecCGI flag in my apache conf. lol

Problem to execute cgi on apache - When I try tu use cgi scripts in apache, I have this error : Forbidden You don't have permission to access /cgi-bin/printenv on this server. I have verified rights on the directory and user apache is the owner and have all rights on it. Somebody hav...

Apache : update w3-pages over FTP, how ? - My problem is that I want to be able to upgrade the pages on my Apache server using FTP. I'm running Apache 1.3 on Linux. I have created an account intended to be utilized for upgrading pages and I have defined the home directory of this account as the...

Apache Update Handling and Caching - Hi, When updating web pages I get a very interesting scenario: Using the WAN IP address of the server, the update does not show up at all. Instead the old pages are displayed. This is not a browser caching problem, since even browsers that have not..

Apache 2.0.47 pdf's won't open since update - I updated our Webserver from Suse 8.2 (Apache 2.0.46) to Suse 9.0 (Apache 2.0.47). Since then, I cannot open PDF-documents (document won't start with %20pdf). When I first save the File and then try to open it again, it works. I thought of mime-problems....
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]