# Install Manual for Apache,php,mySQL in MaxOS X



## UnPluGs (Aug 29, 2004)

Hiyee all... I'm new to MacOS X..

I juz bought a PB G4... Before this, I'm using Windows Xp... So, may I know how to install and configure apache, php and mysql..? I desperately want to use this s/w to do my final year project... Hope some1 can help..

1 more Question here.. Is it the coding, programming for the 3 open source above in MaxOS X same as what I previously did in Windows..? 

Hope somebody can shed the light for me....

I'm totaly new to MacOS...

Happy to join this big family..


----------



## mdnky (Aug 29, 2004)

Just download the installers and run them.  There's a few minor steps to get everything working, but they're detailed in the documentation included with the packages.

http://www.serverlogistics.com/mysql.php
http://www.serverlogistics.com/apache2.php
http://www.serverlogistics.com/php4.php


----------



## UnPluGs (Aug 30, 2004)

mdnky said:
			
		

> Just download the installers and run them.  There's a few minor steps to get everything working, but they're detailed in the documentation included with the packages.
> 
> http://www.serverlogistics.com/mysql.php
> http://www.serverlogistics.com/apache2.php
> http://www.serverlogistics.com/php4.php





Thanks a lot... I havn't try it... I will try it later or soon... Hope its' installation is easy..

Anyway, may I know whether the coding part is the same as what I do in windows..? For example, if I program a system and it works in windows, can the system works also in Mac Os X?  is it the same..?


----------



## mdnky (Aug 31, 2004)

'Coding' for PHP is identical on any platform, SQL likewise.  The only thing you might run into is having differing setups or versions of modules on two differing platforms.


----------



## 3mors (Aug 31, 2004)

mdnky said:
			
		

> Just download the installers and run them.  There's a few minor steps to get everything working, but they're detailed in the documentation included with the packages.
> 
> http://www.serverlogistics.com/mysql.php
> http://www.serverlogistics.com/apache2.php
> http://www.serverlogistics.com/php4.php



naaa, don't get a mess with apache2
it's not so good

better usign the original apache on panther
so u have to install only these packages (all officials from mysql.com and php.net)

http://www.entropy.ch/software/macosx/php/
http://www.entropy.ch/software/macosx/mysql/

the docs are good, so no chance to get problems


----------



## UnPluGs (Sep 1, 2004)

Thanks mdnky and 3mors for the replying.. I installed mysql and php in my MacOSX jaguar.

My Question now is, where do I saved those php files in? Previously, in windows I saved in Apache->htdocs folder. So now, where is the folder that I have to saved it in? and yup.. I found the apache is built in. 

Hope to hear from you all soon... I'm really appreciate for the help that you all might provide.. Thanks a lot.


----------



## pds (Sep 1, 2004)

In your home there is a folder named sites. Apache localhost uses sites for all your htdocs. Place your project in there.

so to access your work you use
localhost/~(user)/(projectname)/

Make sure apache is running by selecting "Personal Web Sharing" in Sharing in System Preferences


----------



## 3mors (Sep 1, 2004)

pds said:
			
		

> In your home there is a folder named sites. Apache localhost uses sites for all your htdocs. Place your project in there.
> 
> so to access your work you use
> localhost/~(user)/(projectname)/
> ...



not only =)
the root folder for the web server is in /Library/WebServer/Documents

anyway u can edit the root path in /etc/httpd/httpd.conf using vi on terminal or bbedit

if u want how to edit the conf file, read your "embedded" manual on this address:
http://localhost/manual/


----------



## pds (Sep 1, 2004)

> not only =)
> the root folder for the web server is in /Library/WebServer/Documents


True, but I always consider that folder for projects you are serving the on the web from your computer. I use Sites for not-yet-ready-for-prime-time projects. :-\



> anyway u can edit the root path in /etc/httpd/httpd.conf using vi on terminal or bbedit
> 
> if u want how to edit the conf file, read your "embedded" manual on this address:
> http://localhost/manual/


Yes - apache is the master of flexibility, once it has been mastered.


----------



## mdnky (Sep 1, 2004)

If you installed Apache 2 from the link I gave, then the main Apache root would be located at: Macintosh HD/Library/Apache2/htdocs/  .

The serverlogistics Apache 2 install includes a pref pane to start and stop the server.  You don't want to enable personal web sharing feature if you're using Apache 2, leave it off and use the pref pane to enable/disable the server.  All the info is contained in their docs with the files.

Apache 2 runs just fine if installed correctly.  I've been using it since Feb of this year with not a single issue, which is more than I can say about the original version.


----------



## 3mors (Sep 1, 2004)

mdnky said:
			
		

> Apache 2 runs just fine if installed correctly.  I've been using it since Feb of this year with not a single issue, which is more than I can say about the original version.



please, tell me your problems with os x apache.
i had no problem with it and i think it's better starting and stopping it through the prefs and not through another app (even if it's possible to change xinetd conf in order to command apache2 in prefs pane...)


----------



## mdnky (Sep 1, 2004)

3mors said:
			
		

> please, tell me your problems with os x apache.



It's alright, but Apache 2 is a better option IMO not to mention it's alot easier for someone new who's also trying to install the newer versions of PHP and MySQL to install the three packages I provided links to.  Very simple process for someone unfamiliar with setting up these things.  Not to mention those packages are configured to be 'interdependant' on each other and would require additional configuring to get them to work with previous installs of some of them (the original OS X Apache system for example).

There is no such thing as OS X Apache really, it's just Apache 1.x supplied with the OS 'from the factory'.  The way you start the 'factory' version is the same as the way you start Apache 2 with the pref pane, only it has it's own separate pane to let you do it instead of a checkbox or button hidden in another's location.  They're both nice features that keep you from having to go into the terminal to do it, that's all.

But if I recall, it was you that said:
"naaa, don't get a mess with apache2"
"it's not so good"​
Why not, and what's your statement based on?  Saying it's no good, especially in the way you worded it, doesn't really cut it. 

The servers I run have been much more stable and reliable with Apache 2 than 1.x distros, not to mention better performance in testing (not by a wide margin, but it's still there).  There's a few Macs in there, some Linux boxes, and even an old Solaris/Sparc box.  Couple that with the ease of install (and integration with PHP & MySQL) versus traditional methods and you know why I feel the way I do about it.


----------



## UnPluGs (Sep 24, 2004)

Sorry for being late reply...

Thanks all and I'm able to install php and mysql in my powerbook G4..

Anyway, I have a question here..
Normally, in windows, when we created database, the database will stored in "MYSQL" --> "Data" folder...So, may I know where is the location for MAC to stored the databases that we created?

Hope someone can shed the light for me... Thanks a lot...


----------



## 3mors (Sep 24, 2004)

/usr/local/mysql/data/


----------



## UnPluGs (Sep 26, 2004)

Dear 3mors,

Is it the one u stated is access thru terminal? Sorry.... I'm very new to MAC...

How to access from "Finder" in MAC?


----------



## 3mors (Sep 26, 2004)

select "Go to folder" menu from "Go" on menubar and type /usr/local/mysql/data/


----------



## UnPluGs (Sep 27, 2004)

Thanks 3mors...!!!

I found it! but the data folder had been locked... it said that I dun have sufficient priviledges to open it... What is the problem?


----------



## UnPluGs (Sep 27, 2004)

Dear 3mors... Thanks a lot... I had unlocked it...!


Thans for guiding me on this..


----------

