![]() |
Here is the contents.
Code:
#!/usr/bin/perlAlso but this file doesn't even do anything in the terminal Code:
[jpowermac-g4s-Computer:~] powermac% perl /WebSTAR\ Server\ Suite\ 4.3/cgi-bin/helloworld.cgi Code:
[jpowermac-g4s-Computer:~] powermac% perl /WebSTAR\ Server\ Suite\ 4.3/cgi-bin/perl_test.pl Code:
Internal Server ErrorCode:
[Tue Aug 24 15:50:22 2004] [error] (2)No such file or directory: exec of /WebSTAR Server Suite 4.3/cgi-bin/perl_test.pl failedCode:
192.168.1.1 - - [24/Aug/2004:15:50:22 -0400] "GET /cgi-bin/perl_test.pl HTTP/1.1" 500 619 "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" |
Quote:
I think your script files have "Macintosh" line endings instead of "Unix" line endings. This can happen if you choose the wrong editor to create your scripts. Which text editor have you been using? To fix things, open the file in an editor that is able to handle a variety of line-endings and re-save it with Unix line endings. One such editor is BBedit Lite. Another is SubEthaEdit. If you open your current script files in 'pico' (in the Terminal, type: pico helloworld.cgi) you should see that the lines are screwed up. |
Hi,
I've just had a quick read of this thread and my first thought was to wonder if the CGI handler in the web server is barfing at the spaces in the directory you are using. Does the awstats script you mention live in the same directory? I'd recommend against having your CGI directory under your DocumentRoot, BTW. It's a major security concern. Tony |
OK, I've had a better look at your Apache config.
My suggestion would be to move your CGI files to /Library/WebServer/CGI-Executables and change the script alias back to the default of this directory. Given your current setup this has three advantages. 1/ It gets rid of the suspect spaces in the path. Note that the awstats script that you say is working lives in a directory with no spaces in its path. 2/ It moves your CGI directory out from under your DocumentRoot 3/ It removes the possibility that the problem is the way you are script aliasing a directory back to itself. At the moment the real URL of your CGI directory is exactly the same as the one you are applying via the scriptalias command - making it a waste of time and perhaps a source of error inside Apache. Oh, and while you are at it - have a serious think about moving your DocumentRoot to a path that doesn't have spaces. It is almost certain to cause you problems further down the track. Tony |
Awww just when I though you were onto something andt it was going to work.. still doesn't work
Code:
[Wed Aug 25 00:21:48 2004] [notice] Apache/1.3.29 (Darwin) PHP/4.3.2 mod_perl/1.26 configured -- resuming normal operationsand also.. awstats.pl works in my older directory (no aliases) with space.... but nothing else works.... not even copying that data into another file, or modifying the awstats file. |
Hmmmm.
OK. Try fixing the line ends - that should improve things. Then check where perl is installed : ls -l /usr/bin/perl should give you a result -rwxr-xr-x 1 root wheel 19944 28 May 08:53 /usr/bin/perl and just in case make sure that the line <Directory "/Library/WebServer/CGI-Executables"> says exactly that with no trailing slash. Also, to be totally on the safe side, turn off mod_perl by commenting out both the LoadModule and AddModule lines that mention it. Then tell us what happened. Tony |
Code:
[jpowermac-g4s-Computer:~] powermac% ls -l /usr/bin/perlI did not comment out the cgi-script .cgi .pl line since that doesn't use perl I don't think... and when I used the commented line below it.. perl-script .cgi .pl it just prints out the text of the file.... Not sure how ASP makes use of perl. But yeah.. the problem has to do with something with cgi-script. |
Please check the line-endings in your script files as I suggested a few posts back. The fact that your Perl script didn't work from the command-line strongly suggests that this is the problem.
|
it still doesn't work.. plus test.pl executes from terminal.. but it doesn't work in browser... still error 500..... jeez... It's never gonna work... it seems to choke on the cgi-script handler.... Also... With WebSTAR V.. I get errors with cgi files also (not sure which since no errors folder exists.. most likely 500 still.... and it has its own cgi plug-in. :( :confused: :eek: :mad:
|
Anyone know?
|
| All times are GMT -5. The time now is 02:26 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.