Safari doesn't open PHP files

If i try to open a PHP file in safari, it shows the code. If the PHP file isn't local, for example, on a local website (using air sharing on my ipod touch and adding php files to it), it will download the file. If I open it there, it will only display the codes like it does on the original file on my mac. I'm trying to use wordpress but it doesn't work. Once I think i saw some of the page working (it was the login page and it was PHP). But i've tried everything i could do but it never worked again. Please help me! Thanks!

You don't open PHP files in Safari.
Safari doesn't know how to run PHP code so it just displays the file content.
You need to run them under a web server - the web server runs the code and outputs the appropriate content.
By default, on Mac OS X you start up the built-in web server (System Preferences -> Sharing -> Personal Web Sharing) and should place the files in /Library/WebServer/Documents/
You then access them in Safari via something like:
http://localhost/my.php

Similar Messages

  • Safari doesn't open PDF-files on a homepage

    Hey there,
    I bought the new iPad to work with it at the university.
    Now I can't even open the PDF-files from our homepage (it's moodle). Safari shows me the first site of the file and I'm not able open it in another program or even copy and paste the presentation.
    I installed Acrobat Reader but nothing changed, using the link of the file in keynote wasn't the answer... so what's the solution -.-
    Ian

    Great idea but it's not working ...
    I'm studying at The University of Education at ludwigsburg, Germany.
    Your App wasn't sucessfull maybe our modle Version is older than 2.4 or i'm not able to enter the right URL.
    Or where can i change the certificat?
    Have fun with my English written on a german keyboard.
    Ian

  • Linking to a MS word file in Safari does not open the file

    I access a web site that has hyperlinks to MS Word files. When I click on the link the following happens.
    1. I get a new empty window
    2. I get the download window showing the file
    But the file does not load in Word.
    I have to manually click on the file to load it into word.
    When I access the same page with Firefox,and click on the hyperlink the Word file loads into Word with no action required by me.
    Is this they way Safari works or is there some preference I can set to make it load the file into Word?
    Safari does open pdf files fine.

    1. I get a new empty window
    2. I get the download window showing the file
    This is normal for a site that has the Word files links set up to open in a new page. (Which is almost necessary in Windows IE, since IE will open the Word doc in the same browser window otherwise, losing all web site navigation.) But Safari doesn't open Word files directly, so you get that blank new window while the file downloads in the background.
    But the file does not load in Word.
    What do you have in Safari > Preferences, in the General section, for "Open safe files after downloading"? If you have that box checked, files that the Mac OS considers "safe" (JPEGs, PDF files, etc.) will open automatically in the default program for that type of file. The only question is whether Word documents are considered safe. They might not be, since they can carry macro viruses. Checking now...
    I tested that, and it seems that Word files are not considered "safe" files and will not open automatically with that setting checked. The alternative: when the downloads window opens, it shows the file you just downloaded. You can double-click on the Word file's icon to open it in Word, without navigating to the downloaded file on your hard drive to open it.
    Message was edited by: Rachel R

  • Safari doesn't open Pop-up & Script Windows?!

    Why Safari doesn't open Pop-up & Script Windows?
    I always have to use other browsers like Firefox for opening them
    Example link (Download Datasheet):
    http://www.grapheast.com/ge-software/cp.php?id=70
    Can anyone help please?

    With Safari open, from the Menu Bar click Safari. Where says; Block Pop Up windows, Deselect that.
    Keep in mind pop up windows can contain malicious code.
    Carolyn

  • Safari will not open pdf files.

    Safari will not open pdf files, instead I get a blank grey screen. How can I get a viewable and downloadable screen/file? Tried Alt/Option to view and it doesn't work either. Firefox and Chrome will not work either.

    For Mac check the Safari preferences.
    General to set the options for opening links from applications.
    Tabs to set the other options.
    Hold down the command key to open any link in a new tab.
    Sorry, gave up windows several years ago.

  • Safari won't open php's

    safari 5.1 os 10.68
    Trying to open a php web page
    shows a blank page

    I believe that the Safari preferences setting "Open safe files" only deals with files actually DOWNLOADED to the computer, not stuff that isn't actually downloaded but that is supposed to open in a new Safari browser window.
    I have never had "Open safe files" selected, not ever, and I've never had PDFs not open in a browser window unless some other something or other was causing the problem, in this case it was  <AdobePDFViewerNPAPI.plugin>.
    Removing that Plugin is what worked for me......
    Since don't remember any version of Adobe Reader Application ever asking me to ‘accept terms’ when I've opened it (unless it was on the Adobe web site before I was allowed to download the software*) I can't say that it isn't also problematic.
    *That makes the most sense to me

  • I am having issues with trying to update safari.  It keeps saying, "Safari can't open the file "Safari_Updater-2.exe" because no available application can open it.

    I am having problems with trying to update safari and this keeps popping up, Safari can’t open the file “Safari_Updater-2.exe” because no available application can open it.  Also, I have a bunch of pops and I have my pop up blocker on but I keep having pop ups. 

    The info below should help with your pop-up issue.
    Check the links below for options to remove the Adware
    Easy method: http://www.adwaremedic.com/index.php
    Somewhat more difficult method: Remove unwanted adware that displays pop-up ads and graphics on your Mac - Apple Support
    And, read this article below to see how the Adware arrived on your computer.
    How to install adware
    The Safari update can be found at The App Store updates section. Where are you obtaining the file?

  • I can't set Firefox to open PHP files with Firefox (in preferences- applications-php files) Firefox won't accept anything but "always ask" and Preview. I want to preview php files in Bbedit and that requires that Firefox can open it.

    with an open php file in Bbedit (Macintosh) it was possible to preview appearance by chosing "Preview in.." in Bbedit's "Markup" menu. This called Firefox to open and display the file. Now, doing this continually repeats a "Open with (choose)" request.

    Unfortunately this solution doesn't work for me for local files (on my computer). Still I can only choose to open in Notepad or "other". It seems that I can select Firefox, but it won't do anything when I actually select it.... I did NOT have this problem with the previous version of Firefox (before 6.0.2). The only thing that's changed, is the Firefox update from yesterday (September 28th, 2011).

  • Safari doesn't open and doesn't work at all!!!

    Since three days ago, I can open safari at all. I just bounces twice and then stops. I have already tried the solutions offered in other threads which complain about similar problems with safari but safari remains troubled. I am not good at this. Please can an apple expert tell me how to fix safari step by step.

    Please somebody answer ! Safari doesn't open at allg and there's not any messages from my Mac telling me what's going on!
    I have tried to uninstall safari but i couldn't. Should I reinstall everything? Can i uninstall safari and get a new copy of safary?
    MS Explorer 5.2 still works, but I prefer safari as i have all my bookmarks in it.
    Any suggestions?
    Please : )

  • Double clicking on a file launches the app but doesn't open the file anymore. Why?

    Double clicking on a file launches the app but doesn't open the file anymore. Why?

    I would post in the Illustrator forum here http://forums.adobe.com/community/illustrator or the Dreamweaver forum here http://forums.adobe.com/community/dreamweaver. One of these product forums will be able to help.

  • Safari doesn't open after i updated it to 1.6.8

    Safari doesn't open after i updated it to 1.6.8

    Reinstall Safari 5.1.2
    Then restart your Mac.
    If that doesn't help, you may have a third party add on that was compatible with the prior version of Snow Leopard, but not 10.6.8.
    Troubleshooting help here >  Safari: Unsupported third-party add-ons may cause Safari to unexpectedly quit or have performance issues
    And try Safari in another user account. If you can't open Safari there as well, that's an indication the startup disk may need repairing.
    Log back in to your admin account, launch Disk Utility. That's located in /Applications/Utilities
    Select the startup disk on the left then select the First Aid tab.
    Click: Verify Disk  (not Verify Disk Permissions)
    Help for repairing the disk if necessary here > Using Disk Utility to verify or repair disks

  • Quicktime doesn't open AVI file with Perian installed

    I have installed Perian but Quicktime X doesn't open AVI files for a week. I have repaired permissions. But Quicktime only plays the AVI file if I reboot the Mac. VLC always plays the file. The AVI codec is XVID. Quicktime doesn't play other formats such as FLV. I have deleted .plist files, com.apple.QuickTimePlayerX.plist. I have found other files(com.apple.QuickTimePlayerX.plist.0GH3f31, com.apple.QuickTimePlayerX.plist.0h9MBzV...) that I deleted also. Any idea? Thanks

    And now ... surprisingly I view AVI files in Quicktime without Perian.
    QT has very limited AVI support (file type and a few older codecs) built in. Most common codecs use by Windows users, however, require the additional support provided by Perian. If the AVI files are now playing in QT without Perian, then simply check the Inspector, Properties, or Info window to see which codecs are in your AVI file and you should be able to tell if they are among those supported "natively" by QT. Also note that this regaining of the ability to play your files may indicate a component conflict of some sort may have existed previously.

  • Safari doesn' t open some web site

    Hi,
    I have a problem with my Mac Mini: From Yesterday Safari doesn' t open many web sites. I tried to cancel cache and chronology, but without success.
    I tried to download another browser, but It I can' t.
    What can i do?
    Thanks

    Avast is the problem. This is a list of links for threads regarding Avast and the issues it can cause on your Mac  > Community Search: Apple Support Communities
    Follow the instructions for uninstalling Avast >  How to remove Avast Antivirus from a Mac
    If you really want to have anti virus software installed on your Mac, try Free Antivirus for Mac Tool Download | Sophos
    Do not install Sophos before completely removing Avast.

  • I recently had some repairs done to my ATT U-verse connection, and now my Safari doesn't open in a full screen.  How do I reset that to open in full screen?

    I recently had some repairs done to my ATT U-verse connection, and now my Safari doesn't open in a full screen.  How do I reset that to open in full screen?

    Mountain Lion is set up to close windows when you quit a program instead of saving them. To change this, put Safari in full-screen mode, move the cursor to the top, open Safari menu while holding Option key and close Safari from the menu.
    If you want to do it automatically with all programmes, open System Preferences > General, and deactivate "Close windows when quitting an application"

  • Safari doesn't open on my Ibook G4

    My Ibook G4 is a second hand computer so I reinstalled the software Mac OS X 10.3.3.
    Now Safari doesn't open anymore...
    How can I fix or reinstall Safari?
    Grts!

    Hi Chuck,
    As suggested above, what does Grab do when you try to open it?
    If the Grab icon appears in the Dock then it "is" open. Grab is a funny little utility in that there is no "window" that opens when you open Grab. The top menu bar though, will change to the Grab menus. In these menus you can go to the Capture menu for what you are trying to do.
    On the other hand, if you are saying that the application just bounces in the Dock or does nothing or opens to immediately quit, this is another kettle of fish?
    Perhaps if you can post back with what actually happens when you try to open Grab we can try to get to the bottom of it.
    littleshoulders [:-)
    PS. Please remember to take advantage of the Solved/Answered and Helpful feature of your topic. This not only rewards those trying to help you but alerts future users to which topics were Solved/Answered and to which posts within were the most Helpful in solving the problem.

