Localhost offline after upgrade

After an upgrade from Tiger to Snow Leopard the localhost is not responding anymore.

Apple support has run an ACCD on my machine and concluded that the Apache upgrade has failed.
Apple support told me they do not have a support document that describes how to reset/ reinstall Apache. They can tell me that when I reinstall Apache myself, I loose support (hmmm).

Caught between two fires: can anyone tell me how I reset/ reinstall Apache on SL (without forcing me to do a clean SL install).

Regards,
Coen

PM G5 DP 2.0GHz, MBP 2.16GHz C2D, Mini 2.53GHz C2D + SLServer, Mac OS X (10.6.2), 2Gb memory, 23" WXGA screen, 2.5Tb storage

Posted on Nov 13, 2009 4:23 AM

Reply
12 replies

Nov 13, 2009 4:35 AM in response to Barney-15E

To be more specific (thanks for reminding me).

When using a webbrwoser to connect to my localhost I get the message "Safari can't open the page http://localhost/" because Safari can't connect to the server 'localhost'".

My MBP came with Tiger. I installed PHP and MySQL on it as well. Have used localhost for 2 years without problems.
This weekend I purchased SL and ran the install. The eintire upgrade went well without issues.

Only my Localhost is not working. Obviously PHP and MySQL don't work either.

Coen

Nov 16, 2009 3:08 AM in response to Barney-15E

Barney,

I ran the command
apachectl configtest


This is the result:
d-essence:~ dessence$ apachectl configtest
httpd: Syntax error on line 459 of /private/etc/apache2/httpd.conf: Syntax error on line 15 of /private/etc/apache2/extra/httpd-userdir.conf: Syntax error on line 8 of /private/etc/apache2/users/+entropy-php.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): no suitable image found. Did find:\n\t/usr/local/php5/libphp5.so: no matching architecture in universal wrapper


An error. I have no clue what it means.

Nov 16, 2009 4:20 PM in response to Coen Jeukens

It means that it can't find the php library that the config file is telling it to load.

You could try to reload whatever you did to install php, or you could use Apache's default library at: libexec/apache2/libphp5.so.

The config files are just text files that can be edited with any text editor. I use TextWrangler because it lets me authenticate the file to edit.

You need to edit the /etc/apache2/users/+entropy-php.conf file and change the line that has this:
LoadModule php5_module /usr/local/php5/libphp5.so
to
LoadModule php5_module libexec/apache2/libphp5.so
You'd probably be better off getting help from the people who created the php installer you used.

Nov 17, 2009 1:31 AM in response to Barney-15E

Barney,

I will try the change and report.

About the install: the funny thing is I did NOT install PHP on SL. The PHP files are from the Tiger install. In the upgrade to SL the installer failed to upgrade my former PHP (Tiger) references).

Apple Support tells me that the SL upgrade installer IS capable of upgrading Apache, but if you have 3rd party code like PHP and/ or MySQL, the installer fails. As I have witnessed.

Going to try your change now.

Back in 30 mins

Nov 17, 2009 1:57 AM in response to Coen Jeukens

Barney,

Bingo. It works.

Apache and PHP working fine. Thanks.

I will start a separate thread for a error code 2002 issue with the socket for MySQL.
Warning: mysql_connect() [function.mysql-connect]: [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock) in /Users/dessence/Sites/dessence/sql/dbinfo.inc.php on line 5



Coen

Message was edited by: Coen Jeukens

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Localhost offline after upgrade

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.