|
|
perl cgi on Jaguar
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
I know this has probably been covered before, but I can't seem to find it in a search. How do I deploy perl scripts to the Mac OS X apache server? I am trying to install YaBB and have copied all the necessary cgi files to /Library/WebServer/CGI-Executables, and the static content into /Library/WebServer/Documents. I did all the chmod's as they suggested, and uncommented the LoadModule perl stuff in httpd.conf. After restarting the web server I get error 500 when I try to load the YaBB.pl script through http://host/cgi-bin/yabb/YaBB.pl. The apache error log says:
Code:
[Thu Mar 18 00:31:39 2004] [error] (2)No such file or directory: exec of /Library/WebServer/CGI-Executables/yabb/YaBB.pl failed
[Thu Mar 18 00:31:39 2004] [error] [client 192.168.1.44] Premature end of script headers: /Library/WebServer/CGI-Executables/yabb/YaBB.pl
I ran perl -wc YaBB.pl and got this output:
Code:
[x:/Library/WebServer/CGI-Executables/yabb] perl -wc YaBB.pl
Name "main::language" used only once: possible typo at YaBB.pl line 33.
Name "main::yyIIS" used only once: possible typo at YaBB.pl line 23.
Name "main::username" used only once: possible typo at YaBB.pl line 57.
Name "main::guestaccess" used only once: possible typo at YaBB.pl line 57.
Name "main::settings" used only once: possible typo at YaBB.pl line 55.
Name "main::YaBBversion" used only once: possible typo at YaBB.pl line 19.
Name "main::YaBBplver" used only once: possible typo at YaBB.pl line 20.
YaBB.pl syntax OK
I can't seem to make any more headway. Are there any suggestions?
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Feb 2001
Location: Folsom, CA USA
Status:
Offline
|
|
Hmmm. That error means that Apache is not happy with the headers that the CGI is generating.
What happens when you actually execute the perl program?
Post that output, and let's see what we'll see!
This could *easily* be a permissions problem. I seem to remember that YaBB needs an area to write files into. If this is the case, does the user that Apache runs as (not sure right now) have write permissions on the areas that it needs to read and write from?
|
--
-- Tom Mornini
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
This is what I get when I execute the YaBB.pl script as root:
Code:
[x:~] sudo perl /Library/WebServer/CGI-Executables/yabb/YaBB.pl
Password:
Can't locate Settings.pl in @INC (@INC contains: /System/Library/Perl/darwin /System/Library/Perl /Library/Perl/darwin /Library/Perl /Library/Perl /Network/Library/Perl/darwin /Network/Library/Perl /Network/Library/Perl .) at /Library/WebServer/CGI-Executables/yabb/YaBB.pl line 32.
The settings file is in the same directory - I wonder why there is a problem? I chowned all the files to root:admin because I didn't know what else to make them.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
I seemed to get a step farther. I went into the YaBB.pl script and hard-coded the absolute paths to the Settings and language files and that at least got it to start. I don't know if it is fully functional yet, but we will see.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Make sure you don't use a text editor that generates unwanted line feeds (such as pico), or you'll mess up the script.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Originally posted by besson3c:
Make sure you don't use a text editor that generates unwanted line feeds (such as pico), or you'll mess up the script.
Pico is really irritating that way - but not enough to make me suffer with vi just yet. I had to disable email verification because I couldn't find an SMTP server that I could use, but it seems to be working fine otherwise.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally posted by absmiths:
Pico is really irritating that way - but not enough to make me suffer with vi just yet. I had to disable email verification because I couldn't find an SMTP server that I could use, but it seems to be working fine otherwise.
It's pretty easy to enable sendmail and use your localhost as a SMTP server.
I suggest looking into emacs. Control X + Control S saves a file, Control X + Control C quits emacs, Control A moves to the beginning of a line, Control E moves to the end, Control K cuts a line. The latter 3 commands are pretty generic Unix shell commands.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Originally posted by besson3c:
It's pretty easy to enable sendmail and use your localhost as a SMTP server.
I suggest looking into emacs. Control X + Control S saves a file, Control X + Control C quits emacs, Control A moves to the beginning of a line, Control E moves to the end, Control K cuts a line. The latter 3 commands are pretty generic Unix shell commands.
I found another thread which gave the steps for enabling the local SMTP server, but that didn't do me any good since quite a few mail hosts required reverse DNS for it to work and so they wouldn't accept my mail.
I didn't want to, but I just disabled email registration for now.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Originally posted by absmiths:
Pico is really irritating that way - but not enough to make me suffer with vi just yet. I had to disable email verification because I couldn't find an SMTP server that I could use, but it seems to be working fine otherwise.
pico -w should fix that
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|