Maybe you are looking for

  • Dual Radeon video card -- Second card Unknown/4th monitor

    My initial plan was to use four monitors on my Radeon HD 6790 as follows: 1 Single-link DVI-D = monitor1 dvi 1 Dual-link DVI-I = monitor2 dvi 1 Display Port = monitor3 dvi with adapter 1 HDMI = new monitor This did not work as I could not use the hdm

  • Iphone 3Gs on Windows Vista 64 bit

    What programs are included with the iphone 3Gs for downloading photograph to a windows vista 64 bit machine? Is there an iphoto version for windows? How about video downloading?

  • Which tables store the domains and data types?

    Hi. From what I know, DD01L stores all the domains (both SAP and user-created) in the system. Is this understanding correct? As for data types, which table stores them? Thanks.

  • RFQ and PO XSL-FO reports

    Hello All, We are currently implementing R12 (Sourcing, Purchasing etc) for one of the customer in APAC region, and we have to modify standard RFQ and PO XSL-FO reports. We are able to modify XSL files. But if we have to add new fields, we need to mo

  • Current version of airport utility will not connect with older airport express

    I was given an older aiport express that I want to add to my network for iTunes sharing.  I have an airport express and aiport extreme currently.  I am running Mac OS x 10.7.5.  My current version of airport utility does not support this express and