Help: Enable PHP on Mac Server

Started on the old forum in October 2010 · view the original in the archive · old links redirect here

5 replies · 466 views · started 16 years ago · 1 min read

4 participants
Mysterio Lead · 630 posts #1

My friend is developing an application which needs to be tested on Mac Server.

When trying to browse a .php file in browser, it's not being executed, it's just like a text file.

In the readme.txt of the application (which is open-source) is written: Enable PHP on Mac Server.

What does this currently mean and how to solve it?

Thanks!

mysterio.al - programming is a functional art

Mysterio Lead · 630 posts #3

Thanks for your answer!

It is installed, but still not working. Seems not configured! What can be the next step?

mysterio.al - programming is a functional art

MuniGod Junior · 23 posts #6

Mysterio3 wrote: My friend is developing an application which needs to be tested on Mac Server.

When trying to browse a .php file in browser, it's not being executed, it's just like a text file.

In the readme.txt of the application (which is open-source) is written: Enable PHP on Mac Server.

What does this currently mean and how to solve it?

Thanks!

PHP is included on Macs with OS X version 10.5+ (Leopard), but it's not enabled by default. You have to access the main Apache configuration file and comment out a line of code in order to get PHP going. This file is called http.conf, and is a hidden file located down inside the Apache install folder. You're looking for the following line of code, which has a pound symbol (#) in front of it to comment it out:

#LoadModule php5_module libexec/apache2/libphp5.so

You need to remove the pound symbol and restart the server to enable PHP. The http.conf document is owned by "root," which means you'll have to enter your password to change it. You'll probably also want to tweak the php.ini file so that Apache uses it. For more detailed information about how to carry out these steps and enable PHP, visit Enabling PHP in Mac OS X 10.5 .

www.wapruby.com - Create your own WAP site and earn money.

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close