Feedback
Works great! Thanks.
fieg
September 21, 2009
#1
Thank you very much!
Dae
September 21, 2009
#2
Very simple, worked perfectly, thanks! One point, you can restart apache with just one command:
sudo apachectl restart
Nick
September 22, 2009
#3
Thank you Nick, that's fixed :)
Jérôme Jaglale
September 22, 2009
#4
Thank you very much!
Great tutorial.
Vik
September 30, 2009
#5
Awesome! Thanks for this extremely clear tutorial.
Boone
September 30, 2009
#6
Fantastic job! Easiest install tutorial seen yet, perfectly clear and concise!
zb
October 5, 2009
#7
Nice. Thanks!
Chris
October 7, 2009
#8
This is excellent! Thank you.
Tricia
October 10, 2009
#9
This is not an install! These are instructions to get the compiled and installed version on Snow Leopard started and working with PHP and MySQL. What's the difference you ask? Too much to explain here. These instructions only work on a fresh install of Snow Leopard.
ricbax
October 13, 2009
#10
Yes ricbax, a more accurate title would be "Start Apache, activate PHP and install MySQL on Snow Leopard" My apologies :)
Jérôme Jaglale
October 13, 2009
#11
Very nice. Do you have any pointers about how to get phpmyadmin working for those of us who like a graphical mysql database manager?
Thanks,
-Luc
Luc
October 13, 2009
#12
Good Good Good Good Good Good !!!
thx
Charles
October 16, 2009
#13
Thanks! This was very helpful.
Jonah
October 19, 2009
#14
Thanks, Works great!
Johan
October 20, 2009
#15
When trying to enable the mysql prefpane I get a message that System Preferences has to restart – this because the MySQL.prefPane is a 32-bit app.
Found an alternative version of the app for Snow Leopard here that solved the issue: http://www.swoon.net/site/software.html
Johan
October 20, 2009
#16
This is NOT INSTALLING ! This is ENABLING...
Thanks for the misleading title.
Grb0
October 23, 2009
#17
Perfect!
It's the first time that I can end with sucess.
So, how to I creat an url like:
marciotoledo.local/ and this open and website on folder?
Thanks.
Marcio Toledo (mntoledo@gmail.com)
October 23, 2009
#18
Trying to open httpd.conf file to uncomment the php line and having trouble as it is a root file?
This tutorial may help..
http://www.anujgakhar.com/2009/01/19/how-to-edit-httpdconf-on-macos/
Teej
October 24, 2009
#19
Great! Worked like a dream!
Samuel
November 5, 2009
#20
Thanks!!...i was having problems installing mysql. all got resolved
Konix
November 5, 2009
#21
thanks for being so informative! helps a lot.. also the way it's written.. So pleasant to follow!
Big thanks!
Ed
November 7, 2009
#22
perfect. Thanks.
November 9, 2009
#23
Worked perfectly. Thanks
David
November 11, 2009
#24
straight to the point, really good
decarola
November 15, 2009
#25
Thanks a lot
Vasily
November 15, 2009
#26
Simple steps. Great job. Thanks a lot
Saud
November 17, 2009
#27
thanks a gig!
otsy
November 18, 2009
#28
This worked great, until I enabled short tags in my ini and then the date.timezone broke itself. anyone else having this issue?
morgan
November 20, 2009
#29
I also recommend enabling short tags; on Snow Leopard, they're off by default.
I was scratching my head for nearly an hour trying to get an old script to run, but it was short tags.
Ted
December 2, 2009
#30
You are a master!!!! Thanks!!!
Alex
December 6, 2009
#31
Very well written and concise. Much appreciated :]
Jeff
December 7, 2009
#32
God bless You! Grazie mille.
Francesco
December 14, 2009
#33
Fantastic, simple guide. Seconding PHPMyAdmin help!!
Thanks
December 14, 2009
#34
My thanks as well.
Guy
December 16, 2009
#35
Great Tutorial. I transferred my PowerBook G4 account to a new MacBook Pro with the Apple Migration Assistant application in the Applications>Utlities folder (and of course a firewire cable, ethernet works too). All the files including the MySQL DB transferred without me doing anything except this tutorial.
My MySQl folder from my old PowerBook G4 was called "mysql-5.0.37-osx10.4-powerpc". In the /usr/local/mysql-5.0.37-osx10.4-powerpc are all my Db's with the usernames and paswords. There was really nothing else but this tutorial to get me converted over.
Dang this is a life saver tutorial!!!!
Long Time PHP MySQL user - Matt
December 19, 2009
#36
Finally a simply & straight forward guide that works. Thanks.
e
December 24, 2009
#37
It's great to be able to search the web and find such clear (and correct) instructions. Thank you!
Beth
December 26, 2009
#38
I love you! :d
djalmaaraujo
December 28, 2009
#39
perfect
romeoracz
December 28, 2009
#40
Thank you, this was exactly what I was looking for!
samspencer.com
December 31, 2009
#41
Perfect !! Thank you !
jbuchanan7
January 4, 2010
#42
Easy tutorial! Thanks!
Plz add a note to change short_open_tag to On if php doesn't seem to work. I took me hours to solve that issue...
Peter Parker
January 6, 2010
#43
Wow, that worked a charm! Thanks for your clear and concise tutorial!
Paul
January 6, 2010
#44
You are wonderful!! I can't thank you enough for providing this clear, concise tutorial. Thank you, thank you.
Jane
January 20, 2010
#45
Thanks! All working nicely!
Gunther
January 27, 2010
#46
VERY Much appreciated - worked perfectly - thank you!
Jono
January 27, 2010
#47
Ditto! Gracias!
Julia
January 28, 2010
#48
Jerome, great stuff - could you please add two things for others like me, just to save them 10mins I spent fixing up afterwards?
First - it's worth putting both php.ini edits in the same block, or repeat the chmod lines etc?
Second - for those using ~/Sites/ instead of the root /Library/WebServer/Documents/ it would be worth adding the fix I found elsewhere on the web -for /etc/apache2/users/(username).conf for FollowSymlinks and Allow All?
My wordpress/php running nicely now thanks in no small part to you! Cheers.
Andrew Walker
January 30, 2010
#49
This was a great tutorial. Restores my faith in humankind!
Tommy
January 31, 2010
#50
Thank you so much for this concise and powerful article! It simplifies things for those of us who kinda know what we need to do, but don't remember the commands. I'm officially bookmarking this one!
Tyler Bird
February 8, 2010
#51
Superb! Just what is needed, with no fluff. Thank you!
Chuck McKinnon
February 10, 2010
#52
Hi,great guide. Ok I know I'm OT but i'm having this issue:
I'm behind a proxy on my college network, if i turn off the wifi and type "http://MyMacName" or "http://localhost" or "http://127.0.0.1" i got an error msg from firefox cause i'm offline. If i turn on airport and connect to the college network i got and error from the proxy "ERROR The requested URL could not be retrieved
". Really don't know what to do..I checked the hosts file but it seems ok (i should be correctly 127.0.0.1)
SAMM
February 11, 2010
#53
This is a perfect walk-through for someone who just wants to get this stuff working so they can move on with development. Thanks!
Simeon
February 11, 2010
#54
where and how do I install phpmyadmin? and anything I want to view needs to be put into the sites folder correct?
ScottNYC
February 12, 2010
#55
Hi, excellent guide! Thank you very much
NatMil
February 16, 2010
#56
Thanks for the tutorial. I found out that you can recently download a snow leopard version of mysql which is probably the same as the leopard version.
Imre
February 19, 2010
#57
Hi I have a corrupted installation of apache on snow leopard.
Anyone knows how to reinstall?
Please help
kappu
February 19, 2010
#58
Dude, you need a donation button.
Thanks!
Tom
February 20, 2010
#59
Quick tip : you need to set "short_open_tag = On" in /etc/php.ini if you want to use the short tag <? instead of <?php
I thought something was wrong until I edited my test.php page to use <?php
Now it works. I guess it's better to use the long php tags, but in case you don't it's good to know this little tip.
Some Guy
February 20, 2010
#60
Ummm...I'm a jackass...you did put a note there about the short tags...nevermind..
p.s. Great info here..thanks very much!
Some Guy
February 20, 2010
#61
Very nice - perfect instructions got me set up quickly. Thanks much!
Ray Wenderlich
March 1, 2010
#62
When I log in to http://localhost/ it states that the server cannot be found. Obviously there's something wrong with the Apache setup but I can't figure out where to look. Once that's up and running I should be able to get PHP and MySQL running... Anyone out there in the same boat?
BluemantisNY
March 2, 2010
#63
Simple et précis, bravo.
A l'essentiel tu nous à conduis ....
Merci
gderenge
March 12, 2010
#64
Loved this! Wish I had found it earlier!!
Girton
March 12, 2010
#65
use
sudo apachectl graceful
not
sudo apachectl restart
Voodoo
March 13, 2010
#66
Thanks for the tutorial.
baenre
March 15, 2010
#67
Thanks for this tutorial! It worked perfectly for me.
I was also having trouble getting phpMyAdmin working. I discovered that you need to update the socket for phpMyAdmin just as you did for php.ini. So edit config.inc.php like this:
change-- $cfg['Servers'][$i]['socket'] = '';
to-- $cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock';
I think you could probably do this in the regular phpMyAdmin setup menu too. I won't try it because I've got things running and I need to get back to work!
Adrienne Adams
March 18, 2010
#68
I cannot locate the /etc/... directory. Is this because I am not running Mac OS X Snow Leopard not Mac OS X Snow Leopard Server?
Ben
March 20, 2010
#69
Thanks for saving my time :)
@Ben: /etc and other unix like directories don't show up by default. You can open terminal by searching spotlight for "terminal" or opening /Applications/Utilities/Terminal.app
In Terminal, type "open /etc" (without quotes) and you have it.
Vang Le
March 23, 2010
#70
Useful info. Beautiful blog design. Good work.
Reiser
April 2, 2010
#71
WAHOO!! That was so helpful. Thanks for taking the time to publish this. Perfect for those of us just getting started.
Tyr
April 5, 2010
#72
Thank you for a very clear tutorial.
Niels Bom
April 6, 2010
#73
Very well written tutorial, thank you
Jhimac
April 7, 2010
#74
Well written and simple. Got me exactly where i wanted to. Thanks.
April 10, 2010
#75
Thanks for this very clear and concise tutorial.
I'm curious if it's just me and there's some setting I can change but when I try to access php files using http://localhost it just returns the code as plain text, however if I use my local ip address, or even 127.0.0.1 it returns the parsed output like it's supposed to.
Ryan Arana
April 10, 2010
#76
Great stuff!
Bert
April 12, 2010
#77
Thanks :)
I used just the mysql part of this tutorial, and it worked perfectly!
Now if the mysql people would just put the above short instructions in their README.txt
Asif
April 17, 2010
#78
Great! Quick and concise. Thank you.
April 18, 2010
#79
I get error messages in terminal , that error logs cannot be open acces denied. And the browsers loads without ever finding a page. Any ideas?
Tony
April 21, 2010
#80
Thanks for the reference. I like your blog by the way. Is this your own custom design and program?
websitedesignby.com
April 22, 2010
#81
Yes, except the HTML of the articles, with "SECTION" comments in the source, generated by DokuWiki.
Jérôme Jaglale
April 22, 2010
#82
Great straight-to-the-point installation instructions.
Thank you.
Lior Tamir
April 25, 2010
#83
Perfect instructions! Many Thanks!
Lucas
April 26, 2010
#84
You should also add that you will need to change DirectoryIndex to include...
DirectoryIndex index.htm index.html index.php
Tom Lynch
May 4, 2010
#85
Really really nice tutorial! Thanks
Philippe
May 5, 2010
#86
the 10.6 Mysql package is a tarball. is there an installer out there that i'm not aware of?
b_dubb
May 6, 2010
#87
Hi,
I think the install went ok, but where do I enter /usr/local/mysql/bin/mysql to test it?
Thanks,
Scott Gerling
May 9, 2010
#88
Useless.
groupadd mysql
command not found
what now?
grumpster
May 11, 2010
#89
FOUND IT, just needed to download the .dmg instead of the tarball.
grumpster
May 11, 2010
#90
Thanks a lot!
Roberto R.
May 11, 2010
#91
the 64 bit .dmg? or the 32 bit .dmg? which is best for 10.6?
b_dubb
May 13, 2010
#92
Very nice and handy, thank you.
I'll add a couple of things though:
1) add the mysql bin path to the PATH environment variable: edit (or create if it doesn't exist) the file .profile in your home directory, then add the following line:
export PATH=$PATH:/usr/local/mysql/bin
save and close. on the next terminal window you open, you should be able to enter mysql commands without specifying the full path (i.e. mysql, mysqladmin...)
2) set the password for the mysql root account. By default the mysql root account comes with no password, so it would be much safer to set one. Open the terminal and issue the following command:
sudo mysqladmin -u root password NEWPASSWORD
(or use /usr/local/mysql/bin/mysqladmin, instead of mysqladmin, if you didn't update the PATH as previously specified).
fabio cionini
May 17, 2010
#93
Nice - concise. thanks
ron hamermsa
May 17, 2010
#94
Excellent! Easy for anyone with a bit of command-line experience.
For B-dubb: Snow Leopard is 64-bit native, BUT, it really depends on the processor. Only Intel (but not the early ones) are 64-bit. See this Apple Doc:
http://support.apple.com/kb/ht3696
fdoc
May 19, 2010
#95
Great tutorial
Lots of thanks!
Federico Carol
May 20, 2010
#96
Thanks..:-)..
Alim Bolar
May 23, 2010
#97
a much easier way to add a path in OS X:
sudo sh -c 'echo "/usr/local/mysql/bin" > /etc/paths.d/mysql'
Elliot Betancourt
May 24, 2010
#98
Thanks! =)
Argent Ounce
May 26, 2010
#99
Great, straight forward.
@Elliot I've been looking for that line for ages.
sudo sh -c 'echo "/usr/local/mysql/bin" > /etc/paths.d/mysql'
Exactly what I've needed. The biggest advantage over using the .profile method, it also works when calling programs from within a shell script
Richard
May 26, 2010
#100
Excellent! Very helpful. Thank you very much.
Ed A
May 31, 2010
#101
Brilliant! I had been trying to use entropy and it tryed to download the php files rather than open them. I uninstalled entropy, did this and it worked! Thank you.
Tommy
June 1, 2010
#102
Everything is working fine, just one problem: I can't access my own MySQL with PHPMyAdmin. It asks for a password and I don't know what it want's… I never specified anything. Just installed as described above.
W. M.
June 3, 2010
#103
Thank you to you, God, Satan, Allah, Buddha, Ganesha and all the others out there that tried to foil/help me as I was the idiot trying to use the binaries, not the DMG-a stage five Arghh all day long. Working great - Props,
-Stu P. Didiot
Biff del Norte
June 8, 2010
#104
Where do I find my.cnf using this installation method? Not appearing in /etc
June 9, 2010
#105
I need help. PHPMyAdmin wants a username and password though I did not specify one.
W. M.
June 10, 2010
#106
THANK YOU !! THAT WAS HELPFUL
Wael
June 10, 2010
#107
This is excellent! Just said "Goodbye" to MAMP. That's a heavy shit, and a ridiculously wastage of memory when PHP and Apache are given with Mac OS itself!
VASUKi
June 11, 2010
#108
Parabens! (Congratulations!)
For this great doc.
Thanks a lot.
Thierry
June 17, 2010
#109
Thanks works like a charm,
Apart from that I also wanted to change my Document Root to somewhere on my desktop.
This wasn't too hard, all I had to do was sudo nano /etc/apache2/httpd.conf and replace all instances of the previous documentroot with my new path (2 instances)
But this made a Forbidden page come up when trying to access document root. No problem, wentback into httpd.conf, looked up User _www, changed it to User Elad (my account) and left the Group _www the same.
Everything works perfectly.
Ty for guide
Elad Nava
June 20, 2010
#110
Thanks!
Anoop J S
June 20, 2010
#111
I am new to the mac environment (less than 6 months) and this was the first time I was trying to host my very simple website on my server. You are a real lifesaver and I cannot thank you enough.
The real beauty of this page is in its simplicity.
May God bless you with many beautiful babies! :)
Zarrar Khan
June 23, 2010
#112
Thanks for the guide. I'm having a problem though.
When I enable PHP by uncommenting that line in httpd.conf, my VirtualHosts stop working. Any ideas why?
John
June 24, 2010
#113
Ah! Fixed it. I didn't realize the httpd.conf file couldn't have mid-line comments. I had changed this:
#LoadModule php5_module libexec/apache2/libphp5.so
...to this:
LoadModule php5_module libexec/apache2/libphp5.so #edited by John
...so that if anything went wrong I could easily find the line that I'd edited.
The tip is to open up Console and check if apache is giving you any errors (which it certainly was doing a lot of in my case).
The same John as comment #113
June 24, 2010
#114
Brill!
FADMark
June 25, 2010
#115
Thanks!!!
It's a great doc!!!
alexandre Takashi
June 28, 2010
#116
doesn't work for me :(
greg
June 29, 2010
#117
Thanks a lot.
Ignacio
July 2, 2010
#118
This was amazing, I was ready to climb mountains and slay dragons for a tutorial this clear. Cheers!
Johnny
July 2, 2010
#119
this was just awesome man
thanks a lot...........
it finally started php in my macbook pro
Rahul
July 7, 2010
#120
thanks for the tutorial. simple & straightforward. much appreciated
Martin
July 11, 2010
#121
Short, sweet and fully functional. Thanks!
whisperycat
July 13, 2010
#122
Thanks man. It was of great help. Simple and amazing stuff. Some of the comments also helped me a lot. Thanks to all those guys.
Sreedhar Manchu
July 19, 2010
#123
If you already had mysql running, you can stop/start it like so:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
Password:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Password:
adam
July 19, 2010
#124
This is the greatest thing ever. You are the bomb!
Will Tran
July 22, 2010
#125
Re MySQL: I'd add a recommendation (reminder?) to run /usr/local/mysql/bin/mysql_secure_installation as a final step in its installation.
Jim Miller
July 25, 2010
#126
wow.. this is great...
Thanx a lot.. :)
GNS
July 25, 2010
#127
Really straightforward. Nice of you to post it.
cb
July 26, 2010
#128
to open httpd.conf you could write
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/apache2/httpd.conf
nice guide anyway! Thanks
dennz
July 27, 2010
#129
Very Nice, Thanks!!
Alex
July 27, 2010
#130
Perfect, thank you for the simplicity ;)
S
July 28, 2010
#131
THis is the EASIEST ever!
GregTheCyclist
August 5, 2010
#132
thanks for this; it's the clearest, simplest explanation of this that i've found on the web. excellent
kevin
August 8, 2010
#133
Totally Bad Ass - thanks man!
Ron
August 8, 2010
#134
so usefull!
thanks
dalen
August 10, 2010
#135
Thanks, that was easy!
Ivan Vaschenko
August 10, 2010
#136
thanks! simple and useful, up to the last detail (Short tags),
milton j
August 12, 2010
#137
Thanks mate - made setting up PHP and MySQL real easy!
Ben (Melbourne, Aus)
August 14, 2010
#138
Fantastic, thanks. Very simple step to follow.
Marcus
August 15, 2010
#139
Great stuff man...Thank you very much!!!
Belgis Chial Sanchez
August 16, 2010
#140
id also appreciate some help with getting phpmyadmin running, any advice?
Ankur Oberoi
August 20, 2010
#141
Thank you very much for this!
Zeb DeOs
August 30, 2010
#142
Sweet! I got my php.ini all configured now.
Angelo Beltran
September 2, 2010
#143
You beautiful man. You saved me some headache.
Roberto Aloi
September 2, 2010
#144
A really fantastic guide, bought a MacBookPro yesterday, got my Apache/PHP/Mysql working today ! Fantastic !
Josh Atkins
September 2, 2010
#145
Perfect walk-trough. It helped me a lot. Thanx.
O B.
September 8, 2010
#146
Hi, when I did what you said in the MAC/PHP instructions,
and go to my browser and type in this:
http://192.168.1.32/index.php
in the browser the results come as txt?
<?php phpinfo() ?>
like it doesn't understand the .php mime type?
if i go to a command line, and run the index.php
i get results...
any suggestions?
HelpPlease
September 9, 2010
#147
I am luddite who just bought a MacBook Pro. I wanted to teach myself PHP on the Mac and found your tutorial.
I followed each step without a problem using sudo pico php.ini from /etc (otherwise restricted from access via the desktop; vi did not work either due to same reason) to text edit opening up a text edit window to find the right line in php.ini (other too hard to find)
I am hoping you can help medetermine whether all was successful.
Where I am now:
I first click on the button "Start mySQL Server" in the System Pref popup, MySQL. Once I see that it says that "The MySQL Server Instance is running," I type at my Terminal prompt
/usr/local/mysql/bin/mysql
This then gives me:
Your MySQL connection id is 540
Server version: 5.1.50 MySQL Community Server (GPL)
...
...
mysql>
Am I good to go?
Thanks and thank you for making the selfless effort!!
Peter
September 11, 2010
#148
sorry on above, it was of course the httpd.conf file that had the access restrictions, not php.ini, though for the latter I used the sudo pico and text Editor combo to make all changes.
As far as good to go, is all mySQL stuff to be done via the UNIX terminal? Or is there supposed to be a window?
Thanks!
Peter
September 11, 2010
#149
Peter: good job and yes, you're good to go. For MySQL, phpMyAdmin (http://www.phpmyadmin.net/home_page/index.php), a web interface, is the most popular tool. Good luck :)
Jérôme Jaglale
September 11, 2010
#150
excellent guide
kent
September 19, 2010
#151
I was about to macports the crap out of my fresh Snow Leopard system. Thanks for these instructions, works great!
Joe
September 20, 2010
#152
Awesome thanks!
Jeroen
September 21, 2010
#153
Back to the basic.
Thanks.
Choopong
September 27, 2010
#154
You're awesome, thanks a bunch!
Alex
September 28, 2010
#155
Thanks a lot for this tutorial. Simple and efficient.
Fabrice
October 7, 2010
#156
This is great !! Thanks for the simplicity.
I now have Apache,Mysql,PHP,Phpmyadmin, (Drupal619 & Drush 3) all working in harmony on my Macbook Pro (OS 10.6)
Shrenster
October 7, 2010
#157
Nicely done. Many thanks. Fixed my php/mysql and phpMyAdmin connection issues.
mickster99
October 13, 2010
#158
Simple and straightforward, thanks!
October 13, 2010
#159
Thanks a lot.
this instruction solved a huge problem that I've been having for the past week.
Ehsan.K
October 17, 2010
#160
Thank you!
Steve
October 20, 2010
#161
Awesome mate! Thank you! Cheers!
Ricardo
October 21, 2010
#162
Runs like a charm, thanks a lot!
Kees
October 30, 2010
#163
The permissions for php.ini should be 664 NOT 666.
AJ
October 30, 2010
#164
Fantastic! The only guide you need.
The other guides I found on the web were like chinese :) !
Oskar Wild
October 31, 2010
#165
Perfect tutorial. I'm a long time Linux user and your tutorial was absolutely perfect for my use. Thank you very much!
Pierrick Le Gall
November 2, 2010
#166
This is one of the best tutorials i’ve ever used. Thank you very much for your help. took 2 mins to do.
Smilinmonki
November 2, 2010
#167
Tried: Check it's working: http://localhost/
Result:
Safari can’t connect to the server.
Safari can’t open the page “http://localhost/” because Safari can’t connect to the server “localhost”.
Preferences: Web Sharing: On
Jim Price
November 4, 2010
#168
Concise, to the point, and most importantly, correct. Excellent guide.
tribbles
November 4, 2010
#169
Thank you! Thank you! Thank you!
A very thankful person
November 6, 2010
#170
I have been looking for instructions on how to get query logging working.
http://dev.mysql.com/doc/refman/5.1/en/query-log.html
I am using mysql-5.1.34.
I am also on Leopard 10.5
Rob
November 7, 2010
#171
I'm looking on how to install apache2, i deleted the directory /etc/apache2 by mistake and screwed things up. Does anyone know how I can do this? All the links I find for installing Apache on a mac are just telling me that it comes built in!
gsh
November 12, 2010
#172
thanks @jérôme.
big help.
sebby
November 13, 2010
#173
Amazing! Thank you for the perfect instruction set.
sahand
November 19, 2010
#174
Thanks!
Gonza
November 22, 2010
#175
I can't get this to work. I have snow leopard 10.6.5. I have web sharing on. I have php in usr/local/php5 and sql in /usr/local/mysql. I have edited the # out of the httpd.conf with sudo. And i cannot get the phpinfo() file to do anything. ?????
Al
November 24, 2010
#176
Thank you.
yi3artist
November 30, 2010
#177
Thanks! Great post! I ran into one issue - I got this error when I tried to restart Apache: /usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
I found a fix for this here, which worked: http://blog.deversus.com/2010/11/mac-os-1065-apachectl-usrsbinapachectl-line-82-ulimit-open-files-cannot-modify-limit-invalid-argument/
Hope that helps somebody else!
Sarah
November 30, 2010
#178
Thanks .. to one up some else /// may you be blessed with many beautiful babies only if you want them !
RedNic
December 2, 2010
#179
Thanks Man!
goksel
December 2, 2010
#180
Great tutorial! Thanks, saved me a lot of time!
Markus
December 4, 2010
#181
Clear steps that work, presented in a perfectly readable format. The perfect tutorial, thanks!
Noel Rivas
December 11, 2010
#182
Wonderful. I would give 100 points for this perfect and simple tutorial.
If Jerome were to charge for the time we would spend googling for solutions (without these steps) he would have made thousands :-)
Thanks Buddy excellent steps
Abdul Khan
December 14, 2010
#183
Thank you so much. It's very simple.
comeddy
December 17, 2010
#184
Thanks for your Instructions. With a new iMac and OS X 10.6.5 I have had problems with the startup item («Wrong Securtiy Preferences» or something like this). I solved it with the .plist-File «com.mysql.mysqld.plist» in the folder /Library/LaunchDaemons/. Do this command too: chmod 0644 com.mysql.mysqld.plist to set correct rights. Then I deleted the StartupItem for MySQL in the Folder /Library/StartupItems/ and became happy. Some other helpful infos here: http://hivelogic.com/articles/installing-mysql-on-mac-os-x. But it is not necessary to compile mysql-64bit via the terminal.
Hans
December 26, 2010
#185
Thank you very much!!! Excellent tutorial!!! Happy Holidays!!!
Zhannett
December 26, 2010
#186
Thanks - I had a problem with the Preference Pane. It would not start using mysql.server. This was overcome with just changing basedir to basedir=/usr/local/mysql in file /usr/local/mysql-5.5.8-osx10.6-x86/support-files/mysql.server and all worked instantly!!
Phil
December 28, 2010
#187
If the mysql server will not start, see this: http://forums.mysql.com/read.php?11,399397,399606#msg-399606
Terry Poland
December 29, 2010
#188
Thanks so much for this, it really helped. HOWEVER, I ran into some difficulty after I installed the mysql grant tables: for some reason I'm no longer able to save changes to php.ini. I keep getting an error saying that I don't have sufficient privileges... which is strange since I did just a couple days ago. Wondering if maybe this is b/c I upgraded to 10.6.6?
Any thoughts? Thanks for any help....
Chris
January 7, 2011
#189
Excellent set of instructions... Could not get simpler than that.
Thanks!
Neha Bansal
January 17, 2011
#190
This is by far, the most helpful instructions i have found on the web for PHP, MySQL connectivity. Many Thanks
Jason Meredith
January 22, 2011
#191
These are very easy instructions to get started with Apache, PHP and MySQL. Definitely the way to go if you're trying to learn how to do this without the use of MAMP.
Alvin Crespo
January 25, 2011
#192
Just threw MAMP out the window and used your tutorial. Great, thanks a lot!
frenkie
January 27, 2011
#193
Very helpfull,
thanks a lot!
David
February 2, 2011
#194
wow !!! it works thanks.
EdMo
February 12, 2011
#195
clean and simple. thanks bro.
mx
February 14, 2011
#196
I'm using Mac OS X 10.6.2 on a Mac Mini. I did everything explained here, but PHP is not working. A simple <?php phpinfo(); ?> doesn't show anything and appears directly in the source code.
Any idea?
Marco Ottolini
February 23, 2011
#197
oops, my fault!
I didn't change the .html extension into .php!!!
Marco Ottolini
February 23, 2011
#198
Great walkthrough around a notorious minefield. Thanks.
rado
February 27, 2011
#199
Thanks for this.
i got an error when starting apache
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
this fix is floating around. edit the apachectl script and change
ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
to
ULIMIT_MAX_FILES=""
error exists as of 10.6.5-6 but maybe not worth it to add to the instructions as it could be fixed it in the future.
http://excid3.com/blog/2010/12/usrsbinapachectl-line-82-ulimit-open-files-cannot-modify-limit-invalid-argument/
Matt
March 1, 2011
#200
thanks, thanks, thanks :) now my phpmyadmin (finaly) works!
Angela
March 3, 2011
#201
Simple and quick, thanks!
Matt Witherow
March 5, 2011
#202
excellentttttttt!!!!!
Matia
March 9, 2011
#203
Great!!!
DarkAlex
March 11, 2011
#204
Thank you for a very clear tutorial.
March 14, 2011
#205
finally... easy to use, straightforward directions, thank you!!!
watertower
March 14, 2011
#206
Brilliant. Thanks. I had one extra problem, and got:
Access denied for user 'root'@'localhost' (using password: YES)
Turned out it was a weird loopback issue. Maybe I missed something in this article but I posted my fix here: http://www.joelgerard.com/2011/03/18/mysql-access-denied-on-osx-10-6-6/
Joel
March 18, 2011
#207
Took me about 2 hours of head scratching to find your page. And here you are. Thank you! There was no way I was going to figure out the php.ini quirks. Thank you again.
Kiernan
March 30, 2011
#208
Thank you! The tutorial is clear.
Simon
April 3, 2011
#209
Thank YOu !
Yakuza
April 9, 2011
#210
Awesome! Worked every step of the way:)
Jamahl
April 14, 2011
#211
Thanks a lot!
Wilson
April 15, 2011
#212
Great Tuto thx.
EadilE
April 17, 2011
#213
From Russia with love! It's realy nice!!! Simple for us (for your it's hard work) and perfect!!!
tigos2
April 25, 2011
#214
For me I ran into two issues.
1. I had no idea how or where to find the etc folder on a mac. I looked and could not find it. I figured it had to be hidden so a quick Google search revealed typing into finder /etc or if you know your command line cd /etc will get you in there.
2. The httpd.conf and php.ini files were read only and it told me that I did not have the permission to write to them. I even tried opening them with sudo open httpd.conf -e to no avail. What did work however is when I made my changes and saved the file to the desktop. Remember to change the extension to .conf or .ini depending on which file you are working with. I then opened the appropriate folder in finder. I closed out of the file that I had finished editing. I then did a drag and drop from the desktop to the proper directory. I told it to authorize, then replace, put in my password and was in business.
Thanks for your hard work in writing this. I now have these enabled. I saw some items above about this not being installed. What else is there? If I go to http://127.0.0.1 I see a webpage. As I understand it, Macintosh from Tiger and come pre-installed with PHP and all you need to know how to do is enable it.
Now, I just need to know where I can upload my pages so they will show up on the intranet.
Wayne
April 27, 2011
#215
Thank you! I don't know why i ever installed MAMP.
Martijn Lafeber
May 4, 2011
#216
How can I add PostgreSQL to run with this apache?
If I want run php on console what I have to do?
I try this for many methods, but none really works.
CoiSA
May 6, 2011
#217
mysql.sock file not appear anywhere, and without it I can't configure MySQL. Any suggestion?
Thanks
Marc Gibert
May 9, 2011
#218
thank you very much! very good information very easy to follow. Everything works great!
Vincent
May 11, 2011
#219
Thank you for the great tutorial, works flawless
Nick
May 13, 2011
#220
Thanks a lot.
Kenol
May 15, 2011
#221
great
david raudales
May 27, 2011
#222
Nice Tut
Dave
June 1, 2011
#223
The package I just installed (mysql-5.5.13-osx10.6-x86_64) did not include anything named "the startup item, the preference pane". However, it did have ./support-files/binary-configure. I ran that and all seems to be well.
Paul Tanner
June 2, 2011
#224
Hello dear friend.
I am studying programming, I'm new.
I have MAMP and mysql, work alone or with both.
But my problem is that when I create a database in mysql says no code attached to Connect .... ......
<?php
$basedatos="clientes";
$conexion =mysql_connect("localhost","root","root") or die("No se puede realizar la conexion a la base de datos ");
$crear = mysql_create_db($basedatos,$conexion) or die ("No se puedo crear la base de datos ");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CREAR LA BASE DE DATOS CLIENTES EN MYSQL</title>
</head>
<body>
<?php
if ($crear) {
$mensaje = "<h2>La base de datos ha sido creada exitasamente!!!</h2>";
echo ($mensaje);
}
?>
</body>
</html>
But I can connect, code attached .......
<?php
$conexion=mysql_connect("localhost","root","perro1") or die("No se puede realizar la conexion a la base de datos ");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>conexion entre php y MYSQL</title>
</head>
<body>
<?php
if($conexion){
echo " la conexion se ha realizado con exito!!!!";
}
?>
</body>
</html>
Please could you help me, I agradecieria lot.
P.D "Greetings from Barcelona-spain
Miguel
June 2, 2011
#225
I encourtered every problem listed in this post. Why did I found it only now. WHYYY
Thanks very mush, gonna bookmark this.
Steve
June 7, 2011
#226
Thank you for these simple and precise steps!
Kais
June 9, 2011
#227
Thanks soooooo much!!! ;)
Vlada
June 15, 2011
#228
Thanks a los dude!
Jan
June 18, 2011
#229
And it still works great! Thanks a lot!
janwillem
June 19, 2011
#230
MySQL 5.5.x install worked without a fresh install of Snow Leopard on my MacBook. Even the PrefPanel worked without any problem. Thanks!
JP
June 26, 2011
#231
Great guide - thanks!!
darkcarnage01
June 30, 2011
#232
Awesome guide... But turning ON php shorttags sounds like a really bad idea to me ;)
Ibmurai
July 7, 2011
#233
Looooooooovvvvvvvveeeeeeeeeeeeeeeeeeeeeee
July 9, 2011
#234
Great - nice and clear
David
July 16, 2011
#235
There is a simpler way without modifying php.ini.
make a soft link to "/var/mysql/mysql.sock" is OK.
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
kukukuan
July 19, 2011
#236
It's also OK for Lion (installed from AppStore, on SL).
Only, I had to recreate php.ini with same settings than SL
Cool!
uocram
July 20, 2011
#237
I love concise and clean. You rock!
Daniel Lewis
July 20, 2011
#238
Thank you! This was a big time saver.
Kapil Karekar
July 21, 2011
#239
Thank you, very helpful!
Chris Chinchilla
July 28, 2011
#240
awesome!
salman munir
July 29, 2011
#241
Thanks This was very helpful.
I encountered one glitch with trying to restart apache on OS X 10.6.6.
when I tried
sudo apachectl restart
I got the error message
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
I found a solution to this at the following site.
http://excid3.com/blog/usrsbinapachectl-line-82-ulimit-open-files-cannot-modify-limit-invalid-argument/
Thanks again
Martin
August 1, 2011
#242
Thank you for writing this! Your instructions for PHP were much easier than most other tutorials' and worked quite well.
Jeffrey Jacobson, http://publicvr.org
August 16, 2011
#243
i cant edit the httpd.conf file. it comes out only in the read only mode. i am opening it with emacs on my mac. I tried to change the file permissions using chmod. it does not work either. like the system says operation not permitted. Can some one help me out with this. Thanks :)
mahesh
August 21, 2011
#244
I don't know who you are but I love you for this! Thank you Thank you Thank you!! You made my day!
amherst
August 23, 2011
#245
Thanks, great tutorial, simple yet complete
rafa
August 26, 2011
#246
Hello Jérôme Jaglale,
Any update for Mac OS X Lion.
Piyush
August 29, 2011
#247
great! thanks!
Luis
August 31, 2011
#248
Thank you very much.
Saeid
August 31, 2011
#249
mahesh, try "sudo emacs httpd.conf" and enter the admin password.
I have done all this and php is not working for me. I created text file with a test php script I found, "<?php phpinfo(); ?>". My browser only shows it as a text file.
Does anyone know what I am doing wrong or may have missed?
Karl Jenkinson
September 3, 2011
#250
Hi, I followed all the steps that you have recommended. Thanks a lot for the detailed information. However, I want to enable "root" user on mySQL which I haven't been able to do so far. I get "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)" this error every time. Can you please help me out. -Thanks in advance
Nandini
September 8, 2011
#251
Thanks..
rosh CHERIAN
September 20, 2011
#252
Thank's from Spain (Europe)
Enrique Castro
September 21, 2011
#253
Hey! Thanks for the helpful tutorial. I'm really new to this php thing, and I was wondering how to upload a php script? http://localhost/ says "It works!" and I installed MySql + the rest of the packages as well as edited the /etc/ php.ini and the httpd.conf files. But now I'm pretty lost. I tried looking up more stuff but...I'm confused. Any help?
Clam
October 1, 2011
#254
Awesome!
Now I can officially get rid of MAMP... I'll miss it though
October 4, 2011
#255
Thank you sooo much for this tutorial, I just cleaned up my mac and was reinstalling all my apps and just about forgot how to get php and mysql going again. Worked like a charm!! Many Thanks.
Jon
October 8, 2011
#256
It’s really an awesome tutorial.
So, after that, how I can activate the “mail()” function on PHP? I really need this…
Thanks for this great tutorial, and waiting for the next one.
Arthur
October 12, 2011
#257
Cheers all. Works on OS X Lion as well. Just need to install the 64-bit DMG MySQL package from http://dev.mysql.com/downloads/mysql.
Mark in South Carolina
October 19, 2011
#258
Perfect !!
Greats :)
thanks Man !
www.gladsonreis.com
October 20, 2011
#259
is there a copy of the httpd.conf ? i made some changes in order allow .htaccess usage but no luck.. i only destroyed my conf :/ without backup
Mbit
October 25, 2011
#260
Nice post!
I write about Apache + PHP + MySQL installation configuration as well, it would be nice to exchange references to each other blogs, if you agree... my weblog is
http://brunitto.wordpress.com
Good job!
Bruno
November 4, 2011
#261
I LOVE YOU. IT'S AS SIMPLE AS THAT. DO YOU WANT MONEY? MY SOUL, MAYBE? IT IS ALL YOURS. YOU, SIR, HAVE SAVED ME.
Walter
November 12, 2011
#262
Wow, this is great and easy to follow. Heaps of Thanks.
Siti G
November 20, 2011
#263
This is the best tutorial for installing/configuring PHP+mysql+Apache ever made.
Vale
November 23, 2011
#264
I did not know that Apache and PHP is available in Macbook my default.
Satya Prakash
November 29, 2011
#265
Thanks a lot. Very useful for a green hand like me.
Tony Huang
November 29, 2011
#266
Very simple and clear. Thank you!!!
Matt
December 3, 2011
#267
"Download the MySQL package for Mac OS X.5 (32 or 64 bits depending on your machine)"
might be good to give a few more hints:
all the new macs are Intel arch, and X.6 only runs on Intel arch. whereas X.5 also runs on ppc. Most binaries are fat = contain multiple archs. Use 'file' cmd to tell:
$ file `which httpd`
/usr/sbin/httpd: Mach-O universal binary with 3 architectures
/usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/sbin/httpd (for architecture i386): Mach-O executable i386
/usr/sbin/httpd (for architecture ppc7400): Mach-O executable ppc
httpd=apache=the top level executable. If MacOS can run the 64 bit version, it will (i think on both x.5 and x.6). because php and the apache/php adapter run in apache's process, they also must be 64 bit. (i386 and ppc7400 are 32 bit)
$ file /usr/libexec/apache2/libphp5.so
/usr/libexec/apache2/libphp5.so: Mach-O universal binary with 3 architectures
/usr/libexec/apache2/libphp5.so (for architecture x86_64): Mach-O 64-bit bundle x86_64
/usr/libexec/apache2/libphp5.so (for architecture i386): Mach-O bundle i386
/usr/libexec/apache2/libphp5.so (for architecture ppc7400): Mach-O bundle ppc
$ file `which php`
/usr/bin/php: Mach-O universal binary with 3 architectures
/usr/bin/php (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/php (for architecture i386): Mach-O executable i386
/usr/bin/php (for architecture ppc7400): Mach-O executable ppc
and because mysql runs in PHP's address space, it should also be 64 bit.
Allan Bonadio
December 5, 2011
#268
timezone for california should be America/Los_Angeles - would be handy if it listed a few TZs that developers are @.
The difference between Vancouver and Los Angeles is potentially when DST starts and ends so it might make a difference (although they seem to be the same now). Mexico's pacific time does change on different days from the US. Some places in the US don't observe DST at all, and political winds change the rules every few years. Hence the US has about 2 dozen TZs including several in Indiana. yeesh.
Allan Bonadio
December 5, 2011
#269
Great resource! Thank you! Worked like a charm!
Bill at University of South Carolina
December 8, 2011
#270
oops sorry didn't realize this is worldwide. Look here for your timezone:
http://www.timezoneconverter.com/cgi-bin/findzone/findzone.tzc
Allan Bonadio
December 8, 2011
#271
By following your instructions my installation went flawlessly. Thanks for putting this out there.
Geoff in San Diego
December 10, 2011
#272
Works fine! Thank you, save me a lot of work.
December 12, 2011
#273
Thank you very much.
vpn
December 28, 2011
#274
This is the BEST, most concise, parsimonious set of instructions I have ever seen for XAMP! THANK YOU THANK YOU THANK YOU!!!
Daniel Robert
January 28, 2012
#275