My advice: Install Apache and PHP from source, and MySQL from a binary before doing both. I've had problems doing what you did.
Instructions (Where % represents the command line, and are in [code] blocks):
Download the Standard OS 10.3 Installer Package from
here (4.1 somes with a System Panel, which is useful

). Run all the installers in the disk image. Install it, and go to the MySQL panel is System Preferences, now, turn MySQL on.
Open Terminal:
Code:
% cd ~/Desktop
% mkdir gdbuild
% cd gdbuild
% curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
% curl -O http://heanet.dl.sourceforge.net/sourceforge/png-mng/libpng-1.2.7.tar.gz
% gnutar xzf jpegsrc.v6b.tar.gz
% gnutar xzf libpng-1.2.7.tar.gz
% cd jpeg-6b
% sudo mkdir -p /usr/local/include
% sudo mkdir -p /usr/local/bin
% sudo mkdir -p /usr/local/man
% sudo mkdir -p /usr/local/lib
% sudo mkdir /usr/local/man/man1
% ./configure
% sudo make install
% sudo make install-lib
% sudo ranlib /usr/local/lib/libjpeg.a
% cd ..
% cd libpng-1.2.7
% cp scripts/makefile.macosx ./Makefile
% pico Makefile
Now, the changes you have to make are both near the top, find:
Code:
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
ZLIBLIB=../zlib
ZLIBINC=../zlib
and replace with
Code:
# Where the zlib library and include files are located
ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include
#ZLIBLIB=../zlib
#ZLIBINC=../zlib
Press Ctrl - O (as in Ouch), then Return to save, then Ctrl - X to exit.
Then, back to the command line
Code:
% make
% sudo make install
% sudo ranlib /usr/local/lib/libpng.a
% cd ..
% cd ~/Desktop
% mkdir apachebuild
% cd apachebuild
% curl -O http://apache.mirrors.esat.net/httpd/apache_1.3.33.tar.gz
% gnutar -xzf apache_1.3.33.tar.gz
% cd apache_1.3.33
% ./configure \
--enable-module=most \
--enable-shared=max
% make
% sudo make install
Now, for some odd reason, we have to reinstall all of the GD stuff, so, Terminal again.
Code:
% cd ~/Desktop
% mkdir gdbuild2
% cd gdbuild2
% curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
% curl -O http://heanet.dl.sourceforge.net/sourceforge/png-mng/libpng-1.2.7.tar.gz
% gnutar xzf jpegsrc.v6b.tar.gz
% gnutar xzf libpng-1.2.7.tar.gz
% cd jpeg-6b
% sudo mkdir -p /usr/local/include
% sudo mkdir -p /usr/local/bin
% sudo mkdir -p /usr/local/man
% sudo mkdir -p /usr/local/lib
% sudo mkdir /usr/local/man/man1
% ./configure
% sudo make install
% sudo make install-lib
% sudo ranlib /usr/local/lib/libjpeg.a
% cd ..
% cd libpng-1.2.7
% cp scripts/makefile.macosx ./Makefile
% pico Makefile
Now, the changes you have to make are both near the top, find:
Code:
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
ZLIBLIB=../zlib
ZLIBINC=../zlib
and replace with
Code:
# Where the zlib library and include files are located
ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include
#ZLIBLIB=../zlib
#ZLIBINC=../zlib
Press Ctrl - O (as in Ouch), then Return to save, then Ctrl - X to exit.[/code]
Now, that's done again, we can get on with building PHP:
Code:
% cd ~/Desktop
% mkdir phpbuild
% cd phpbuild
% curl -O http://ie.php.net/distributions/php-4.3.11.tar.gz
% gnutar -xzf php-4.3.11.tar.gz
% cd php-4.3.11
% ./configure \
--with-ftp \
--with-xml \
--with-zlib \
--with-gd \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-mysql=/usr/local/mysql \
--with-apxs=/usr/sbin/apxs
% make
% sudo make install
If you want a php.ini file:
Code:
% sudo cp php.ini-dist /usr/local/lib/php.ini
Now, you
need to edit httpd.conf, so, pico again
Code:
% sudo pico /etc/httpd/httpd.conf
This time, the edits are:
Commenting out (Placing a # a the beginning of the line) the following lines:
Code:
LoadModule hfs_apple_module libexec/httpd/mod_hfs_apple.so
and
Code:
AddModule mod_hfs_apple.c
Now, here's where it changes from OS to OS, if you are on Tiger (Mac OS 10.4), you have to comment out:
Code:
LoadModule bonjour_module libexec/httpd/mod_bonjour.so
and
Code:
AddModule mod_bonjour.c
If you are on Panther (Mac OS 10.3), you have to comment out:
Code:
LoadModule rendezvous_module libexec/httpd/mod_rendezvous.so
and
Code:
AddModule mod_rendezvous.c
Now, save and exit (Ctrl - O, Return, Ctrl - X). Now, all you need to do is start/restart Apache:
Code:
% sudo apachectl restart
MySQL will now have it's default root password (nothing) and should be changed using
Code:
% /usr/local/mysql/bin/mysqladmin -u root password new_password_here