Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / January 2006



Tip: Looking for answers? Try searching our database.

Perl & web server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lou Rosinski - 11 Jan 2006 00:39 GMT
I can execute a Perl script in the terminal (MacOSX) but cannot get that
same Perl script to execute on a browser (ie Safari).  I can upload that
same script to my virtual Unix server and it executes just fine there.

I suspect the problem is the Apache config on my Mac but have researched and
made changes but to no avail.
John Horner - 11 Jan 2006 00:42 GMT
> I suspect the problem is the Apache config on my Mac but have
> researched and
> made changes but to no avail.

We're going to need more details!

Is the web server running?

Where is the script you're trying to run located?

How are you trying to get it to run in a browser, i.e. what URL are you
browsing?

What are its permissions?

What are its line-breaks?

What happens when you browse it?
Joel Rees - 11 Jan 2006 00:50 GMT
> I can execute a Perl script in the terminal (MacOSX) but cannot get
> that
[quoted text clipped - 5 lines]
> researched and
> made changes but to no avail.

I have perl running cgi on my ancient Jaguar box, and it runs just
fine. I have not configured mod-perl because I haven't had enough time,
but many here have.
John Delacour - 11 Jan 2006 01:30 GMT
>I can execute a Perl script in the terminal (MacOSX) but cannot get that
>same Perl script to execute on a browser (ie Safari).  I can upload that
>same script to my virtual Unix server and it executes just fine there.
>
>I suspect the problem is the Apache config on my Mac but have researched and
>made changes but to no avail.

I installed Apache 2 at the weekend and had to work out how to get
things configured.  Here's what I ended up with in httpd.conf
(/usr/local/apache2/conf/httpd.conf).  You'll need to read the whole
file carefully, but even with my strong disinclination to prolonged
concentration I didn't find it too difficult once I'd set my mind to
it.

You need to stop and restard the server after every change, of course.

# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
#####<Directory "/usr/local/apache2/cgi-bin">
<Directory "/users/jd/sites/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
<Directory "/users/jd/sites/.../.../.../cgi-bin">
    AllowOverride None
    Options None ExecCGI
    Order allow,deny
    Allow from all
</Directory>
Joel Rees - 11 Jan 2006 04:00 GMT
> # "/usr/local/apache2/cgi-bin" should be changed to whatever your
> ScriptAliased
> # CGI directory exists, if you have that configured.
> #
> #####<Directory "/usr/local/apache2/cgi-bin">
> <Directory "/users/jd/sites/cgi-bin">

This one I think I understand. (I assume your file system is not set up
case sensitive?)

Except

>     AllowOverride None
>     Options None

This

>     Order allow,deny
>     Allow from all

and this look kind of weird together, in reference to the directory
name. Am I missing something?

> </Directory>
> <Directory "/users/jd/sites/.../.../.../cgi-bin">

That path looks kind of unusual. I don't often see directories named
"...". Is it something Apache does that I've either never seen before
or forgotten?

>     AllowOverride None
>     Options None ExecCGI
>     Order allow,deny
>     Allow from all
> </Directory>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.