Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Trajectory

macrumors 6502a
Original poster
Nov 13, 2005
741
0
Earth
I've been searching the Internet for information on how to setup and run Apache 2, PHP and MySQL, but, nearly everything I find is old and stops at Jaguar. Even the sites recommended on the Apple site (serverlogistics.com and entropy.ch) are outdated and the packages they have to install these apps on OSX don't work in Tiger.

Can anyone point me to a site that has current and accurate info about how to get these apps running on my MacBook?

Thanks
 

panoz7

macrumors 6502a
Nov 21, 2005
904
1
Raleigh, NC
I can't comment on Apache 2.0, but I can help with the other stuff.

I enabled personal web sharing under sharing in system preferences. This enables (and someone will correct me if I'm wrong) Apache 1.3. The root directory is found in library/webserver.

PHP is easiest to install using a pre-configured package. I use a PHP module from entropy. http://www.entropy.ch/software/macosx/php/ Its a simple install and requires no configuration. I installed it and edited the php.ini file to configure it more to my personal tastes.

Finally, MySQL is found at the MySQL site. Once again there's a pre-configured package available for download. Here's the link to the download page: http://dev.mysql.com/downloads/mysql/5.0.html ... there's three versions for 10.4 (x86, ppc, and ppc 64) so make sure you choose the right one.

That's it. You just install them and it works.
 

Trajectory

macrumors 6502a
Original poster
Nov 13, 2005
741
0
Earth
Panoz, thanks a lot for that info! I just may do exactly that.

Wmmk, I noticed that the webserverxkit installs the newest versions of PHP and MySQL, but, I'm wondering if it can install older versions to more closely match what I'm running on my Red Hat web server? I'm using PHP 4.3.2 and MySQL 4.1.1 with Apache 2.
 

simon-says

macrumors regular
May 24, 2005
125
7
Louisiana
I normally just stick with Apache 1.3 that is installed with OS X. I grab the MySQL OS X release from the MySQL site. For PHP I go to PHP.net and download the source, ./configure then make. I find most people are reluctant to do the last step in OS X unless they are more familiar with *NIX, so they stick with an automated installer but it isn't that hard.
 

Trajectory

macrumors 6502a
Original poster
Nov 13, 2005
741
0
Earth
simon-says said:
I normally just stick with Apache 1.3 that is installed with OS X. I grab the MySQL OS X release from the MySQL site. For PHP I go to PHP.net and download the source, ./configure then make.
I think I will just stick with Apache 1.3 (I wonder why Apple won't include 2.x, it's very stable and has been around for a few years now) as installing Apache 2 appears to be a big pain in OSX.

I already downloaded the MySQL package and got that installed and running. It was really easy.

For PHP, I'd like to do what you suggested, but, I really have no clue how to install this. There's no install package like there is for MySQL. I'm not shy about the command line, but, don't know what to do with the files I just downloaded and unarchived from the PHP site. Do I simply copy them to a specific folder?
 

Trajectory

macrumors 6502a
Original poster
Nov 13, 2005
741
0
Earth
I looked at the INSTALL notes that come with the PHP files I downloaded, and found instructions for setting up PHP on OSX. But, the very first instruction is to open Terminal and type "wget http://www.diaz.ch/users...." but, I get an error saying wget: command not found. So, I guess these intructions are out of date?

Does anyone know where I can find current instructions for setting up PHP in Mac OSX Tiger? Thanks. Everything I keep finding online and in the Apple forum is about OSX Server, which I don't have.
 

wmmk

macrumors 68020
Mar 28, 2006
2,414
0
The Library.
Trajectory said:
Panoz, thanks a lot for that info! I just may do exactly that.

Wmmk, I noticed that the webserverxkit installs the newest versions of PHP and MySQL, but, I'm wondering if it can install older versions to more closely match what I'm running on my Red Hat web server? I'm using PHP 4.3.2 and MySQL 4.1.1 with Apache 2.
i believe that MAMP includes both php 4 and 5. unfortunately, only version 5 of MySQL is provided.
 

Trajectory

macrumors 6502a
Original poster
Nov 13, 2005
741
0
Earth
Okay, I actually got MySQL 4.1.2 and PHP 4.2 installed and running on my MacBook. Now I'm trying to figure out how to actually use MySQL with phpMyAdmin. Has anyone done this on a local computer? Or is there a better MySQL admin tool for Mac than phpMyAdmin?
 

wmmk

macrumors 68020
Mar 28, 2006
2,414
0
The Library.
Trajectory said:
Okay, I actually got MySQL 4.1.2 and PHP 4.2 installed and running on my MacBook. Now I'm trying to figure out how to actually use MySQL with phpMyAdmin. Has anyone done this on a local computer? Or is there a better MySQL admin tool for Mac than phpMyAdmin?
phpMyAdmin is the best it gets, IMHO. with MAMP, using it would be much easier. ill look for older versions of MAMP and webserverxkit.
 

Trajectory

macrumors 6502a
Original poster
Nov 13, 2005
741
0
Earth
wmmk said:
phpMyAdmin is the best it gets, IMHO.
Yea, I downloaded the MySQL Administrator and another tool for OSX. They are really nice, but, I'm finding them hard to use. phpMyAdmin is very easy to use, but, I just can't get it working on my MacBook. It won't save any config info to the config.inc.php file after running the setup. When I try running phpMyAdmin, I get: "Server is not responding or the local MySQL server's socket is not correctly configured."

How do I configure the MySQL socket, whatever that is?
 

Pointyhat

macrumors newbie
Jul 12, 2006
2
0
Entropy or MyAdmin

G5 IMac, 10.4.6 (non-intel)
I'm very new at this, I'm taking an online course in PHP/MySql but unfortunatley all of the downloads and installs are geared for WinXP users.
I have apache up and running but PHP will be the death of me.

I've downloaded the PHP package at Entropy and installed it but I just can't seem to get it to run. I can't even find the php.ini file. Do I need to get into Terminal for that? I've also read not to unstuff it using StuffitExpander which is the only expander I've ever used besides TNEF.

I've built a form in HTML that points to a .php doc (that I created with TextWrangler) but when I insert info into the form all I get is the code from the .php page.

What about MyAdmin? Have people had better luck with this? Should I jump out the window now?
I really appreciate any and all help you guys can give me.
 

panoz7

macrumors 6502a
Nov 21, 2005
904
1
Raleigh, NC
Pointyhat said:
G5 IMac, 10.4.6 (non-intel)
I've downloaded the PHP package at Entropy and installed it but I just can't seem to get it to run. I can't even find the php.ini file. Do I need to get into Terminal for that? I've also read not to unstuff it using StuffitExpander which is the only expander I've ever used besides TNEF.

If you installed the entropy module correctly the php.ini file will be located in the directory usr/local/php5/lib

To edit it you need to use terminal. Type this into it and it should open in textedit (or your default text editor): open /usr/local/php5/lib/php.ini

For the changes you make to take effect you'll have to restart the web server. You can just restart your computer or go to sharing in system preferences and click stop next to personal web sharing. Start the server and your changes should work.

Pointyhat said:
I've built a form in HTML that points to a .php doc (that I created with TextWrangler) but when I insert info into the form all I get is the code from the .php page.

PHP will only work if the file is in your web-servers directory and you access it through the web-server. I'm assuming that's the problem, but correct me if I'm wrong and I'll try to help you out.

All your sites should reside in the folder library/webserver/documents

You also can't just type in the URL of the file. For example typing this into my browser: http://Library/WebServer/Documents/liquidfinish/faq/faq.php opens the php file but not the server so it just returns the php code. Instead I need to type in http://localhost/liquidfinish/faq/faq.php to get to the actual file.

Once again, my apologies if you already realized that. If that's not the problem let me know and I'll try to help out more.
 

Pointyhat

macrumors newbie
Jul 12, 2006
2
0
Hi Panoz, thank you so much for the reply and the help.
From my own user site the test php does now work, however when I use the form again, pointing at the php doc, i'm still looking at code.

Opening a vein now
:)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.