Cannot connect to web server??

Discussion in 'Mac OS X Server, Xserve, and Networking' started by omar123, May 25, 2009.

  1. macrumors newbie

    Joined:
    May 25, 2009
    #1
    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
     
  2. thread starter macrumors newbie

    Joined:
    May 25, 2009
    #2
    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
     
  3. thread starter macrumors newbie

    Joined:
    May 25, 2009
    #3
    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
     
  4. thread starter macrumors newbie

    Joined:
    May 25, 2009
    #4
    Working now.

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

Share This Page