View Single Post
torifile
Less than Stellar Member
 
Join Date: May 2004
Location: Durham, NC
Send a message via AIM to torifile  
2004-07-12, 19:41

I've gotten it to work on my G5. I can't remember how I did it but lemme try to find it.

Here is what I found:

Quote:
pache


Still in terminal, we need to edit our Apache config file. We are basically going to allow for cgi scripts to be executed on the Mac. By default CGI Scripts are located in /Library/WebServer/CGI-Executables/. We need to uncomment the line in the httpd.conf file that reads # AddHandler cgi-script .cgi. I am going to explain how to do it using the vi text editor, but you are more than welcome to use your favorite editor of choice.




sudo vi /etc/httpd/httpd.conf

Go down to the line we want to edit

Remove the # AddHandler by pressing the x key.

:wq

sudo apachectl graceful



The last command simply restarts the apache server without having to restart your system. Oh, the power of Unix.


Perl Modules


Before we can install the DBI and DBD modules, we need to edit a Perl configuration file deep inside OS X to allow the modules to compile. The bug was discovered after OS X was sent to manufacturing, so the only way to repair it at the moment is in the command line.


sudo vi /System/Library/Perl/5.8.1/darwin-thread-multi-2level/Config.pm

Change ld='MACOSX_DEVELOPMENT_TARGET=10.3 cc' to ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'



Now that we have fixed one of the few shortcomings of Panther, we can get back to work.


Remember that we downloaded the DBI and DBD files earlier. I had them unzipped to my desktop, but you can easily alter these commands to match the location you saved the files.


cd ~/Desktop/

pushd DBI-1.30

perl Makefile.PL

make

make test

sudo make install

popd



pushd pushes a directory name onto the directory stack. popd removes the element from the stack. Other than that, it is just simply compiling the DBI module and installing it onto the system. Simple stuff.


pushd DBD-mysql-2.1028

perl Makefile.PL

perl -pi -e's/MACOSX/env MACOSX/' Makefile

make

make test

sudo make install

popd



Now that we have our perl modules setup, we can celebrate. We are over halfway to our goal!
The directions said to make a change to the perl config file, but I didn't need to do that. HTH.
  quote