Help - Search - Members - Calendar
Full Version: MySQL/PHP locally
Invision Power Services > Community Forums > Community Web Design and Coding
Sauren
What's the best way to go about installing PHP/MySQL on my computer? I'm using Mac OS X if that makes much of a difference.

I believe it has Apache installed (at least I think I saw that somewhere).

Any help would be appreciated, thanks. blushing.gif
Rikki
It's really really simple - just get PHP from here and install it from the disc image, and follow the instructions here for setting up MySQL.

As you said, Apache is built into OSX, but you need to turn it on if you haven't done so. Go into system preferences -> Sharing, and enable Personal Web Sharing.
Brendon Koz
Does he keep those images up-to-date with each new PHP revision (or at least semi-updated)?

If so, I'll link our network/server administrator to this site as he will need to reinstall Mac OS X once again (attempt #4 at him f***ing it up, I believe).
Sauren
Did I do something wrong with the installation of PHP. I did that test outlined there (with the test.php file), but when I go to it in my browser, it only shows up as:

<?php phpinfo() ?>

Did I miss something? I think I did everything right. Haven't tried install MySQL yet. wassat.gif
Grant
PHP isn't installed. Make sure you installed the correct version. I remember I had similar issues. I ended up reinstalling PHP again to have it work.
Sauren
Hm... it keeps giving me a "There were errors installing the software" every single time I try to install it. This was with both PHP 4.3 and 5.1. Any ideas? It seems to happen at the end right before it finishes installing. pinch.gif
Rikki
Are you installing the right version? You need to get a version for Apache 1.3 (which is what OSX has), not Apache 2.
Sauren
QUOTE(Rikki @ Mar 15 2006, 01:13 AM) *
Are you installing the right version? You need to get a version for Apache 1.3 (which is what OSX has), not Apache 2.


Yeah, I made sure it was for Apache 1.3; I even redownloaded it again to be sure and tried to install it and it keeps giving me that problem.
Grant
The best thing I can tell you is installing it with Root Privlidges. This is something you should only do if the system gives you the problem described above. Here are some tips on enabling the root account:

http://www.spy-hill.com/~myers/help/apple/EnableRoot.html

Use the GUI method for NetInfo.. Then when you try to install and it asks for your username and password, put in the root account. Then after your finished and it installs successfully, then go back and follow the same directions to turn it off. You will see the menu item to turn the root account off.

Grant
Sauren
Blah, I give up. Tried that too and it keeps telling me that there was an error with the install. So much for working locally... getlost.gif
Grant
Hey, sometimes that doesn't work too... Don't give up just yet.

That didn't work for me either, but sometimes that works for some people. What I did to make it work was log every one else out of my computer ( usually by restart ) and then login as root and running the installation. Then if the install asks for the password, put in root again.

That should work. If that doesn't, Im out of ideas.
Sauren
Yep, giving me the now-usual "There were errors installing the software." Hm... I can't think of anything that may prevent it. It's a new laptop too. sad.gif
Grant
I dunno. I had the same issues when I installed it on my laptop, but it seems there is something that isn't getting run correctly.. I had similar issues as well, bt the root fix worked for me. I develop locally as well right now so I have no idea....

I will try and look into something for ya

Grant
Rikki
QUOTE(Sauren @ Mar 16 2006, 05:02 AM) *
Yep, giving me the now-usual "There were errors installing the software." Hm... I can't think of anything that may prevent it. It's a new laptop too. sad.gif


Ah-ha. New laptop... is it an Intel one? Just checked with Matt and he had the same problem. The PHP builds for Mac aren't compiled for Intel yet so that's why they won't work. Apparently Marc Linage is working on an Intel build, so you'll have to wait a little bit original.gif
Matt
Indeed. original.gif

You can compile it manually if you wanted to.

You could also build a spaceship and fly to the moon if you wanted to.

Both are beyond me.
Brendon Koz
Does it run under Rosetta?
Sauren
QUOTE(Rikki @ Mar 16 2006, 09:39 AM) *
Ah-ha. New laptop... is it an Intel one? Just checked with Matt and he had the same problem. The PHP builds for Mac aren't compiled for Intel yet so that's why they won't work. Apparently Marc Linage is working on an Intel build, so you'll have to wait a little bit original.gif


Yes. I bought the new one that came out: http://www.apple.com/macbookpro/

At least now I know it wasn't me. rolleyes.gif

QUOTE(Matt @ Mar 16 2006, 10:05 AM) *
Indeed. original.gif

You can compile it manually if you wanted to.

You could also build a spaceship and fly to the moon if you wanted to.

Both are beyond me.


Ha ha, alright. At least now I know it wasn't just me.


Thanks for everyone's input. At least now I know what the problem was. Now one more question: Would installing MySQL work? wassat.gif
Starnox
Yes: http://dev.mysql.com/downloads/mysql/5.0.html

Scroll down to OSX and you will see a x86 version.

Mac OS X 10.4 (x86)
K. T. Walrus
If you want the easiest PHP/MySQL/Apache development environment on Mac OS X, definitely download MAMP ( http://www.mamp.info ). This is the most "Mac-like" package that I have found. All developers on Mac OS X should be using this package.

Edit: Oops! I didn't read that you were using an Intel Mac. I think the developer of MAMP is working on an Intel Mac version, but I don't think it has been released yet. Maybe checkout the MAMP forums. Other Mac OS X developers using PowerPC based systems should definitely be using this package for local development. It is so simple to install and use as compared to installing the various pieces yourself.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.