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

elliotpo

macrumors newbie
Original poster
Sep 18, 2009
5
0
Hi, I'm fairly new to this all and new to this forum -

Prior to Snow Leopard, I had no trouble accessing localhost with a browser. Since then - and since blanking the hard drive and re-installing Apache -- I can't get any browsers to pull anything from localhost. I just get a blank screen, no error message at all. I can enter anything after http://localhost, it makes no difference.

After spending some time on some other forums, I entered sudo apachectl -t into the terminal and got this back:

httpd: Syntax error on line 488 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/+entropy-php.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _libiconv\n Referenced from: /usr/local/php5/lib/libintl.8.dylib\n Expected in: /usr/lib/libiconv.2.dylib\n

I can get to those files, but I have no idea how to correct this, or if it's necessary. any advice would be greatly appreciated.

Thanks,

Elliot
 
Did you reinstall Apache from the source? It looks like something just went a little screwy with the install. I've seen other posts like this. I generally use MAMP on my laptop to get a Apache, PHP, MySQL setup. You may want to give it a try.
 
Ah -

I actually didn't reinstall Apache, I'm just sleepy and am getting mixed up. I reinstalled PHP and MySQL. Nothing funny seemed to happen. All settings in the httpd.conf file are the same as they were prior to Snow Leopard.
 
That makes the error make a little more sense since it noted the php5 part, "Cannot load /usr/local/php5/libphp5.so". Does that exist on your install of PHP?
 
Yeah it's there, but -

Is it supposed to look like this? Here's the first number of lines:



^@^@^@^D^@^@^@^G^@^@^@^C^@^@^P^@^@ @^@^@^L^A^@^@^G^@^@^@^C^@ ^@^@ H^@^ $
^A ^@^@ ^@^@^@^L^A^@^@^R^@^@^@^@^B P^@^@ ^@^@^@^L^@^@^@^@^@^@^@^@^@^@^@^ $
^@^@^@ @^B^@^@^@^@^@^@^@^@^@^@^@^F^@^@^@^@^@^@^@^@^@^@^@__jump_table^@^@^@^@_ $
^@^@ G^A^@N^D^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@DU @^H^G^@^@^ $
^@^@^@
^@/usr/local/php5/lib/libfreetype.6.dylib^@^L^@^@^@@^@^@^@^X^@^@^@^B^@^@^@^@^@^$
^@^@^@^ `^@^ D$ ^@^ ^L^ $^P $^L^C^@^@^@^ `^@^ $^H $^D^L^@^@ $
^@^@^@^ g`^@^ D$ I^@^ ^L^ $^P $^L^C^@^@^@^ g`^@^ $^H $^D^L^@^@^@^ $
^@^@^@^ g`^@^ D$ ^ ^@^ ^L^ $^P $^L^C^@^@^@^ Lh`^@^ $^H $^D
^@^@^@^ ]h`^@^ D$ ^@^ ^L^ $^P $^L^C^@^@^@^ Lh`^@^ $^H $^D
^@^@^@^ h`^@^ D$ ^@^ ^L^ $^P $^L^C^@^@^@^ `^@^ $^H $^D
^@^@^@^ h`^@^ D$ I^@^ ^L^ $^P $^L^C^@^@^@^ Lh`^@^ $^H $^D $
{^C^@^
^ Y @^ @^ @^ ^ V9^@^ a^@^ $^H^ e`^@^ $^D D$^B^@^@^ $
^ @^ }^ ^L^ $^D^ ^H^ D$ ^C^@^ t[^ ^H ^ ̸^@^@^@^@ $
^ ^K^ ^_^ ) O* ^OZ ^O^QE O^ @ O^P^@ O^QE ^ @t^K^ $
^C^@^
^ ý @^ @^ @^ D$ ^ ý @^ @^ @^ u
 
If it helps at all (and thanks for answering) Firefox gives me the blank page. Safari tells me the server dropped the request, which sometimes happens, and try again etc etc
 
Is it supposed to look like this? Here's the first number of lines:

If you mean should it look like gooblygook, then yes. I have PHP installed through MAMP so my file may look a little different.

For debugging, try commenting out that line with the libphp5.so in the httpd.conf file (add a # to the beginning of the file). See if Apache starts up fine after that (sudo apachectl -t).
 
Ah, I got it working -

It WAS the line you're talking about; but I had to uncomment it. Thanks.
 
php pages not recognized in MAMP

I am having a similar problem... But I AM using MAMP and from what I can tell, php, MySQL and Apache are all working correctly. However, I placed a set of php files into the root folder (/Applications/MAMP/htdocs) but all I get is a blank page when I browse to localhost. I also tried placing the files into the "sites" folder under user/ and that just shows me a directory listing of the files in that folder. What am I missing or not doing correctly? I am just learning php and have very basic knowledge of how all this works. Any help you can send my way would be appreciated.

Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.