PDA

View Full Version : Cannot connect to web server??




omar123
May 25, 2009, 10:12 PM
Hi everyone, I've been trying to get PHP and mysql working for the first time on my mac. Everything seems to be installed.

Whenever I go to the web browser and type in localhost or 127.0.0.1 or my ip address the browser just says it can't connect.
http://screencast.com/t/OafvX7rvqBS

Some searching gave me a command prompt which gave me the following error but I do not understand it:

omars-imac:~ Omar$ sudo apachectl -t

httpd: Syntax error on line 116 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/libphp4.so into server: dlopen(/usr/libexec/apache2/libphp4.so, 10): image not found



omar123
May 25, 2009, 10:17 PM
Probelm seems to be solved. I check out line 116 and it says that it couldnt load libphp4. I looked at the file and found that I had libphp5 already. Both were uncommented with no pound signs so I commented libphp4.

http://screencast.com/t/uIHoMYVS

omar123
May 25, 2009, 10:18 PM
My problem now is that PHP files just print php code to the screen instead of executing. How do i get PHP to actually execute in the browser:

http://screencast.com/t/yo6n0aCr8q

omar123
May 25, 2009, 10:24 PM
Working now.

It seems the PHP file wasnt written write in Text Edit. When loaded in Text Wrangler it was printed as ASCII text.