here are some steps to try.

1. Check the error log.. open a console: tail /var/log/httpd/error_log
2. Make sure the file was uploaded as asci not binary.. if you used an ftp
client.
3. Make sure /etc/httpd/conf/commonhttpd.conf or httd.conf has a section for
/cgi-bin/ and that its set to ALLOW.
4. If you uploaded it from a windows machine, or edited it from a windows
machine, you have probably added windows control chars to the script..you
need something like dos2unix to fix it, or use a win editor like textpad.com
and make sure it is saved in "unix" format. (under view=>properties in
textpad, and use "save as" to allow you to change it if its wrong..
5 make sure the permissions and ownership are correct.. as a basis to see if
you can get it working, try this:

chmod 755 myscript.pl
chown apache.apache myscript.pl

then try it again..

they are the most common problems I have seen with cgi scripts and server
500 errors.


rgds

Frank


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Aaron
Sent: Thursday, 28 November 2002 12:37 AM
To: [EMAIL PROTECTED]
Subject: RE: [newbie] cgi help


Since were on the subject of cgi.
I setup apache and put a test site in the var/www/html/ directory. I
added some cgi scripts and programs I download from the net. However non
of them will work for me. I checked that I have the correct path to perl
But I still get Internal Server Error from the apache server.
I don't know what I am missing.
Could someone help??
Thanks
Aaron

On Wed, 2002-11-27 at 11:28, Franki wrote:
> try swapping the url to the image and css from relative to absolute, and
> move both out of the cgi-bin.
>
> they should be somewhere like /var/www/html/images
>
> in the script they should link to the URL..
> http://mydomain.com/images/gandhi.jpg
>
> see how you go with that. some setups will not server images and stuff
from
> the cgi-bin.
>
> rgds
>
> Franki
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of L.V.Gandhi
> Sent: Tuesday, 26 November 2002 11:27 PM
> To: [EMAIL PROTECTED]
> Subject: [newbie] cgi help
>
>
> When I call the cgi file given below, I don't get the effects of
stylesheet
> mentioned in the header and also the picture. both the files are in the
same
> folder as that of the cgi file.
> ===============================================
> #!/usr/bin/perl
>
> print <<End;
> Content-Type: text/html\n\n
> <html>
> <head>
> <title>test</title>
> <link rel="stylesheet" type="text/css" href="teststyle.css" />
> </head>
> <body>
> <h1>test</h1>
> <img src="gandhi.jpg" alt="My picture"  height="153" width="131"
> align="left">
> </body>
> </html>
> End
> ==============================
>  I called the script with test .html given below.
> <html><head><title>Test</title></head>
> <body>
> <a href="cgi-bin/test1.pl">csstest<a><br>
> </body></html>
>  What should be done to get the desired effect.
> --
> L.V.Gandhi
> 203, Soundaryalahari Apartments, Lawsons Bay colony, Visakhapatnam, 530017
> MECON, 5th Floor, RTC Complex, Visakhapatnam AP 530020 INDIA
>
>
>
>
>
>
>
>
>
>
> ----
>

> Want to buy your Pack or Services from MandrakeSoft?
> Go to http://www.mandrakestore.com





Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to