How can I view dynamic php pages developed locally

weknowjack

Registered
I am customizing Zen Cart templates using Dreamweaver on my Mac OSX 10.4.9 machine. Is there a way to see the effects of the php driven format changes without loading a server environment on my Mac or putting the page up on a php host server setup? I don't really need it to connect to the database yet, although at a later dev stage it would be necessary. Just the cosmetic stuff for now. I can make and see the css changes, but some of the font, layout and spacing is done in the php.

I looked at MAMP, but is that the only other option besides putting the pages on the server after each edit?
 
The php server environement is already installed on a iMac, look at the threads in this forum, there is one detailing how to activate it on Tiger. As per Leopard I think it already is activated.

Also place calls to the php pages using localhost/...
 
I read the thread and it's still fuzzy to me. When you say 'built in' do you mean I do not need to download/install Mac OSX Server on my just-updated OSX 10.4.11 Mac first?

Second, what do I open to do the activation? I read an Apple doc that said to open "Server Admin" --- where is that? Here's what it says:

For 10.3 or later

1. Open Server Admin.
2. Select the Web service from the desired server in the Computers & Services list.
3. Click on Settings.
4. Click Modules.
5. Enable or disable the php4_module as desired.
6. Save the changes.
7. Restart the Web Service.​

Apple also refers to and Mac OSX Server web site, but provides no link.
 
The thread says :

1. open terminal
2. type "open -e /etc/httpd/httpd.conf" this will textedit the httpd.conf file
3. search for "php"
4. remove the # before php line
5. repeat steps 3 and 4 as required
6. search for "<IfModule mod_dir.c>"
7. add index.php after index.html
8. save the changes
9. restart apache using "sudo apachectl start"
 
Try Headdress.

Or Patrick Gibson's terrific virtual hosts script .

There are any number of ways to set up serving yourself, so to speak. Maybe you know PHP well enough to try I find that too many little things can go wrong or can be forgotten.

Also: MAMP. A whole great package, incl. PHP, also free.

These all have the advantage of ... actually working.
 
Back
Top