Opening .php documents

Hi, I am a recent MAC user, switchin from win (desktop) and unix (shell)
I have just copied a website locally (using wget -mirror) and even thoug I can browse the entire website online, php documents locally don't work. It's as if PHP is not running/installed/enabled. With Safari I can see the code, as if I opened with textedit; with FireFox, it prompt to save the file. What am I doing wrong? Do I need to start Apache or something?
I hope I asked the question correclty
TIA
Raymond

PHP scripts run on a web server, not in the browser.  In order to run a PHP script, you must do so from a PHP-enabled web server.  Although PHP and a web server are already installed on your Mac, neither is enabled by default.  You can turn on Web Sharing in System Preferences -> Sharing to turn on the Apache web server, but you would still need to edit an Apache configuration file to enable PHP.  Even then, you would need to put the PHP script in your Sites folder and access it via the server by entering a local URL (eg, http://localhost/~yourusername/somescript.php).  And even then, the PHP script might not work as-is without other code in other locations from the original server.

Similar Messages

  • Getting Error 404 when trying to open php documents in DW CS3 Test server

    I am new to DW, php, MySQL and Apache. I have set up a test
    environment but obviously have done something wrong. I currently
    create my web pages from scratch in notepad and update my site with
    a GUI FTP program, but I know with these new tools, I will
    eventually be able to create the type of web site that I really
    want and need. Every time I try to open any php document in DW CS3
    using the"Preview/Debug in browser" button I get an error 404. The
    browsers I use are ie7.0.5730.11 and Nav 9.0b2 . I know this may
    not even be a DW issue, but I really am at an impasse. Any help
    would be much appreciated.

    Jharek Wolf wrote:
    > As I previously mentioned I am new to Apache also. Are
    you willing to
    > continue helping me?
    It sounds as though you need to be taken through this process
    step by
    step. Even though you say you defined a testing server, the
    fact that
    you didn't have your documents in the server's document root
    suggests
    your site definition might also be wrong.
    First things first. Since you're new to Apache, what happens
    when you
    type
    http://localhost/ into your browser
    address bar? Depending on the
    version of Apache, you should get an Apache test page or
    simply a page
    that says "It works!". If you get neither, it means Apache is
    either not
    running or that it has been incorrectly installed.
    Assuming Apache is working, have you installed PHP? If so,
    put the
    following code into a blank file (there must be no HTML or
    DOCTYPE -
    just the following line):
    <?php phpinfo(); ?>
    Save the file as test.php in the Apache document root. Then
    type
    http://localhost/test.php into
    your browser address bar. If you see a
    page with masses of detail about your PHP configuration, PHP
    is working.
    You can then move to the final stage. Create a new folder
    inside the
    Apache document root. This is where you should store your
    site. If you
    call it "mysite", these are the settings you need in the
    Testing server
    definition:
    Testing server folder: /path/to/htdocs/mysite/
    URL prefix:
    http://localhost/mysite/
    Don't take "/path/to/htdocs/mysite/" literally. It indicates
    the
    location of htdocs/mysite on your local hard drive. Use the
    folder icon
    to the right of the Testing server folder field to navigate
    to it.
    If you're new to PHP, you might find that my book, "The
    Essential Guide
    to Dreamweaver CS3 with CSS, Ajax, and PHP" answers a lot of
    your
    questions. It covers all the Dreamweaver PHP server behaviors
    in detail,
    as well as teaching the basics of PHP and database
    maintenance. You can
    find more details by following the link in my sig.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Can I open and render a local .PHP document?

    I have some .PHP documents on my local harddrive. I have Textmate (a text editor) set as the default application to open these documents. However, I would also like to open and render them in Safari. If I click COMMAND-O in Safari to get a Finder window, I can navigate to my .PHP documents, but I cannot open them because they are grayed out. I can't find any preference that would allow me to open them.
    In Firefox I can open a .PHP document in this way and it will render (albeit somewhat incompletely). Is this functionality absent in Safari?

    This doesn't work for me. I enabled web sharing in system preferences and enabled PHP5 by following the instructions here, but when I try to open a .PHP file in Safari, they are still grayed out in the Finder window.
    Is the idea that I need to drop the .PHP files into the Sites directory and view them through Apache? (I'm hoping to be able to just view them from any directory on the harddrive, the same as I can do with Firefox.)
    Message was edited by: billmcn

  • 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

  • Recent Pages update isn't recognized on my MacBook Pro. Tried to open a document I created and I get a message that says I need to update to newer version to open that document. How do I reload the latest update for Pages in Maverick?

    After updates to Pages and several other applications I received an update to Mavericks 10.9, all of which were downloaded and uploaded to my MacBook Pro. After the uploads I created a document in Pages which I saved to my folder. Now when I try to open it I      get a message that says I need the latest version of Pages to open this document. What do I need to do to reload the last update to Pages so I can open my document?

    In both cases you have 2 versions of Pages on your Mac.
    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Judging from sterling r's response Apple has not only managed to confuse all its users, but also itself.
    Note: Apple has removed over 90 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

  • Some files in "DOCUMENTS" icon in dock won't open. Get msg saying You need a newer version of Pages to open this document." Have Pages 4.1 installed.  Same files will open ok from Finder, Pages App. Recently sync'd with ipad2 (Pages) after iOS5 installed.

    Some files in "DOCUMENTS" icon in dock won't open. Get msg saying "You need a newer version of Pages to open this document." Already have Pages 4.1 installed.  Same files will open ok from Finder/Pages App./selected file. Prob not noted until recently after sync'd with ipad2 (Pages) when I installed iOS5. Anyone-- please?!

    You have 2 versions of Pages on your Mac.
    Pages 5.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed almost 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Rate/review Pages 5.2 in the App Store.
    Peter

  • When I open a document from a database (remote) It shows blank. The database application expects Adove to be used.

    THE APPLICATION IS NAMED "Master Control". When I open a document it shows blank and the name is always "version-#.pdf". No matter what the size of any file shows to be around 5kB. I am using Linux Ubuntu 10.04.
    If I use MS Windows and Explorer then everything works fine. Can you help?
    Thanks

    A new tab opens by default as a blank tab (about:blank).
    If that isn't the case then an extension has changed that behavior.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    Do a malware check with some malware scanning programs on the Windows computer.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br /><br />
    *http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    *http://www.superantispyware.com/ - SuperAntispyware
    *http://www.microsoft.com/security/scanner/en-us/default.aspx - Microsoft Safety Scanner
    *http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    *http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    *http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • I keep getting the message You need a newer version of Pages to open this document. but I don't have an update available in app world. Now what?

    I keep getting the message You need a newer version of Pages to open this document. but I don't have an update available in app world. I did the update but it doesn't seem to be registering on my macbook pro. Now I can't open any of my documents as I keep getting this message. Now what???

    You have 2 versions of Pages on your Mac.
    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Note: Apple has removed over 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

  • Can't open pages documents I created 3 days ago with Pages 5.2

    get the message:
    You need a newer version of Pages to open this document.
    - I've just updated to the newest Pages and now I can't open documents I created 3 days ago in Pages. Please help.

    You have 2 versions of Pages on your Mac.
    Pages 5.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Previous Pages 5 versions can not open Pages 5.2 files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Once opened and saved in Pages 5.2 files can not be opened in previous Pages 5 versions.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed over 95 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

  • I keep getting "you need a newer version of Pages to open this document" but I have the newest version

    Ikeep getting "you need a newer version of Pages to open this document" but I have the newest version

    You have 2 versions of Pages on your Mac.
    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.01 can not open Pages 5.1 files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Once opened and saved in Pages 5.1 files can not be opened in Pages 5.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed over 95 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

  • I cannot open my documents in the latest version of pages

    I just updated and downloaded the latest update to pages.   I tried to open my documents in the documents folder and it tells me I need the latest version to open the document !    When I click on the app store it tells me it is already installed.    I am very annoyed and frustrated   Maybe I should return to Windows !!!!

    You have 2 versions of Pages on your Mac.
    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Note: Apple has removed over 90 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

  • Went to open a file in words and got message. "You need a newer version of Pages to open this document." I have latest version.  All other files open w/o a problem.  Please help.

    Went to open a file in words and got message. "You need a newer version of Pages to open this document." I have latest version.  All other files in words open w/o a problem.  Please help.
    Thank you.
    <Email Edited by Host>

    You have 2 versions of Pages on your Mac.
    Pages 5.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed almost 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Peter

  • "I have pages 5.1 but when I try to open a page on my desk top.. a message comes up - You need a newer version of pages to open this document.  How do I set my computer to open a page?"

    "I have Pages 5.1 but when I try to open a page on my desk top.. a message comes up - You need a newer version of pages to open this document.  How do I set my computer to open a page on my desktop?"

    You have 2 versions of Pages on your Mac.
    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Pages 5 can not open Pages 5.1 files and you will get the warning that you need a newer version.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Note: Apple has removed over 90 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

  • Pages is telling me that I need a newer version before I can open my document.  I have the latest version and I am able to open older versions.  Whats up?

    Pages is telling me that I need a newer version before I can open my document.  I have the latest version and I am able to open older versions.  Whats up?

    You have 2 versions of Pages on your Mac.
    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5/5.01 can not open Pages 5.1 files and you will get the warning that you need a newer version.
    Pages 5.1 sometimes can not open its own files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has not only managed to confuse all its users, but also itself.
    Note: Apple has removed over 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

  • This month I downloaded the newest version of PAGES.  Now when I try to open the documents made with this program it says "You need a newer version of PAGES to open this document."  I go to the App Store and says it has downloaded.  What to do?

    This month I downloaded the newest version of PAGES.  The documents I have typed using this App will now not open and the message says-"You need a newer version of PAGES to open this document.  Could anyone help me with this please.  Thanks.

    You have 2 versions of Pages on your Mac.
    Pages 5.2.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed over 110 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    You can add the icon of the missing Pages on your Dock or open Pages from the Apple menu > Recent Items list.
    Or you can archive Pages 5 so that it doesn't automatically open.
    If you are unhappy about this review/rate Pages 5 in the App Store.
    Peter

Maybe you are looking for

  • Error while attaching library(pll)..

    Hi! When I try to compile the fmb file in the Form server getting an error message that "procedure name not declared". 1)Procedure added in that library is already compiled and stored in the Server(compiled in unix environment). 2)In FORMSPATH the pl

  • Easiest way to write XMP data or files into a PDF file

    Hi, I wrote a little Adobe Air application, which is intended to generate XMP files for being imported into PDF files. Now I'm searching for the most efficient solution to import these XMP files. I'd be happy if I could select a PDF file from my Adob

  • Recent photos

    There's something weird going on with iPhoto '08 in regards to the recently imported photos. I just imported a set of photos called (an Event I guess) "Rice University Bike Ride". On the left hand side of the iPhoto window, under recent, it shows a "

  • How to save/load player stats?

    Okay..this should be my last for a while. The last thing I need to know is how to be able to save/load player stats. I'm working on an RPG and need to know how to create a save file with the players hp, mp, lvl, weapons, and so on, and then be able t

  • JDK 1.4.2 for Intel Xeon 64 bit

    Gurus, I am installing ECC 6.0 on Windows. I am unable to download the JDK 1.4.2* for Intel xeon processors on 64 bit running Windows Server x64 standard edition. Been to the site  http://java.sun.com/j2se/1.4.2/SAPsite/download.html, to download JDK