You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Setting up PHP, MySQL, Apache on PB G4 for safe "developing" environment

I have a PB G4, 15" Alum:

OS: Tiger 10.4.11
CPU Type: PowerPC G4 (1.2)
Number Of CPUs: 1
CPU Speed: 1.67 GHz
L2 Cache (per CPU): 512 KB
Memory: 512 MB

Goal:
My objective is to create a safe and secure environment for building and testing an interactive web site on my PB G4. Ultimately, I will transfer files to a full-time server when the website is ready to go live; however, for my purpose, I want to enable a safe and secure writing and developing environment on my local PB G4.

To get there, I have to activate my Apache on my Tiger 10.4.11, and download (?) a version of PHP and MySQL. I believe I activated my Apache by turning ON the Web-sharing setting on my File Sharing, and the temporary Mac OS home page came up via http://localhost, indicating it is indeed ON. So far, so good. Now the tough part: If I understand correctly, PHP is not on Tiger 10.4.11, but is de-actively built in to Leopard 10.5.x, which I do not have.

Which brings me to: I could download from MAMP the complete suite, or, should I go to Leopard 10.5.x, or both?

Has anyone heard of MAMP? Will MAMP cause unforeseen problems or security issues??

Any suggestions or advise would be appreciated!

Thank you.

PowerBook G4, Mac OS X (10.4.11), 512 MB Ram

Posted on Dec 15, 2010 7:18 PM

Reply
2 replies

Jan 3, 2011 4:28 AM in response to G4 guy

Mac comes with a fully functioning Apache web server with all the scripting languages (except VB). You need to enable them in the configuration file.

You need some light weight UNIX administration skills to do this. Use the system restore disk to set the password for the root account.

Open a terminal screen from the Utilities folder in Applications. Type "su", press return, then enter the root password you set using the system restore disk.

Make a backup copy of the Apache configuration file with the following command (type this in with no mistakes and press the return key).

cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.copy

Enter the following to open the Apache configuration (type this in with no mistakes and hit the return key).

/Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/httpd/httpd.conf &

Locate and remove the # comment symbol from the following lines and save the file in /etc/httpd/httpd.conf.

#LoadModule php4_module libexec/httpd/libphp4.so
#AddModule mod_php4.c

Exit the TextEdit application and quit out of the terminal application.

Put the following web page into a file named greetings.php inside the folder Library/WebServer/Documents.

-------------
<html>
<head>
<title>Experiment</title>
</head>
<?php
echo "Greetings";
?>
</body>
</html>
-----------

Once you have made these changes, you can reboot to activate the changes.

Put the following into your browser to test the configuration.

http://localhost/greetings.php

You should see "Greetings" on a web page titled "Experiment".

MySQL is a separate server that you need to download and configure to complete your web server.

I hope this helps.

Best regards - Greg

Setting up PHP, MySQL, Apache on PB G4 for safe "developing" environment

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.