PHP/MySQL on OS X

There were packages around for the PB, but I haven't seen these revamped for the final release -- by now they're installing old versions of PHP and MySQL.

Let's see...MySQL has posted a recent release <A HREF="http://www.versiontracker.com/moreinfo.fcgi?id=8252">for OS X server</A>, but I don't see whether it's readily portable to OS X client. Nor do I see any other info on mysql.com.

Anyone want to try porting?

For both of these, I'd keep your eyes on stepwise.com....
 
I had successfully used the pre-built packages for PHP4 with the Public Beta that I found on the net (can't remember URL). I attempted to use these with the final version and now Apache doesn't work. Attempting to launch "web-sharing" from the system preferences control panel fails as does launching httpd from the command line.
 
Check out <A HREF="http://www.stepwise.com/Articles/Workbench/2001-03-24.01.html" TARGET="_blank">this article</A> at Stepwise -- you should install Apache 1.3.19 over whatever broken version you have right now and work from there.

I've almost got the latest PHP compiling correctly. I'll post again when it's working.
 
(Get the source and unpack it with OPENUP and cd to it)

pico configure
in line 8172: change pear/pear to pear/pearfile
(save changes)

cd pear
pico Makefile.in
in line 89: change phpize php-config pear to phpize php-config pearfile
in line 126: change pear.in to pearfile.in
in line 127: change pear/pear to pear/pearfile
(save changes)

mv pear.in pearfile.in
cd ..

(those are my compile options, yours could be different, specially the apxs location)

./configure --with-apxs=/usr/local/sbin/apxs --with-zlib --enable-ftp --with-mysql=/usr/local --enable-inline-optimization --with-xml

(watch out for that mysql flag... we should really be sure that php is not using the bundled mysql libs and goes for the real 'mysql' we've installed, any pointers?)

make
sudo tcsh
make install

(edit the apache config files, stop it, make a configtest and restart it)

exit

(put a php file on the webserver docs folder and ENJOY!)

dani++

(really check out stepwise, their pointers are very good!)

[Edited by dani++ on 03-30-2001 at 05:44 PM]
 
Awesome! You have done a great favor for those of us who are technically literate enough to use PHP/mySQL but not smart enough to get the configuration stuff working. Now if there was just postgresql support the world would be a perfect place... :)
 
thanx,


really play with the config switches, you'll get the hang of it. To get an overview of the available switches just type
./configure --help
at the command prompt on the unpacked (remember, OpenUp) PHP source distrib.

I'll post concise instructions on MySQL too, the latest version has a compilation glitch, but's easily solved. The compiled version has a couple of quirks but is quite usable.


Too late (01:45 AM) to post those now... =)


dani++
 
I followed the instructions here to install apache and php without a hitch, however, apache doesn't seem to start when I log into X, I have to go into the terminal and 'sudo apachectl start' it. Any suggestions on how to get it to run automatically when the computer boots? Anything would be appreciated!
 
....not that ìm sure but it may be, that in the newer built, they have change the conf-file I think..from apache.conf to httpd.conf..or something like that. I had the exact same problem with my K60 beta. I did a reinstallation..then it worked great.
I couldn´t start with filesharing so I had to write exec httpd..
 
Yeah, they did change it to httpd.conf, though so far as I've found you can only edit it via terminal now, kind of annoying since I'd prefer to do it in bbedit, but that's life. I've got the httpd.conf file all set up properly and it serves perfectly when I start it up myself, but it won't start on its own, when I reboot I have to restart it myself. (please note, I'm not using the websharing control panel but rather straight command line.) On the PB is started on reboot without a problem, but they appear to have changed that in X. Anyone else had this problem?
 
Back
Top