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

fall3n

macrumors 6502
Original poster
Aug 17, 2006
392
0
Ok, so after much hassle of dealing with other packages and all the crap I decided it's best to start fresh and install each thing (apache2, php 5, mysql 5) seperatly, however I'm having a hard time even getting apache2 to install. Anyone have a good tutorial that will work perfectly for an intel imac (intel c2d is best if possible)?
 
There's a howto here which shows how to compile an intel version of Apache from the 2.2 source - i still haven't found a pre-compiled UB version.

You might want to do a clean OS install first, if that's possible.
 
yah, i found that one. I do it and get this errory "-bash: ./configure: No such file or directory"
 
even in the directory it extracted to?

edit] actually... from further down on that page:

I didn’t explore far enough into this blog. The page about compiling issues at http://switch.richard5.net/2006/05/19/compiling-issues-with-os-x-on-the-intel-platform/ had the answer.

I didn’t necessarily want a universal binary, but changing the configure command for PCRE from

./configure

to

CFLAGS=”-arch i386″ ./configure

did the trick and fixed the seg. fault in the pcre tests. I’m sure it will fix apache 2.2.2 up too.
 
same guy has pages on MySQL and PHP for Intel Macs too

and this (again from the comments section) implies that you can rereoute the Personal Web Sharing to manage Apache 2 - and presumably start and stop it automatically/manually from there:

You can also use the Personal Web Sharing section in System preferences if you do the following:
Add this line to your httpd.conf file:
PidFile /private/var/run/httpd.pid
Then rename /usr/sbin/apachectl to apachectl-1.3
and copy (don’t link)
/apache2/bin/apachectl to /usr/sbin/

Instructions taken from here:
http://www.macosxhints.com/article.php?story=20041217125121976&query=apache
and if the make command doesn't work:
install de Developer Tools suite. Search on your HD for the folder /Developer. If it doesn’t exists or is empty then install Developer Tools from your OS X installation media (CDs, DVDs)
 
hmmm, thanks for the tips. I just installed everything to work on apache 1.3 and it works perfectly. I think for tonight i'll leave it at that. I do want to get running on apache2 though. So basically from what I've been reading, if I just install apache2 into a seperate directory then I can presumably use both apache2 and apache1.3, correct?
 
you can't run both concurrently, or at least i don't think so, or if they did they'd have to listen on different ports.. but anyway, you can have them both on there certainly tho. I installed 2 and just turned off the built-in one, and it's happy as Larry
 
frankblundt said:
you can't run both concurrently, or at least i don't think so, or if they did they'd have to listen on different ports.. but anyway, you can have them both on there certainly tho. I installed 2 and just turned off the built-in one, and it's happy as Larry

ah, cool. you must have had to install corresponding versions of php 5 and mysql 5 to go with the apache2, yes?
 
bearing in mind that this wasn't an Intel Mac, yes. Apache 2.0.?, PHP 4.something at least and MySQL 4 i think - it was a long time since i did it, but apart from the fact that it took me ages to work out how to manage users in MySQL, (I've ended up using PhpMyAdmin, which makes it all a piece of cake) and a bit of fiddling to get Apache to talk to PHP, and a bit more to get the permissions and stuff working, and then OpenSSL and Apache Authentication... it was pretty straightforward :D

I used Larry Ullman's books to pick up PHP and MySQL but for the rest I just kept arseing about with it, slowly adding various functions to a test site i had to play with, referring to PHP.net and Apache man pages or Google whenever I got stuck, and after 18 months, I'm reasonably comfortable with it all now.

I'd like to try Apache 2.2 at some point, but i'm not in any rush. It seems to work pretty well now for most of what i want it to do

and it's a great deal more flexible than the external hosting that i've ended up haveing to move a site to, which has been a nightmare - it's so much easier when you can see what's going on right there in front of you rather than doing everything through whatever abysmal interface tools the hosts provide you with.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.