Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Apache-mySQL-PHP installation tutorial UNIX
[Editor's Note: This is the most detailed how-to I've received in six months' running this site! I have not used the tutorial, mainly because I already have this group of programs running, but this looks like a very good step-by-step on how to get them installed. -rob.]

[Second editor's note: I received a referral to another site with a step-by-step guide for compiling all three of these programs from source; I haven't used it, but it's a similar step-by-step tutorial, but it doesn't use any package files.]

Compiled and partly written by Vip Malixi with contributions from Scott Anguish, RenÚ Voorburg, Matthew Vaughn. The following tutorial is a comprehensive set of instructions for installing a new version of Apache (1.13.19), along with PHP 4.04 and mySQL 3.23.28. In order to follow these instructions, you will need to have (a) root access [detailed elsewhere on the site] and (b) the developer tools installed.

If you'd like to see how this is done, please read the rest of this article for a thorough, step-by-step guide to the process.

Here's how to install all three packages on Mac OS X v10.0, broken down into different tasks.

Step One: Preparation
  1. Download the following files. NOTE: Make sure you get these exact versions; others may not work with this tutorial!

    MySQL: MySQL-3.23.28-1.0.pkg.tar.gz
    Apache: apache_1.3.19.tar.gz
    PHP: php4.0.4.img

  2. Run Stuffit Expander to unbinhex php4.0.4.img

  3. Mount image php4.0.4.img

  4. Copy php-4.0.4pl1.tar.gz to your hard disk

  5. Copy all these files to your Documents folder which is at /Users/yourusername/Documents or click on Home then Documents:

Step Two: Installation of mySQL
  1. Open the Terminal application, which is inside Applications/Utilities

  2. Go to Documents folder from Terminal. Type the following at the Terminal prompt (the ">" represents the prompt, so don't type it):
    > cd ~
    > cd Documents
    > ls
    Do you see the files? If you don't, type the following:
    > pwd
    to check if you're in the right directory: /Users/yourusername/Documents

  3. Unpack MySQL:
    > gnutar xpfz MySQL-3.23.28-1.0.pkg.tar.gz
  4. Exit the Terminal and in Finder, go to your Documents folder and double-click on the resulting mySQL package.

  5. Apple's Installer will ask for admin password (click on the "lock" icon). Enter your password then run the installer.

  6. Quit installer when finished.

  7. Go back to Terminal application and type the following:
    > su
    Enter your Root password then
    > cd /usr/local/bin
    > ./mysql_install_db
That's it, MySQL is installed. To run server, type the following at Terminal as Root:
> safe_mysqld &
Your Terminal will just stop (won't go back to prompt) but that's okay. You can close Terminal. I'm assuming you know how to run and use mysql. If you don't know how to create a new user aside from Root with database creating privileges, this is how. At Terminal, type the following as Root:
> mysql
Inside mysql, type the following ("m>" represents mysql prompt, don't type it):
m> GRANT ALL PRIVILEGES ON *.* TO yourusername@localhost
IDENTIFIED BY 'whateverpasswordyouwant';
m> quit
[Editor's note: The above line for GRANT ALL was broken into two lines to narrow the display width - enter it as one line! Also, please read up on database security at the mySQL web site! It's quite important for the safety of your system and data!]

When you're done, exit root by typing 'exit'.

Now to run mysql as you and create a new database, etc., you must do the following:
> mysql -pwhateverpasswordyouwant test
m> create database myfirstdatabase
m> quit
> mysql -pwhateverpasswordyouwant myfirstdatabase
Step Three: Installation of Apache
  1. First turn off Mac OSX Apache. Go to System Preference-Sharing, make sure WebServer is off (buttons says "Start" instead of "Stop")

  2. Go back to where you placed Apache package. Do this at Terminal:
    > cd ~
    > cd Documents
    > gnutar xzf apache_1.3.19.tar.gz
    > cd apache_1.3.19
    > ./configure --enable-module=most --enable-shared=max
    > make
    > sudo make install
    You'll be asked for Root password. Give it then run.
That's it, you've installed Apache.

Step Four: Installation of PHP
  1. Go back to where you placed PHP package. Do this at Terminal to become Root:
    > su
    Enter your Root password

  2. Next, configure PHP (the disabled pear is because your file system, HFS+ is case-insensitive, and installing pear causes errors)
    > ./configure --with-mysql --with-apxs --disable-pear
    In my case, I also added dBASE support, so if you want, you can type the following or add other configurations. Consult PHP.NET regarding the others:
    > ./configure --with-mysql --with-dbase --with-apxs --disable-pear
    > make
    > make install
  3. Open the following file using at the Terminal using the Pico text editor:
    > pico /etc/httpd/httpd.conf
  4. Do a search for 'PHP' (it's Ctrl-W; don't type the quotes!)

  5. Make sure the following are in there and not commented out (comments take the form of "#"), if not add them at the appropriate place:
    LoadModule php4_module
    AddModule mod_php4.c
    AddType application/x-httpd-php .php .php3
    AddType application/x-httpd-php-source .phps
    You may also want to modify the following so that Apache will let you go to your PHP page without having to type the file name if it's a default

     DirectoryIndex index.html index.php index.php3
Okay, finished with PHP. Last, we need to make Apache accessible from browser.

Step Five: Activation of Apache
  1. Go to Systems Preference-Network

  2. Create a new Location (click on Location pulldown menu and select "New...")

  3. Call the new Location "Local" or whatever you want, but make the following settings:

    Configure: Manually
    IP Address:

    Leave all the other settings the way they are. Save it.

  4. Make sure mySQL is running (I mentioned this earlier. To check if it's running, at the Terminal, type 'mysqladmin -v ping').

  5. Run Apache: at System Preference-Sharing, turn on WebServer by clicking on "Start" button.

  6. Go to your browser, like Ominweb or (blech) Microsoft IE (can't wait for Mozilla or Netscape port to OSX), and type for Location: -- you should end up at Apache welcome screen.

  7. Your programs need to be placed in: /Library/Webserver/Documents which is accessible from Finder. Try putting in a PHP/Mysql program and see results in your browser. For example, if I place in "first.php" then at browser, you type:

  8. If you put in a folder inside /Library/Webserver/Documents, then just use the name of the folder (no spaces) in the browser. Example, if folder is called "myprogs", then use:
Phew! Good luck.
  • Currently 2.25 / 5
  You rated: 2 / 5 (4 votes cast)

Apache-mySQL-PHP installation tutorial | 55 comments | Create New Account
Click here to return to the 'Apache-mySQL-PHP installation tutorial' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
so close!
Authored by: Diggory on Apr 03, '01 11:29:25AM

when trying to restart apache I get:
Syntax error on line 240 of /etc/httpd/httpd.conf:
API module structure `php4_module' in file /usr/libexec/httpd/ is garbled - perhaps this is not an Apache module DSO?
/usr/sbin/apachectl start: httpd could not be started

any clues? anyone had success?

[ Reply to This | # ]
fixed now. stepwise good.
Authored by: Diggory on Apr 03, '01 12:37:16PM

followed instructions on stepwise and it worked.

[ Reply to This | # ]
so close!
Authored by: vipm on Apr 03, '01 01:21:20PM

What I think you did (as did I in the beginning) was run the resulting PHP package. Well, for some reason it doesn't work and I got the same error message you got. You have to do it manually. Just follow the instructions in the article. That is, mount the PHP disk image, and copy the tar file, forget about the .pkg file.

Care take.

[ Reply to This | # ]
so close!
Authored by: Anonymous on Apr 03, '01 03:48:45PM

yes I'm guessing there is a bug with php4.0.4 and apache .19 and Darwin.

I had the same problem, commenting out the php loadmodule and addmodule made apache launch.

FYI, I added to compile with mysql but I doubt that had any effect.

mysql and apache are working though.

[ Reply to This | # ]
so close!
Authored by: Anonymous on Apr 03, '01 10:31:06PM

Yeah. I got this error also. I tried recompiling PHP again and the second time it went in and correctly updated my httpd.conf file. Perhaps the first time I hadn't compiled it as root or something. Strange.

[ Reply to This | # ]
so close!
Authored by: edenwaith on Apr 12, '01 04:58:27PM
I also had this problem on two different computers, but I eventually got PHP, MySQL and Apache to all work on an iMac and a G4 PowerMac.

The installations seems somewhat nit-picky in which order some of the programs are installed. I think this is what worked for me.

Install MySQL.
Install Apache.
Install PHP, using the ./configure, make, and make install options.

If PHP is still having problems, saying that the shared object file is unreadable (that would be the .so file), try reinstalling PHP again. I found I had to install PHP twice before it worked. But now that it does work, I'm very happy! Just remember to turn MySQL on before trying to connect PHP to it.

[ Reply to This | # ]
gnutar problem...?
Authored by: Anonymous on Apr 03, '01 04:38:03PM

Please forgive me if this is a totally stupid mistake on my part, but my terminal application does not recognize "gnutar" as listed in "Step Two: Installation of mySQL", "3. Unpack MySQL".

What could I be doing wrong?

Adam Groth

[ Reply to This | # ]
gnutar problem...?
Authored by: Anonymous on Apr 03, '01 06:48:49PM
You need to install the Developer tools that came with OSX. They are on their own CD. That should do it for you.

[ Reply to This | # ]
gnutar problem...?
Authored by: Erik Toh on Apr 04, '01 12:19:32PM

Assuming that the Developer Tools were installed, did you check to see if the "gnutar" application is in your PATH? It is commonly in /usr/bin... you can find out by using the "find" command:

> find /usr -name gnutar -print

The output should be:



[ Reply to This | # ]
Problems Compiling Apache
Authored by: Anonymous on Apr 03, '01 09:13:28PM
I'm working with OS X public and I 'apprently don't have a compiler?' that's a little odd -

I've been trying to figure it out.. but no luck - can somebody ease my pain? here's my error msg -

Error: could not find any of these C compilers anywhere in your PATH: gcc cc acc c89

[ Reply to This | # ]
Problems Compiling Apache
Authored by: vipm on Apr 04, '01 03:02:07AM

As mentioned in the article, you're supposed to install the Developer CD first--that's where the C compilers, GNUtar, etc. will come from.

[ Reply to This | # ]
Everything installed ok, but I'm getting errors...
Authored by: Anonymous on Apr 03, '01 11:02:02PM

I finaly got everything to install properly (I think). However, when I try to access a .php page from my browser, I get all kinds of text "gibberish"


{rtf1macansicpg10000cocoartrtf100 {fonttbf0fswissfcharset77 Helvetica:}

(there are actually some forward slashes in my browser, but this bbs does not seem to support those characters)


what now!?!?!

Thanks in advance!

[ Reply to This | # ]
Everything installed ok, but I'm getting errors...
Authored by: Anonymous on Apr 05, '01 02:39:59AM

I am getting th exact error. Any thoughts?

[ Reply to This | # ]
Everything installed ok, but I'm getting errors...
Authored by: ascorbic on Apr 06, '01 05:35:49AM

Did you create the php file in textedit? If so - make sure you save it as plain text. That output looks like an rtf header.

[ Reply to This | # ]
Got it!
Authored by: Anonymous on Apr 07, '01 01:27:20AM
Yes, that was the problem.
Thanks for the hint.

[ Reply to This | # ]
Authored by: Anonymous on Apr 04, '01 06:30:19AM
Excellent HowTo ... all I'd possibly add would be between Step Four-- 1. and 2. -- some knuckleheads, [like me] may not know to
gnutar xpfz php-4.0.4pl1.tar.gz
and then
cd php-4.0.4pl1
into the directory once un-tar/zipped before trying to './configure...' And lastly, a word of caution; when you are "searching" the httpd.config within pico -- don't confuse 'cmnd + W' with 'control + W' -- the later is correct; the former shuts your window (unless you have your shell set up differently in its prefs.)

[ Reply to This | # ]
Socket error
Authored by: wusamah on Apr 04, '01 01:49:21PM

I get this error when I run mysql via the terminal or phpMyAdmin

ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

I checked /tmp/ directory and I see mysql.sock. I tried installing the package but to no avail. Can someone please help with this. I am very new with UNIX so kindly be gentle with me.


[ Reply to This | # ]
Socket error
Authored by: robg on Apr 04, '01 02:28:02PM
Is the safe_mysqld demon running? Type ps- aux | grep "mysql" and see if you get anything back other than the "grep" command you just ran. If you only get one line (the grep command), then you need to make sure you start the mysqld demon before trying to use mysql -- do this by typing (as root) safe_mysqld in the bin directory of mysql.

Not sure this is your problem, but the "ps" command will tell you (at least) if the demon is running.

[ Reply to This | # ]
Socket error
Authored by: wusamah on Apr 04, '01 11:31:04PM

thanks for the response.
i actually do have mysqld running. i tried launching safe_mysql and it tells me that it can't find mysql at the libexec lib even though i've cd to the mysql directory as instructed. I get the same error socket error when i try msyqladmin anything.

when i tried your suggestion it did only gave a one line response:

254 0.0 0.1 1384 304 std S+ 0:00.03 grep mysql

but i have no clue what that means. the frustrating thing is that the first mysql install ran very well (i downloaded tenon's version.) it wasn't until i ran mysql_install_db that things got screwy. now i'm depressed, i've lost my appetite and even thinking about jumping off the brooklyn bridge. help.


[ Reply to This | # ]
safe_mysqld isn't running
Authored by: robg on Apr 05, '01 02:02:31AM
Your 'ps' output should look more like this:
root   437   0.0  0.1     1720    644  p2- S      0:00.05 sh ./safe_mysqld
root 450 0.0 0.2 11320 1112 p2- S 0:00.17 /usr/local/mysql/libexec/mysqld
robg 452 0.0 0.0 5724 168 std RV+ 0:00.02 grep mysql
So for some reason, the safe_mysqld program isn't starting up. Do you see any errors, or can you find an error file named "localhost.err" in /usr/local/mysql/var? If so, 'cat' it to see what it says... -rob.

[ Reply to This | # ]
safe_mysqld isn't running
Authored by: wusamah on Apr 05, '01 10:58:08PM

well right after i posted my last message i thought of doing something unorthodox and run mysql_intall_db again. suddenly the socket works, mysql works and i have no idea why it did.

again thanks for your time and effort.

[ Reply to This | # ]
A different install experience
Authored by: thinkyhead on Apr 04, '01 07:57:55PM
Wow, cool article.

I actually installed mySQL from the binary distribution labeled as the beta-apple-darwin1.2-powerpc located on this page:

It's actually version 3.23.27 and not 3.23.28 but it seems to work fine. I followed its INSTALL-README as closely as I could and had no problems with the install. The only tricky part was adding a new group called mysql and a new user called mysql which meant I had to dig into NetInfo Manager a little bit more than I wanted. I would have liked being able to just type useradd from the terminal per the instructions, but I couldn't figure out how to do it without the NetInfo Manager.

I made sure to install the decompressed mysql-apple-blah-version folder in /usr/local/ along with a symbolic link named simply 'mysql.' I entered the mysql folder with cd and ran the install script with scripts/mysql_install_db. It was much faster than I had expected!

Anyhow, I probably ought to go back and do the install of the newer version according to this article. It would be nice to have the mySQL daemon come up at boot time and get PHP running under Apache. Hopefully this article will help me with my little troubles and also to get the /usr/local/mysql/bin/ folder added to the system PATH.

Tips? Experiences? This is a great topic about an essential resource!

[ Reply to This | # ]
A different install experience
Authored by: foamy on Apr 04, '01 09:04:03PM

I use zsh for my shell, but tcsh should be similar for adding to your path.

Create a file (if you don't already have one) called .tcshrc in /Users/you/
to create new paths add
export PATH=$PATH:/sbin/:/usr/sbin/:/usr/local/bin/
putting in whatever paths you want. Add new paths with :/path/to/location/
at the end of the line above.

restart the terminal and type env to check and see if the new paths stuck.

If you figure out how to get mysql to start at lauch, let me know. I saw it somewhere after PB was released, but I can't find it any more. maybe lightyeardesign?

[ Reply to This | # ]
A different install experience
Authored by: atl on Apr 11, '01 10:47:12AM
I haven't quite figured out how to successfully get the MySQLd running at startup, but after some experimentation, I noticed this informative document (link to local copy of Developers docs):
Customization Techniques
The sections on "The Boot Sequence" and "Customization Techniques" are of particular interest. I will investigate further...

[ Reply to This | # ]
Launch at startup
Authored by: atl on Apr 12, '01 08:20:53AM
for those following this, this article details how to launch MySQL at startup.

[ Reply to This | # ]
Permission Denied!
Authored by: Anonymous on Apr 04, '01 09:59:43PM

When I attempted to ./configure apache it returned "Permission Denied"

I was in at root and [root] shows in the command line.

This was much easier in the public beta :-<

Helpful suggestions?

[ Reply to This | # ]
Permission Denied!
Authored by: vipm on Apr 13, '01 02:53:49PM

This could be because of three things:
1. Root is not activated;
2. You're in the wrong directory;
3. Webserver is "On"--you have to turn it off in the Sharing control panel.

Please refer to article again to make sure all 3 conditions are okay.

[ Reply to This | # ]
Arg! I WAS there, but...
Authored by: Anonymous on Apr 05, '01 12:15:34AM

Everything was working fine. Apache/MySQL, PHP.

Now, for some oddity, everytime I attempt to view even the most simple php fiel from a browser, I get one of those ""Does not know how to handle the file type" and I can choose an app, or save it, or cancel.

yes, my httpd.conf has the mime types for php uncommented, allowing the ".php" extension, the same as the file I'm asking for.

Any ideas?

thanks in advance

[ Reply to This | # ]
Arg! I WAS there, but...
Authored by: Anonymous on Apr 05, '01 07:13:08PM
Remember...there are 6 or 7 places in the httpd.conf file that you have to uncomment. Make sure you got each one.


[ Reply to This | # ]

Arg! I WAS there, but...
Authored by: Anonymous on Apr 06, '01 06:28:32PM

Actually I worked it out, resorted to an older http.conf file. I think the issue I had was uncommenting too much stuff, in an attempt to get it working..

Word to the wise.. save backup copies before you start muckin around. =)


[ Reply to This | # ]
Arg! I WAS there, but...
Authored by: jefferis on Aug 07, '02 04:13:33PM

In Pico, I could only find one instance of 2 lines that needed to be commented out.
However I'm getting this message... not sureif its an error:
OK? sudo apachectl configtest? no
udo: Command not found.
[localhost:/src/php-4.2.2] jefferis% sudo apachectl configtest
Processing config directory: /private/etc/httpd/users
Processing config file: /private/etc/httpd/users/jefferis.conf

[Wed Aug 7 16:00:38 2002] [alert] httpd: Could not determine the server's fully qualified domain name, using for ServerName
Syntax OK

I'm getting the parse error from IE as well.

[ Reply to This | # ]
Me to having socket problems!!!
Authored by: Anonymous on Apr 05, '01 02:46:29AM

Please help me...what is this??
The server can┬┤t locate the mysql.sock. It┬┤s the same what ever I do.
Phpmyadmin says the same. I really need this fixed =)...anyone...?

/usr/local/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

This is what it says when I type ps -aux | grep mysq
root 18614 0.7 0.2 1340 232 std U+ 0:00.02 grep mysq
root 426 0.0 0.0 1720 4 std- S 0:00.10 sh ./bin/safe_mysqld
root 437 0.0 0.0 11680 4 std- S 0:00.29 /users/knasen/desktop/mysql-3.2

I actually can┬┤t say what the problem is...tried type "mysql" but the problem stays. Tried Phpmyadmin...and the same appears...When I open etc/ I can┬┤t see any file named: mysql.sock.

This is what it says when I type safe_mysqld &
[localhost:/usr/local/bin] root# safe_mysqld
Starting mysqld daemon with databases from /usr/local/var
010404 21:13:05 mysqld endedn

[2] + Exit 1 safe_mysqladmin

[ Reply to This | # ]
Me to having socket problems!!!
Authored by: macupdate on May 05, '01 11:48:40AM

Mine initially worked fine until I restarted and logged in under a different user
other than root. Now I have the same problem.

[ Reply to This | # ]
Missing lines in PHP .conf
Authored by: Anonymous on Apr 05, '01 03:35:45PM

I am missing the following files from the .conf after the PHP install:

LoadModule php4_module
AddModule mod_php4.c

I don't know where to insert these lines. I read through the file and it said to ask for expert advice as putting the modules in the wrong order could be bad. Any help?

I have the other two lines (they are commented out).


[ Reply to This | # ]
Missing lines in PHP .conf
Authored by: vipm on Apr 13, '01 03:00:16PM

In the Apache configuration file, httpd.conf, you'll see examples similar to what you need to add. You'll find lines like "LoadModule" etc. but these are usually commented out. First make a backup of this file in case you make an error. Next I'd suggest running the Apache server just to make sure the configuration file is working. If it is, turn off the Apache server, and make the changes to the httpd.conf--when you installed PHP, it should've made the changes to the httpd.conf automatically (if you used the .tar version and not the pkg version).

[ Reply to This | # ]
serving apache from another drive
Authored by: offsky on Apr 11, '01 08:39:56PM

Does anyone know how to set apache to serve the files from my second internal drive? Also, is it possible to get to my second drive from the terminal? It seems like the root directory is inside my first hard drive, and there is no way to go one level higher.


[ Reply to This | # ]
serving apache from another drive
Authored by: tomassetti on Apr 12, '01 03:45:53PM

Using the terminal is quite simple to get any hard drive or partitions.
You should go to the directory /Volumes/ typing:
cd /Volumes
In this directory You will find all the Volumes mounted on Your desktop. Simply type
to get in

To let Apache serve documents stored in different hard drives or partitions You should configure it to do so... the simplest way is to create a symbolic link form the standard serving location to the desired location in the different hard drive. You can use the command
while staying in the apache standard serving location.

Good luck!

[ Reply to This | # ]
serving apache from another drive
Authored by: pbagnall on Jan 29, '03 10:47:01AM

look for the Directory and DocumentRoot settings in your apache conf file (/etc/http/http.conf) and point them to where you'd like to have your site stored. As for where other discs live, look in /Volumes and you'll see all your other hard discs.

hope that helps

[ Reply to This | # ]
Command not found
Authored by: shaunmc on Apr 20, '01 02:43:56PM

When I try to use the ./configure command, I get "Command not found". I have the Developer Tools installed. Does anyone know why I'm getting this error?

[ Reply to This | # ]
Command not found
Authored by: vipm on Apr 21, '01 03:22:28AM

You have to be in the right directory. type "pwd" to find out what directory you're in. Read the instructions again to check which directory you're in. If you're configuring the Apache program, you have to be in the directory where the Apache install files were untarred. Same with PHP. So cd (change directory) into those directories and that's where you run the configure command.

[ Reply to This | # ]
PHP Checker command?
Authored by: macupdate on May 04, '01 10:18:26PM

Is there a command or way to make sure that PHP was installed correctly? I followed the install procedures with no errors, however when I upload a PHP file to test to see if it works, it doesn't. Anyone know a way to make sure it's installed and working?

[ Reply to This | # ]
Found the answer!
Authored by: macupdate on May 05, '01 11:18:36AM

I found that you have to enable the PHP4 tags in httpd.conf instead of the
PHP3 files:

#AddType application/x-httpd-php3 .php3
#AddType application/x-httpd-php3-source .phps
# And for PHP 4.x, use:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

[ Reply to This | # ]
PHP and gd and freetype
Authored by: wusamah on May 05, '01 01:58:35AM

Can someone please show us how to install php to support gd 1.8.4 with freetype2.

I've managed to get gd working with php. but when I tried make with gd to include freetype I get all kind of undefined file error.

Thanks in advance.

[ Reply to This | # ]
okay, i'm having some issues
Authored by: jodin on May 12, '01 01:35:57AM

i followed the directions exactly, and although there were some errors (the grant all command woudn't work) i managed to get it up and running and even run through the tutorial on webmonkey. then i went about trying to create a new database and something went wrong - now i can't even start the MySQL server!

the error i kept getting concerns a error message file buried deep in the english directory of mysql. here's the exact error:

010512 00:10:28 mysqld started

/usr/local/libexec/mysqld: Fatal error: Error message file '/usr/local/share/mysql/english/errmsg.sys' had only 194 error messages, but it should have at least 196 error messages.
Check that the above file is the right version for this program!

010512 00:10:28 mysqld endedn

okay, so here's what i did (don't get mad at me). after about 20 of those i reinstalled the package and then ran install from the CLI. i still got the error so i went in and deleted the offending file and reinstalled again. then when running safe_mysqld & i was getting an error :

010512 0:25:58 Can't start server: Bind on TCP/IP port: Address already in use

just for the hell of it i deleted that messagefile again and tried to start server again. this time i got the obvious:

/usr/local/libexec/mysqld: Fatal error: Can't find messagefile '/usr/local/share/mysql/english/errmsg.sys'

at this point i reinstalled again and am getting

010512 0:45:39 Can't start server: Bind on TCP/IP port: Address already in use

but i can't find the server running.

PLEASE HELP! i'm obviously a newbie with this and not getting a good grasp on what i'm doing wrong.


[ Reply to This | # ]
fixed it!
Authored by: jodin on May 13, '01 10:54:33PM

okay, got it. i had to go in and do a rude kill (kill -9 pid) to get the other SQL process stopped. once that was done i could fire it right back up! i guess the error about the incorrect errorlog size is gone, so who cares!

[ Reply to This | # ]
problem with hostname
Authored by: theolein on May 14, '01 07:15:45PM

did the mysql package thing and it installed into /usr/local/. But when I tried the following....

[lemac:local/mysql/bin] root# ./mysql_install_db

I got this ...

Sorry, the host 'leMac' could not be looked up.
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option

So I ran ./resolveip leMac and it of course could not find the host. The leMac name of couse was what I entered when I was installing OSX. Could somebody please tell me where I can find where this hostname is stored, what I should change it to or if I should just go ahead and use the --force switch on the script

[ Reply to This | # ]
bus error? question...
Authored by: karmand on May 23, '01 03:22:32PM

It all installed fine. I've done it a few times to be sure.
Here is the prob:
After using this config for a while, three days...
I restarted and now apache will not start...
the error is:
cannot start httpd
bus error
What's up with that?

osx 10.0.3

[ Reply to This | # ]
bus error? question...
Authored by: onlymacintosh on Jun 23, '01 07:34:40PM

Maybe it's incorrectly killing a pid? Try tailing the log file:

tail -f /var/log/httpd/error_log at the command line and then restart apache and see what the error is.


[ Reply to This | # ]
php link does not work
Authored by: yogiqan on Oct 21, '01 02:13:25PM

hi, tried to download php4 from the link supplied, but all I get is a page displaying an iTools folder where the supposed links at the bottom do not work, neither in X nor in 9.1, IE both times. Any suggestions or any other links?

[ Reply to This | # ]
php link does not work
Authored by: chusa on Aug 29, '03 03:25:29PM

Try ->

good luck!!

[ Reply to This | # ]
Apache compilation failed
Authored by: splacknuck on Dec 03, '01 02:42:30PM
What do I make of this? Developer tools are installed. No experience whatsoever.
./configure --enable-module=most --enable-shared=max Configuring for Apache, Version 1.3.22 + using installation path layout: Darwin (config.layout) Creating Makefile Creating Configuration.apaci in src + enabling mod_so for DSO support ./Configure: cannot allocate memory: sed [150] ./Configure: cannot allocate memory: sed [151] Creating Makefile in src + configured for Darwin platform + setting C compiler to cc + setting C pre-processor to cc -E -traditional-cpp + checking for system header files + adding selected modules + using builtin Expat + checking sizeof various data types + doing sanity check on compiler and options ** A test compilation with your Makefile configuration ** failed. The below error output from the compilation ** test will give you an idea what is failing. Note that ** Apache requires an ANSI C Compiler, such as gcc. cd ..; cc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED -o helpers/dummy helpers/dummy.c /usr/bin/ld: /usr/lib/libSystem.dylib load command 6 unknown cmd field make: *** [dummy] Error 1 ======== Error Output for sanity check ======== ============= End of Error Report ============= Aborting!

[ Reply to This | # ]
Apache compilation failed
Authored by: splacknuck on Dec 05, '01 02:23:35AM

Someone suggested updating the Developer Tools to 10.1. I'll give it a try, but I have my doubts -- it has worked before under varios flavours of 10.x with the original Dev-Tools (I suppose). Or have there been various Dev-Tools updates?
I'll keep posting here if I find a solution.

[ Reply to This | # ]
Apache compilation finally worked!
Authored by: splacknuck on Dec 06, '01 07:38:44AM

Tell you what: it was the version of OS-X-Dev-Tools! After several attempts at downloading the 187 MB image, I got rid of the old version, installed the 10.1 version and then it finally worked. The importance of the Developer Tools' version should be stressed at the beginning of such a tutorial.

We're Mac-users after all!

[ Reply to This | # ]
Authored by: tra2er on Jul 25, '02 05:19:10PM

why don't you use the apache build that comes with osx ??

[ Reply to This | # ]
Apache-mySQL-PHP installation tutorial
Authored by: cilly on Aug 29, '03 10:16:52PM
I recommend following the instructions at:

Apple Internet Developer


[ Reply to This | # ]