Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Best application to run PHP on your mac?

Best application to run PHP on your mac?
Thread Tools
Source
Junior Member
Join Date: Sep 2004
Status: Offline
Reply With Quote
Sep 20, 2007, 09:58 AM
 
Hi all,

I need an application to run PHP directly on my mac. Anybody have any suggestions?

Thanks!
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 20, 2007, 10:27 AM
 
Apache.

If this answer sounds dickish, I apologize, but I suspect that there is a gap in understanding here somewhere.
     
Big Mac
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Sep 20, 2007, 11:08 AM
 
Maybe a tutorial like this one will help.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
nonhuman
Posting Junkie
Join Date: Jun 2001
Location: Baltimore, MD
Status: Offline
Reply With Quote
Sep 20, 2007, 11:41 AM
 
What exactly are you talking about? PHP comes pre-installed on your Mac. Write a script in php, make it executable, then execute the script (if you're in the same directory use ./script.php replacing 'script.php' with the name of your script).
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 20, 2007, 12:05 PM
 
Originally Posted by nonhuman View Post
What exactly are you talking about? PHP comes pre-installed on your Mac. Write a script in php, make it executable, then execute the script (if you're in the same directory use ./script.php replacing 'script.php' with the name of your script).
Actually, to execute the script in the command line you would do:

php /path/to/script

otherwise, it will try to execute the script as a shell script, which would just produce an error.
     
nonhuman
Posting Junkie
Join Date: Jun 2001
Location: Baltimore, MD
Status: Offline
Reply With Quote
Sep 20, 2007, 12:12 PM
 
Originally Posted by besson3c View Post
Actually, to execute the script in the command line you would do:

php /path/to/script

otherwise, it will try to execute the script as a shell script, which would just produce an error.
Not if you include the '#!/usr/bin/php -q' (default location for a Mac) statement at the top.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 20, 2007, 12:20 PM
 
Originally Posted by nonhuman View Post
Not if you include the '#!/usr/bin/php -q' (default location for a Mac) statement at the top.

True... However, wouldn't this pose problems with creating custom script headers?
     
sushiism
Grizzled Veteran
Join Date: Jun 2002
Location: UK
Status: Offline
Reply With Quote
Sep 20, 2007, 06:11 PM
 
     
tomrock
Dedicated MacNNer
Join Date: Mar 2001
Location: Indianapolis, IN USA
Status: Offline
Reply With Quote
Sep 21, 2007, 08:20 AM
 
Here's an article on turning PHP on with Tiger: PHPmac - Enabling Apple's Supplied PHP in OS X 10.4 Tiger

Even though the article is old, it works just fine.
     
kelso
Forum Regular
Join Date: Oct 2006
Location: Markleville, IN
Status: Offline
Reply With Quote
Sep 21, 2007, 10:11 AM
 
Originally Posted by sushiism View Post
The best solution has been mentioned. MAMP is amazing.
     
zro
Mac Elite
Join Date: Nov 2003
Location: The back of the room
Status: Offline
Reply With Quote
Sep 21, 2007, 10:33 AM
 
Be aware that the Apple build is not very feature rich. No image libraries, for instance.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 21, 2007, 10:56 AM
 
Originally Posted by kelso View Post
The best solution has been mentioned. MAMP is amazing.

I disagree. The best solution would be something like apt-get and the way it is integrated into Ubuntu where it would automatically notify you of an update available, and when requested, download and install the update leaving your config files intact and automatically restarting the server for you.

The closest we have to this is MacPorts, but last I checked it won't restart the server for you. Seeing how it is a source based package management system, it also requires XCode and the time to build the updates too (plus having to retrieve the updates and check for outdated versions of your ports).
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 21, 2007, 10:57 AM
 
Originally Posted by zro View Post
Be aware that the Apple build is not very feature rich. No image libraries, for instance.
Also outdated. Last I checked they were bundling an older version of PHP 4. There are some PHP 5-only functions such as htmlspecialchars_decode(), and PHP 4 is now being retired.

This is yet another pretty bizarre example of "what are you trying to do here, Apple?"
     
sushiism
Grizzled Veteran
Join Date: Jun 2002
Location: UK
Status: Offline
Reply With Quote
Sep 22, 2007, 01:11 PM
 
Originally Posted by besson3c View Post
I disagree. The best solution would be something like apt-get and the way it is integrated into Ubuntu where it would automatically notify you of an update available, and when requested, download and install the update leaving your config files intact and automatically restarting the server for you.

The closest we have to this is MacPorts, but last I checked it won't restart the server for you. Seeing how it is a source based package management system, it also requires XCode and the time to build the updates too (plus having to retrieve the updates and check for outdated versions of your ports).
Drag and drop beats this
MAMP and Locomotive (For ROR) are the way to go
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 22, 2007, 01:37 PM
 
Originally Posted by sushiism View Post
Drag and drop beats this
MAMP and Locomotive (For ROR) are the way to go
How is that an improvement to what I've described?
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:00 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,