Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PHP on Mac

Community Beginner ,
Sep 11, 2006 Sep 11, 2006
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
TOPICS
Server side applications
428
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2006 Sep 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/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 11, 2006 Sep 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2006 Sep 11, 2006
Philip Bauman wrote:
> 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?

Sorry to hear that. The best place to get assistance with Marc
Liyanage's PHP packages is in the forum that he hosts at www.entropy.ch.

Some obvious questions, though. Did you download the correct package for
your version of Apache and OS X? Have you kept your version of OS X up
to date with all the Mac software updates?

FWIW, I have used Marc's packages without problem for more than two
years, installing them on both OS 10.3 and 10.4, and usually updating
whenever a new version is released.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 11, 2006 Sep 11, 2006
The OS is up-to-date. I've downloaded apache 2.0.59. Should I install this (how?) or reinstall OsX? WHere do I check the version for Apache?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2006 Sep 11, 2006
Philip Bauman wrote:
> The OS is up-to-date. I've downloaded apache 2.0.59. Should I install this (how?) or reinstall OsX? WHere do I check the version for Apache?

You don't need a new version of Apache. The default version in OS X is
perfectly adequate, and is most likely to be Apache 1.3. You can check
which version is installed by opening a Terminal session (in
Applications > Utilities) and typing the following at the command prompt
(followed by Return):

httpd -v

You should see something like this:

Server version: Apache/1.3.33 (Darwin)

Marc Liyanage creates different versions of the PHP Mac package for
Apache 1.3 and 2.0. It sounds as though you have downloaded and
installed the wrong one. With luck, downloading the correct one and
installing it over the top of what you already have should do the trick.
Otherwise, you need to get advice from the forum at www.entropy.ch.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 08, 2008 May 08, 2008
LATEST
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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines