SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict
    Join Date
    May 2005
    Posts
    248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    windows not opening .php files via localhost

    Hi,
    Strange problem happening here.
    Working with Windows 7, IE10. Also have FF and other browsers -- no problems there. Running WAMP 2.4, PHP5.4.12
    My problem is that .php files will not open locally in IE. I get a message from IE about wanting to open or save the file. When I click open, the file opens in Dreamweaver. PHP pages online open just fine -- good thing!
    I've made no changes to anything in the system. Working with DW(CS6) files earlier today, I got a message that there was a sharing violation. I couldn't save over any files. So I made a new folder within which I can now save.
    So the big (among others) thing, is that I cannot test in IE.
    Thoughts on what is happening, what could have happened here and how to fix?
    Thanks much.
    Cheers,

  2. #2
    SitePoint Member c0dingL!fe's Avatar
    Join Date
    Sep 2013
    Location
    Essex
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good morning,

    Are you trying to open your files directly into your browser (eg right clicking the file and opening in IE), or are you actually going through localhost to open the file?

    Kind regards,

    cL.

  3. #3
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,053
    Mentioned
    66 Post(s)
    Tagged
    0 Thread(s)
    To clarify CodingLife's question, are you trying to reach the file by

    http://localhost/some/path/to/a/file.php

    Or are you using

    file://c:/some/path/to/a/file.php

    The first example the php should parse and give output. In the second example you will get the behavior you've observed. PHP scripts won't run unless they pass through the webserver or are invoked with the interpreter on the command line.

  4. #4
    SitePoint Addict
    Join Date
    May 2005
    Posts
    248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    Thank you both for the follow-up.
    I tried both the "http://localhost/some/path/to/a/file.php" and the right-click.
    In IE, using the localhost method, I get the tab which says "Waiting for localhost" and keeps spinning. The URL path I am using works for FF, Safari and Chrome.
    More thoughts???
    Thanks,
    Cheers,

  5. #5
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Install wamp in order to view your php files ya

  6. #6
    SitePoint Member c0dingL!fe's Avatar
    Join Date
    Sep 2013
    Location
    Essex
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good evening,

    He's already got a WAMP server running on his computer.

    I had the same problems when first starting out in PHP and it was because I was right clicking and trying to open my PHP files directly into the browser.

    If you are going through localhost and still receiving errors, I'm not too sure as to what to do.

    Is it loading through localhost or just keeps 'spinning'? Does the website load when you try in other browsers?

    Kind regards,

    cL

  7. #7
    SitePoint Evangelist
    Join Date
    Aug 2006
    Location
    Nantwich, Cheshire
    Posts
    458
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you get a message about choosing between opening or saving the file, that implies that the header information coming from the server is incorrect, surely? I can't look at my wamp server to investigate further as my system tray icon disappears on a seemingly random basis, but that used to be the issue - IE decides how to handle the incoming stream based on the page header.
    http://www.firenza.net - my homage to a car from the 1970s

  8. #8
    SitePoint Addict
    Join Date
    May 2005
    Posts
    248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    Just a follow-up.
    thank you for all the responses.
    Is it loading through localhost or just keeps 'spinning'? Does the website load when you try in other browsers?
    It was just spinning and yes, going through localhost. Other browsers did load.
    For whatever reason, the spinning problem is cleared up now -- not sure what changed. I did a massive clean-up of the machine, likely (?) that made the difference???
    Thanks again.
    Cheers,


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •