Mac Php problems
June 4, 2006 6:00 PM   Subscribe

I messed up an Apache 2/PHP installation of my Mac OX 10.4, and need help figuring out what to do next

I had Apache/PHP/MySQL running just fine on my Mac, but then when I couldn't get a PHP file to display, starting tinkering with the httpd.conf file. I still couldn't get things working, so tried doing a 'clean' reintall from the serverlogistics page. When that failed, I tried reinstalling from the PHPMAC site. The apache installed properly, but PHP failed. And on and on...

So I'm trying to figure out what to do? Start from scratch (reinstall Tiger?) or pull some magic out of a hat. My http://localhost/ gives me an Apache startup screen, but my test.php file doesn't work.

What to do next?
posted by dvjtj to Computers & Internet (7 answers total)
 
I've always had good luck with Marc Liyanage's PHP packages for Mac.
posted by jay.jansheski at 6:09 PM on June 4, 2006


Apache 2 and PHP (and subversion and you name it) is easy to install with darwinports. If you screw something up you can always uninstall, clean and reinstall from dp very easily.
posted by schwa at 6:23 PM on June 4, 2006


What errors do you see in the Console utility? Usually this will indicate exactly what is wrong — like the php module isn't loaded, for example.
posted by Mr. Six at 6:34 PM on June 4, 2006


Response by poster: The console said that php couldn't configure, a message about a library. I don't have the log file handy, but it got through just fine until the very end.
posted by dvjtj at 7:01 PM on June 4, 2006


I don't know what you mean by "got through just fine until the very end." If you can post the error, that would definitely help with troubleshooting.

Failing that, jay-jansheski's suggestion is excellent; Liyanage's PHP installer packages are largely hands-off and are pre-compiled with a wide range of useful libraries. Just double-click and go.

I wouldn't recommend darwinports unless you're comfortable with the command line.
posted by Mr. Six at 7:41 PM on June 4, 2006


I use MAMP for all my PHP dev on Mac OS X. It's an all-in-one installer that puts all the pieces you need in a single folder and does not scatter them about the directory structure. It's very portable, plus you can manage all your files in the Finder rather than in the command line. You could easily just install it, copy over the PHP you're working with to the web root of MAMP, and there's a very good chance it will just work.
posted by Mo Nickels at 7:36 AM on June 5, 2006


Firstly, make sure that the PHP module loads during the server startup. You should be able to see this is error_log (by default, this is located at /var/log/httpd/error_log). `tail -f`this file while you stop/start your server.. it usually gives some good suggestions about what's going on?

What error messages does the server show (if any) when you go to your test page? What do the logs say? I'd be happy to help out more if you wouldn't mind posting some of that.
posted by triolus at 10:12 PM on June 5, 2006


« Older Just One Drive, Thanks   |   so much for NAFTA Newer »
This thread is closed to new comments.