Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
At a minimum, all you need to do is following the instructions under Apache in the URL you shared, in order to enable Apache (the web server) and (in step 3 under the Apache instructions) to enable Apache to use PHP.
 
Can't get it to work.
 

Attachments

  • Screen Shot 2014-02-03 at Mon, Feb 3, 2.17 PM.png
    Screen Shot 2014-02-03 at Mon, Feb 3, 2.17 PM.png
    13.6 KB · Views: 326
  • Screen Shot 2014-02-03 at Mon, Feb 3, 2.18 PM 1.png
    Screen Shot 2014-02-03 at Mon, Feb 3, 2.18 PM 1.png
    69.2 KB · Views: 246
  • Screen Shot 2014-02-03 at Mon, Feb 3, 2.18 PM.png
    Screen Shot 2014-02-03 at Mon, Feb 3, 2.18 PM.png
    273.8 KB · Views: 217
If you are struggling, you could simply install MAMP and be done with it. I know PHP it comes with macs, but MAMP makes it so much easier to run PHP. It is free, easy to get up running, and then you have something easy for future use.
 
If you are struggling, you could simply install MAMP and be done with it. I know PHP it comes with macs, but MAMP makes it so much easier to run PHP. It is free, easy to get up running, and then you have something easy for future use.

+1 for MAMP, I am a web developer and it is great for quick php testing, I would also suggest setting up symbolic links to your website file(s) in the MAMP htdocs folder so that you dont have to work out of that folder - you can work out of any folder (documents, etc.) it is much easier than setting up an entire php/apache test server on your mac
 
I installed and ran MAMP, but I can't select PHP extension files to open in Safari.

Check these things out and see if something is wrong or if you are getting errors. You were pretty vague in your response.

There could possibly be a setting on your ports that is wrong. The other thing is to make sure MAMP is turned on and connected. One other thing to check is that you paths are correct and your files are in the proper place.

I am not an expert with this, but know these sre some of things that can cause problems.
 
I'm not receiving errors. What I mean is that there's no way to open (I don't mean parse) the file itself. File > Open file does not allow me to select a file with a PHP extension, for example.
 
I'm not receiving errors. What I mean is that there's no way to open (I don't mean parse) the file itself. File > Open file does not allow me to select a file with a PHP extension, for example.

You are trying to open these files in a web browser right, you dont actually open anything in MAMP.
 
Yes. Notice that the PHP file is grayed out.
 

Attachments

  • Screen Shot 2014-02-12 at Wed, Feb 12, 5.13 PM.png
    Screen Shot 2014-02-12 at Wed, Feb 12, 5.13 PM.png
    258.3 KB · Views: 318
Yes. Notice that the PHP file is grayed out.


You cannot open it that way, MAMP creates a fake server on your computer but the files you are trying to open are not in the servers directory open a terminal window and type:

ln -s /Users/jasonsiegel/Dropbox/ /Applications/MAMP/htdocs/rand

This creates a symbolic link from your dropbox to the server's directory.

Make sure mamp is running and navigate your browser to http://localhost:8888/
 
Sometimes my script doesn't appear to run. It usually uses a header redirect send me to a particular homepage, but sometimes it just gets stuck. If it's not my script, why is it freezing?
 

Attachments

  • Screen Shot 2014-02-16 at Sun, Feb 16, 12.55 PM.png
    Screen Shot 2014-02-16 at Sun, Feb 16, 12.55 PM.png
    20.8 KB · Views: 173
Sometimes my script doesn't appear to run. It usually uses a header redirect send me to a particular homepage, but sometimes it just gets stuck. If it's not my script, why is it freezing?

Are you sure it is not an issue with your browser, did you try another one? I would make sure that you dont have any browser addons or anything installed. If you post the script I/we could take a look at it.
 
Sometimes my script doesn't appear to run. It usually uses a header redirect send me to a particular homepage, but sometimes it just gets stuck. If it's not my script, why is it freezing?

You can check the headers you page is sending in Safari by right clicking > Inspect Element and going to the network tab (I don't have a mac nearby, so the options may be named slightly differently), or using a tool like curl.

If your PHP page isn't displaying errors (although I'd expect it to since MAMP is for development), you may need to force PHP to display errors (error_reporting(E_ALL)) or look at your apache logs.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.