Skip to main content
Participant
September 11, 2006
Question

PHP on Mac

  • September 11, 2006
  • 2 replies
  • 427 views
What's the trick to getting php files to show up in preview mode in DW8, 8.02 on a Mac? It only displays code.

I've done all this in the httpd.conf file:

_________
Locate the 4 lines:

#LoadModule php4_module
#AddModule mod_php4.c
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps


Use your arrow keys to navigate the document and remove only the pound signs "#". The best way to navigate is to use the DOWN arrow key and stay to the left Side of the document. To remove the pound sign, hit the right arrow to the right Of the sign and then hit the DELETE key.

Warning: Only remove the pound signs!! Keep the lines of code where they are and do not relocate them!! You have been warned!

The changed lines should look like this:

LoadModule php4_module
AddModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Thanks,

Phil
This topic has been closed for replies.

2 replies

Participant
May 8, 2008
You might want to check out Mamp (mamp.info), I used to use the entropy downloads, but Mamp is much easier to use, it's a simple install, can change version of php running, auto installs mySql, etc.

If you are only getting code showing you likely don't have php running, try and save a text file with <? echo phpinfo(); ?> in and getting that to display the php stats.
Inspiring
September 11, 2006
Philip Bauman wrote:
> What's the trick to getting php files to show up in preview mode in DW8, 8.02
> on a Mac? It only displays code.
>
> I've done all this in the httpd.conf file:

It sounds as though you are trying to use the preinstalled version of
PHP that comes with OS X. It's extremely basic and you would be better
off installing one of the Mac PHP packages from www.entropy.ch.

However, if you want to try the preinstalled setup, you also need to
turn on Personal Web Sharing in the Sharing section of System
Preferences. Store all PHP files in a subfolder of the Sites folder of
your home folder, and define the testing server in your Dreamweaver site
definition.

Server model: PHP MySQL
Access: Local/network
Testing server folder: Macintosh HD:Users:username:Sites:siteName:
URL prefix: http://localhost/~username/siteName/

Replace "username" with your own Mac username.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Participant
September 11, 2006
I did have Personal Web Sharing sharing on and working. I installed the php package you mentioned and now apache is not working and Personal Web Sharing won't fire up, it stalls and now apache is not working. How do i fix this?

Phil