Hi,

How do I test Perl scripts in a web browser on a mac? Im using OSX 10.4.11. Ive got some documentation on how to edit the /etc/httpd/httpd.conf file, but its read only for some reason (even though Im on my own laptop).

I also run MAMP and thought that if I configured the /mamp/conf/apache/httpd.conf file instead then I could test Perl scripts through hhtp://localhost:8888/ instead, but when I play around with that file it tends to crash mamp or not run the perl script.

Any help at all will be HUGELY appreciated as im losing my hair over this.

Cheers
Brad

change the httpd.conf file from read only (I don't know how to do that on OSX) so you can edit it.

ive tried that using

chmod 744 httpd.conf

on the command line in Terminal but all I get is "operation not permitted".

ask on an OSX forum what the problem is. I don't know anything about OSX. After you get the read only problem fixed you should be able to get apache configured correctly. Sorry I can't be of more help.

Thanks. Yep apple discussions helped me figure it out.

I finally configured the MAMP Apache httpd.conf file correctly (3rd party so no help in configuring the file from apple, but they helped with what steps to take overall).

Also, for OSX users reading this, I was using the wrong shebang - correct shebang for Macs in your Perl script is either:

#!/usr/bin/perl

or

#!/usr/bin/env perl

Thread available to read on http://discussions.apple.com/forum.jspa?forumID=728&start=0 if anyones interested title - Perl Testing.

This article has been dead for over six months. Start a new discussion instead.