Why can't pages ending in .php be viewed?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • confuseduk

    Why can't pages ending in .php be viewed?

    Hello.

    I am unable to view any web pages ending in .php. I think this happened shortly after a clean up of the computer when a 'never used' file folder called 'apache' was deleted!

    I am not a programmer of any kind, just a user, so am not sure what to do.

    I looked at downloading 'apache' but it seems complicated (so many possiblities) and for programmers only.

    What can I install so that I can download and view web pages which are .php pages?

    Thank you.
  • Avi Barsheshet

    #2
    You need to work on localhost.
    WAMP Program is the easyest and the best localhost server

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Originally posted by confuseduk
      I think this happened shortly after a clean up of the computer when a 'never used' file folder called 'apache' was deleted!
      Apache is a web server, commonly used to display PHP websites. When it is working correctly, you shouldn't really be aware that it is there. (The same, by the way, can be said about most software that runs on your PC.)

      You can download and install Apache fairly simply, but setting it up to work the way your old installation worked could be tricky. For one, I have no idea how it was set up, and seeing as you deleted the old files I'm guessing you don't either.

      To set up Apache to work with PHP, you can simply download the Apache server and PHP separately and install them one after the other. There should be Windows installers available for both, and most Linux distros have them available in whichever package distribution system they use.

      You can also use developer packages like XAMPP, which installs everything PHP websites may need at the same time. May be a bit much but it could be easier to set up.

      Note that neither of these methods is likely to work as a drop-in replacement for the files you deleted. You will most likely have to configure them to get them working like your old installation. - If you can't figure out how to set it up as it was, there is little hope that I will be able to. Your best bet would be to find whoever set it up in the first place and ask them.

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        Originally posted by Avi Barsheshet
        WAMP Program is the easyest and the best localhost server
        That's highly subjective. There are more than one developer packages like WAMP and XAMPP, and it would be very hard to argue that one is "easier" or "better" than the others.

        Personally I've had great trouble with WAMP in the past, but XAMPP has never failed me. But then again, I've heard the exact opposite from others. - Like I say, very subjective.

        Comment

        • Oralloy
          Recognized Expert Contributor
          • Jun 2010
          • 988

          #5
          Regardless of which package you install, if there is a back-end database to the whole thing, you'll have to make certain that you have the proper ODBC connection installed, or you'll have to install a local database, too.

          Yea, I know I'm pouring fuel on the fire, but you really need to know what's involved before you just start opening boxes and turning on the pretty toys.

          Do you just want to look at the pages, and have done with, or do you need to rebuild an application of some sort, which has more general use?

          Comment

          • confuseduk

            #6
            Thanks - but I am not programming / using any development tools! I just would like to view pages on firefox/ie which end in php!
            if I look at a web page which ends .php, then the page I see is blank, although the browser says 'done'.
            @Atli - thanks, I will try downloading the Apache server and PHP as you suggest.

            Comment

            • confuseduk

              #7
              @oralloy - yes, I just want to look at / view these .php pages on some sites which I visit. (No rebuilding/application stuff at all!) Thanks.

              Comment

              • Atli
                Recognized Expert Expert
                • Nov 2006
                • 5062

                #8
                These sites that you are visiting, is the URL either http://localhost/... or http://127.0.0.1/...?
                If not then -- barring some weird hosts/router manipulation -- a local Apache server would have no effect. PHP pages hosted on other web servers would be parsed on those servers, not your computer.

                Could you post a link to one of the pages that are not working, so we can test it? You can send it in a PM if you don't want to post it publicly.

                Comment

                • confuseduk

                  #9
                  @Atli
                  Brilliant - thank you so much - I downloaded the PHP installer php-5.2.14-win32-installer.msi and installed it (v easy), restarted the computer, and now the web sites work!!
                  Thanks again for your help, much appreciated :)

                  Comment

                  Working...