Re: FC4 Apache problem.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 02, 2005 at 10:51:14AM -0400, Robert Cahn wrote:
> I'm trying to start up a web site.  Following the docs i put the
> following little file in /var/www/cgi-bin
> 
> #!/usr/bin/perl
> print "Content-type: text/html\n\n";
> print "Hello, World.";
> 
> I made it executable and Apache (running as localhost) won't run it. 
> If I cd into /var/www/cgi-bin and execute ./first.pl it fails.

You don't say how it fails, but the two most likely causes are:

1) you haven't set the execute permissions:

    $ chmod 755 ./first.pl

2) You have extraneous charaacters in the name of the perl interepter, eg
a newline before, or a space or a \r after, the #!/usr/bin/perl; this can
be checked with 

    $ od -c ./first.pl

which shoud produce the following output:

0000000   #   !   /   u   s   r   /   b   i   n   /   p   e   r   l  \n
..

check for extra characters in the output.

-- 
SCO - a train crash in slow motion


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux