Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > PHP and Apache httpd.conf - what to do?

PHP and Apache httpd.conf - what to do?
Thread Tools
Junior Member
Join Date: Oct 1999
Location: Stockholm, Sweden
Status: Offline
Reply With Quote
Jun 30, 2001, 12:36 AM
 
Any help would be very appreciated. I'm just starting out with PHP/MySQL, but I have yet to succeed with the PHP installation. I first updated Apache to 1.3.19 (worked fine), then tried to installPHP 4.0.4pl1. Installation appeared to be ok, but now Apache won't start. I get this:

"API module structure `php4_module' in file /usr/libexec/httpd/libphp4.so is garbled - perhaps this is not an Apache module DSO?
/usr/sbin/apachectl start: httpd could not be started"

What's going on??
     
Mac Elite
Join Date: Aug 2000
Location: Vancouver B.C.
Status: Offline
Reply With Quote
Jul 1, 2001, 04:52 AM
 
I wrote an article on installing Apache and PHP under Mac OS X.
http://www.macwrite.com/osx/webserver-part-III.php

[ 07-01-2001: Message edited by: Mac Write ]
Get busy living or get busy dying
--Stephen King
     
pegges  (op)
Junior Member
Join Date: Oct 1999
Location: Stockholm, Sweden
Status: Offline
Reply With Quote
Jul 1, 2001, 06:12 AM
 
Thanks MacWrite. That did it for me. I guess I should reevaluate the stance "RTFM"

Now on to figuring out what's wrong with my mysql installation. I get the message
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
when I try to start the server. It worked before, but after a restart it fails to. I really don't have a clue as to what's going on with this...

Edit: reinstalling mysql solved my new problem. Hmmm... I won't dare log out now that I've got the entire trio up and running.

[ 07-01-2001: Message edited by: pegges ]
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jul 1, 2001, 02:23 PM
 
Why does everyone insist on re-compiling/installing Apache to get PHP to work? I too went through the amazingly long process of installing Apache and PHP together. I couldn't start or stop Apache with the button in the "Sharing" system pref. Grr!

Then I actually looked up installation on OS X at php.net. You don't need to install Apache over at all. I don't know if OS X comes with an old version of Apache or what, but it works fine.

PHP's OS X Installation
Make sure to look at the Client installation. This is out-dated information.

Same instructions, but updated by the author

I e-mailed Marc and he told me the configure line. It's:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>./configure --with-mysql --with-apxs;</font>[/code]

His line actually includes additional SQL support for another app, but I use MySQL so I didn't need it.
     
Mac Elite
Join Date: Aug 2000
Location: Vancouver B.C.
Status: Offline
Reply With Quote
Jul 1, 2001, 02:26 PM
 
Your welcome.

I used this article for installing MySQL. I then used my articlefor the Apache and PHP part of the install, since when I used their's, it gave me errors.
http://www.devshed.com/Server_Side/A...BuildingOnOSX/

I think I iwill do my own MySQL article sometime.

CHeck out the rest of the website.
Get busy living or get busy dying
--Stephen King
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jul 1, 2001, 02:52 PM
 
Marc also has a MySQL installer package on that same website I listed above. It was a very simple install, but setting it up still requres the CL or however else you want to do it. I think it works so nicely because it's already build for OS X and his installer just throws the files where they need to go, just like every other OS X installer out there.

He also wrote a startup script and put that into an installer package. It just copies it to StartupItems, but it works. The only problem was I had to change the shell script a bit. It wanted to use a username "test" that he explains about on his website. It's easy enough so anyone can do it. I'm going to use it just so I won't have to compile it everytime.

Plus, around Sept, I will have to do this all again on another computer. I'm glad that all this will be much easier than when I tried to do it for the first time.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:41 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2