Perl working at command line, but not in Apache
I have a test perl script, that works on my Windoze box (Just says hello) that I have in /var/www/cgi-bin on my Slackware 10.2 box. When I'm in that directory, if I type
Code:
/usr/bin/perl test.pl However, if I call the script from a PC through Apache, I get error 500. The Apache error log says Code:
[error] (2)No such file or directory: exec of /var/www/cgi-bin/test.pl failed Code:
#!/usr/bin/perl Code:
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" |
Did you check the permissions of your file?
|
I knew someone would mention that :P The file permissions and ownership for both the installed file and my test file are the same, 777. They are owned by root and @smbshares.
|
Found the problem. I rewrote the file in vi and it worked. So I used UltraEdit to compare the ascii and Windows was putting in extra 0x0A 0x0D characters at the end of each line, that were throwing the linux system out.
Hope that help someone else |
All times are GMT -5. The time now is 07:34 PM. |