Safari not rendering PHP

Discussion in 'OT Technology' started by hurleyint1386, Dec 5, 2007.

  1. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    I'm writing PHP pages, and they aren't rendering in Safari. They are working in Firefox, but not Safari. I don't see why. Can anyone help me out?
     
  2. ROFLCORE

    ROFLCORE Guest

    umm, weird.
     
  3. ROFLCORE

    ROFLCORE Guest

    links?
     
  4. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    They are local files on my machine
     
  5. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    the thing is, my php page has no php code in it. it's just the .php extension.

    "Well then why use the .php extension?"

    because i will be using PHP code in it
     
  6. Ev0lv3

    Ev0lv3 New Member

    Joined:
    Nov 4, 2006
    Messages:
    202
    Likes Received:
    0
    you cant use PHP extensions on a local machine not running a PHP server.

    Upload it to a webserver with PHP and they will be viewable. Pain in ass yes, but thats life.
     
  7. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    Please read the first post. I have PHP installed and running on my laptop. It works in Firefox, however doesn't work in Safari. Leopard has PHP pre-installed. :ugh:
     
  8. Ev0lv3

    Ev0lv3 New Member

    Joined:
    Nov 4, 2006
    Messages:
    202
    Likes Received:
    0
    Sorry, but your first post doesn't say anything about a PHP server being present, and I didn't know leapard has PHP pre-installed. I'm new to mac's.
     
  9. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    Sorry, I thought it was clear when I said it was working with Firefox, but not Safari
     
  10. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    ok, so i just realized that what's really happening is firefox is just rendering the html, but the php code is still in the view source. so something is wrong with either php or apache2
     
  11. mobbarley

    mobbarley Active Member

    Joined:
    Mar 4, 2005
    Messages:
    9,256
    Likes Received:
    2
    Location:
    Sydney
    php is a 'server side' code, firefox is just ignoring the php and parsing the html, safari obviously doesnt want to touch it. If you want your php code to work you need to host it on a webserver (like apache, mac os already has one, web sharing in sharing control panel), then browse to it with your browser.
     
  12. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    I already know this. I'm a web developer, I work with servers all the time. When I upgraded Leopard, I started Apache2 and uncommented the php5 module in the httpd.conf. Leopard comes pre-installed with both Apache2 and PHP5, so to enable PHP5, you must uncomment that line. I have done that, and restarted the Apache2, I've even tried restarting my computer. It's still not working
     
  13. DouggieJ

    DouggieJ OT Supporter

    Joined:
    Nov 1, 2007
    Messages:
    8,126
    Likes Received:
    0
    Location:
    New York, NY USA
    You have to edit the Apache configuration to enable php and specify what folder(s) the php scripts will be in.
     
  14. mobbarley

    mobbarley Active Member

    Joined:
    Mar 4, 2005
    Messages:
    9,256
    Likes Received:
    2
    Location:
    Sydney
    right, so why did you ask why your php pages arent working in safari? :o
     

Share This Page