Local PHP Preview?

Hello all
I am currently using the standard version of snow leopard. I am trying to set up a web development environment. However the problem I am facing is this. When previewing and working with PHP files I keep have to make manual adjustments to url to get them accessed via "http://" rather than "file:///". Would this still be an issue were to bite the bullet and install Snow Leopard Server on my iMac. I am going to be doing a lot of Web development over the coming months. So I want to get a set-up that will save me having to mess around with editing with invisible files etc.
Any help and advice would be greatly recieved.
Thank You
Derek

why not go turn on System Preferences > Sharing > Web Sharing
put your files in ~/Sites and point your browser to http://localhost/~username

Similar Messages

  • Render local PHP files... any fix yet?

    So, I read numerous posts on this topic - but they all have been "archived" and cannot be replied to?? I think it is still very important and wonder, does that mean it is dealt with or still a know, ongoing issue I just missed the answer to??
    This thread most similarly matches my issue and themost detailed: http://discussions.apple.com/thread.jspa?messageID=978104
    I use Dreamweaver 8 and Safari 2.0.1 on a 10.4.2 System. As others have noted, when I go to drop a PHP file onto Safari, it just renders the source code. But, if I drop it on IE or Opera or FF it renders as expected.
    Yes, I have turned on Web Sharing in the System Preferences. Yes, I have turned on PHP (using this simple article http://www.phpmac.com/articles.php?view=225) and verified it by puttng a php file into my "Sites" folder and it renders fine in Safari that way. But, neither have been a solution. Nor is using other lesser supported browsers and what-not as I need to develope for Safari and have 30 or so sites I manage with a local system already in place that worked just fine in 10.3 and Safari from 10.3 - so moving all my stuff to my "Sites" is a no go. And, I believe I read it still is an issue in 10.4.7 - so updating the system is not the answer either.
    It is very bothersome to not be able to view my PHP files locally on Safari and have to have to put them on the server to view/test them as that was not the case under Safari under 10.3. The only other way to view them in Safari I have found is by using the Preview feature in Dreamweaver 8 (which no one else mentioned in other threads), BUT if there is a text link (like a 'click here' navigation link) in the page to another PHP file and you click said link, you jut get the source code for that next page as if you dropped the file on Safari. That is weird in itself that through Dreamweaver 8 it makes a Temp file of the PHP file and loads that in Safari just fine!!!! but to actually drop or load the actual PHP file (not the created Temp file).... nothing but source code.
    So, any status on this? Still a lingering issue? I wondered if the stop in posting to the topic means people just accepted the bug (I find that hard to believe), or it was fixed (by a hack or by Apple) and I missed it someplace? It does not seem to be a PHP issue (as some reports said initially) as othr browsers on the same system can render the files when dropped on them, but an actual issue with how Safari deals with PHP files now - when it handeled them just fine in 10.3.

    Please read the link to the previous closed thread in my first post as it explains it pretty clearly. It is all about a file with extension .php versus .html.
    but I will recap again here:
    I am very clear that Safari cannot run server side script locally. That is not the issue as that is a given.
    "What I am expecting Safari to do" - and what all developers are expecting Safari to do when it encounters a local PHP file (a file with extension .php versus .html) is to render the HTML and display the page - not the source code. who wants to see the source code when trying to preview the layout and look and feel of a page.
    again, in old 10.3 if you dropped a PHP file (file with .php extension) onto Safari, the file would display the HTML portion just fine and show the resulting webpage - and not process the PHP within the code naturally as it cannot being local and not off a server - but now in 10.4 if you drop a PHP file (file with .php extension) onto Safari it just shows you the source code. IF you chnage that exact files extension to .html it renders fine, chnage it back to .php and nothing but source code.
    this is a know glitch and covered in the first linked thread in depth..... I am more looking at this point to see if anyone is aware of a fix yet??

  • Firefox 3.6.8 won't open local php files. It opens the save as text dialog box instead.

    When I try to open a local php file on my MAC hard drive with FF 3.6.8, the save file dialog box opens instead. It says: You have chosen to open index.php which is a TextEdit.app Document. I do not have this problem with Firefox 3.5.11.
    I have tried:
    opening the file directly from Firefox as well as
    double clicking the file (which is the most common way).
    I have also tried changing the file "open with" preference to "open with Firefox." That did not work either.
    Any help on this would be appreciated.
    I'm on a MAC OS 10.5.8
    Thnx, Nick

    You have to delete mimeTypes.rdf.
    You can find it here (Windows XP): C:\Documents and Settings\Username\Aplication Data\Mozilla\Firefox\Profiles\xxxxxxxx.default.

  • How do you connect Flash Builder to a NON-LOCAL PHP Server?

    Is it possible to connect Flash Builder 4 to a non-local PHP Server?  In my case, I want to connect to a PHP server on my web-host (similar to GoDaddy).
    This seems like a really stupid question, but every single tutorial or forum post I've Googled in the past 2 hours talk about how easy this is but all of them use "...localhost..." in the Root URL and I can't find anywhere in Flash Builder to enter FTP style credientals!
    I do not want to turn my PC into a PHP/SQL/IIS server.  I want to be able to do all of my work remotely as I do with Dreamweaver. 
    I've been trying to do this one simple thing for the better part of 2 days and can't believe how under-documented this feature is.
    Please please please help!
    Thanks
    Charles

    Upload your services to a directory on your host, upload your remoting app (Zend AMF etc) and configure it, then change the end point in your code to the gateway.php on your server:
    yourService.endpoint = "http://www.yoururl.com/pathway-to-your/gateway.php";
    For instance, one of mine are:
    protected function updateButton_Click(event:MouseEvent):void
                    // TODO Auto-generated method stub
                    support_Requests.ticket_id = supportGrid.selectedItem.ticket_id;
                    support_Requests.hub = supportGrid.selectedItem.hub;
                    support_Requests.username = supportGrid.selectedItem.username;
                    support_Requests.contactNumber = supportGrid.selectedItem.contactNumber;
                    support_Requests.email = supportGrid.selectedItem.email;
                    support_Requests.request = supportGrid.selectedItem.request;
                    support_Requests.status = statusButtons.selectedValue.toString();
                    support_Requests.note = noteUpdate.text;
                    supportRequestsService.endpoint = "http://www.not-telling-you-my-url/app-resources/gateway.php";
                    updateSupport_RequestsResult.token = supportRequestsService.updateSupport_Requests(support_Requests);
                    currentState='Home';

  • Php preview in browser

    I am trying to preview .php files. When I pick Firefox
    everything is displayed fine. When I pick IE a dialogue box pops up
    asking weather I want to open or save the file. Any help would be
    very appreciated.

    > dialogue box pops up asking weather I want to open or
    > save the file.
    have you installed a local testing server on your computer?
    then entered that info into this site's site
    definition->testing server?
    If when you F12 the url in the address bar of firefox starts
    with file:///
    you are looking at the file directly from the hard drive.
    if the url in the address bar starts with
    http://localhost/ then it's using
    a local web server.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • 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 not processing local  PHP

    I am editing some php pages and checking them in Safari....4.0.3. On my local machine all I get is code. The page doesn't draw. If I log onto the site the page loads and draws fine. Why won't it work locally?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Hosting a local PHP site

    Hi
    After a bit of website help running a website from my mac.
    I can access a local website on my mac if its in the sites folder
    @http://10.0.1.???/~??????/ this is a index.html file
    But can I do the same with a php site?
    If i place the php site in this folder I get the source of the index.php
    how do i access the index php website?

    Hello Ozewolf:
    In order to view webpages (locally) you must set up a "root" directory for them.
    I created a directory called "/Volumes/Mac Data2/Kj's Data/www"
    Then I started MAMP, The MAMP window pops up, selected the "preferences..." button,
    selected "Apache", a little window opens, I dragged and dropped the "/Volumes/Mac Data2/Kj's
    Data/www" folder in the little window and pressed the select button to save it.
    That's all there is to it!
    Now for each website you wish to work on, put a new folder in the "www" directory and give it
    a new name.
    I put a folder in the www directory called "becausewelovehim.com" inside that folder I put html
    files. The first file inside the folder a web server looks for is a file named "index".
    In my case this url entered into my browser will display my index file:
    http://127.0.0.1:8888/becausewelovehim.com/index.php
    the file resides on my machine as:
    "/Volumes/Mac Data2/Kj's Data/www/becausewelovehim.com/index.php
    I have all the setup info mirrored in Dreamweaver so it works seamlessly with my
    MAMP server so I can view pages in real time as I build them. When They are finished,
    I upload them to the hosting provider web server.
    Kj

  • Local Folio preview?

    Hi, I'm currently away on a training course for the week and I'm trying to work on my publication in the evenings, but the hotel WiFi is not letting me download my publications to the iPad content viewer.
    Is there anyway to preview a publication locally? Even through USB/Dock connector?
    Hopefully someone can give me an anser soon as I'm stuck in the hotel for a week and have a lot of work to do!
    Thanks a lot.

    Hi,
    To preview in iPad (Content Viewer) you need to be subscribe of DPS, because you have to create your own Adobe Content Viewer with Viewer Builder. Then install the Phone Disk software in your Mac to connect the Folio Builder panel with iPad.
    It´s not so simple, but work well
    You can preview in Desktop Content Viewer with Overlay Creator or Folio Builder panels
    __ Felipe

  • How to view local PHP files with my browser?

    I want to learn PHP and be able to view files I create (stored in my documents folder) by my browser. I read I'd have to get into Apache via Terminal and make some changes to be able to view PHP. I took a look inside and ran across warning comments, which scared me off!
    Any suggestions?

    Pretty simple, ther arew no "warnings" to consider. Depending on your version of Apache you may need to enable the  PHP  module in the configuration file at
    /private/etc/httpd/httpd.conf
    Look for the part where it says
    #LoadModule  php 4_module
    and also
    #AddModule mod_ php 4.c
    and make sure those lines are uncommented by deleting the "#" character, then restart Apache to activate the new settings . When you acces a PHP page, you must do it through Apache by clicking this URL: http://127.0.0.1/ Remember that HTML files can be dropped in a browser, but to run a PHP script file you must use an Apache URL.
    Read more about Apache here:
    http://Gnarlodious.com/Computer/Apache

  • Since few days, Firefox crashes when trying to open local php files - without using localhost . It shoudn't. I tried to unsinstall everything and reinstall. But it didn't work. I use a mac osX 10..6

    I'm a beginner web developper. When I try to open php files, Firefox crashes and open millons of new firefox windows . I have no choice other than forcing Firefox to quit. When I use the localhost adress, it's Ok. But because I usually open the file directly from a folder in my HDD, (it's faster to dothis way) transforming it after with the localhost/~username/file ... it' s quite irritant.

    Hi.
    I tried logging in as a different user in the OS and that didn't work.
    Do you mean that Safari crashed there as well?
    If so, that's an indication that the startup disk needs repairing.
    Using Disk Utility to verify or repair disks

  • Php: previewing record update with iframe

    my goal is to build an update/edit/preview page so that the
    user can see the
    results on the same page as the record being updated, either
    side by side, or
    below the forms. just wondering if someone has done it this
    way before and
    whether i'm on the right track or is there a better way to do
    it. thanks.
    mike

    my goal is to build an update/edit/preview page so that the
    user can see the
    results on the same page as the record being updated, either
    side by side, or
    below the forms. just wondering if someone has done it this
    way before and
    whether i'm on the right track or is there a better way to do
    it. thanks.
    mike

  • How can I run local PHP websites on OS X Maverick?

    Should I install a web server? If yes, which one do you suggest?

    XAMPP seems to be better supported then MAMP. The problem with these standalone installers is that they literally include everything. If you actually use some of the more unusual modules, you may have problems if you want to deploy onto a shared web hosting service. They may not have those modules and it may not be possible to add them. Even if it is possible to add them, don't assume it will be easy. Those services run Linux and even in 2014, setting up something as basic as a web server may still require modifying source code in C. I kid you not.
    If you want to enable the built-in web server in OS X, I have a User Tip that explains how: https://discussions.apple.com/docs/DOC-3083

  • Why don't my graphics appear in local preview anymore?

    As recently a yesterday, graphics were displaying fine in local browser preview. Today I synced with Adobe and installed an update to Dreamweaver CC, now I don't get graphics displayed in my browser previews.
    I got a message that this doesn't work unless I'm using a testing server--I'm not--and that I should set up previews to use a temporary copy. I tried that. It "works" but I don't care for it. It changes the URL.
    So, I designated my remote server as a testing server--two check marks for my FTP server in site setup. This also works--I see graphics--but again I don't care for it. Am I now required to use a testing server on my local PC to see graphics? I'm not developing 'dynamic sites' with PHP or or other server-side features. I'm fairly new to this... I like previewing locally.

    I never found the solution to my problem. My other sites don't display this problem, so I surmise that the problem was my site, not DW. Early on I had deleted the site by deleting the folder in Windows explorer, rather than deleting it within Dreamweaver > Manage Sites. I then recreated the site with the same folder and site name. Perhaps this confused an internal database in DW?
    I've just recreated the site with a new folder name, and the problem appears to be gone.
    So, my problem is resolved.
    However, the problem began AFTER I did a Sync with Adobe CC and installed an update to DW yesterday. I know that the Sync reset some things in my setup, because I accepted your cloud's settings over my own to resolve reported "conflicts". I noticed other changes.
    The file extensions and paths in my code were fine. Link checker reported no problems. Links were set relative to root folder. However I encountered the problem as well when I tried setting them relative to to the document.
    When I set up a remote FTP server, and left test server unchecked under Advanced Setting, I wasn't getting graphics in local Preview. When I checked both Remote server and Test server, everything was fine on my remote site but, of course, I couldn't Preview the site locally. The preview took me out to the remote server.
    At one point I was getting an error message that content could not be viewed locally, that I should either set up a test server or select temporary files for previews--which worked but the urls were changed.
    Hope this helps.

  • Local Web Sharing php issue

    I am running OS 10.6 on a macbook pro. I host copies of my websites for testing on the laptop, using php5.3.8
    Darwin Kernel Version 10.8.0:
    My web host runs FreeBSD 6.4 and php 5.3.6
    I am having an issue with extra space rendering in pages on the testing server.
    Below is a screen shot of a php-generated menu. On the left is the internet version, and on the right is the version as it is rendered on my local machine.
    Note the unsightly extra space.
    When I look at the source code in BBedit, it shows an odd character at the start of each iteration of the menu. The first three lines are hard-coded, and do not have the character. The subsequent list items are generated by a foreach statement in php, and display the odd character. (BBedit doesn't know what it is: it's not a break or a whitespace character.) Oddly, these characters are not created by a foreach statement within the loop that generates submenus.
    Any ideas? I had this issue once before, but it went away. I've just upgraded the php installation on the laptop.

    very carefully
    you jsut open it in a text editor like TextMate, BBEdit, vi, pico, emacs, etc.. and edit away. Where the file live depends on how you installed php. Its generally in <pre>[path to php]/lib<pre>
    if you used one of the entropy binaries that would be:
    <pre>/usr/local/php/lib/php.ini</pre>
    or
    <pre>/usr/local/php5/lib/php.ini</pre>
    if you used another package check its documentation. If you compiled from source yourself you should know d**n well where you put it

Maybe you are looking for

  • 5800 OVI map not routing

    Hi All, The sat nav on the 5800 is really good but I'm getting a slight issue with routing. I searched an address by road and house number and county. It was found by the software but when I came to drive to it today I got a message "Route not found"

  • Error in portlet JSP

    while trying to run JSP, its giving me following error.Pls hep me the approach i need to follow. "Error 500: /helloworld/jsp/edit.jsp(1,0) Unable to load class com.ibm.wps.pe.pc.legacy.tags.InitTag " i have already included the following code in JSP.

  • Developing Multiligual GUI

    Basically designing a GUI we use .properties file in java to save the language resources. But can it will be possible to save the language resource in the database instead of .properties file and show the GUI in different languages by getting value f

  • Exporting problem: How can I make a PAL DVD with NTSC footage?

    Hi everyone, I need some help as I've been trying to burn a DVD for a couple of days now but it still isn't working. Here is my situation: I shot a lot of standard definition DV with my Canon GL-2 (NTSC, bought in America) that I imported into the tr

  • Glibc error when opening a report

    Hi, I got the error below when I opened a report. Do you have experience to solve this problem. Thank you Anh glibc detected *** /opt/sap/boe-sp3/bobje/enterprise120//linux_x86/WIReportServer.bin: double free or corruption (fasttop): 0x5d40b9b0 *** =