Viewing php offline
Results 1 to 5 of 5

Thread: Viewing php offline

  1. #1
    Join Date
    Aug 1998
    Location
    Lone Star State Texas
    Posts
    1,553

    Viewing php offline

    I seem to be having a problem with viewing php files offline. A good exsample that I run into is a XAMPP index.php file, or OpenOffice download.php file. When I click on the php file it acts like that it wants me to download the php over and over. Whats the fix for this?
    Will update soon

  2. #2
    JPnyc is offline Virtual PC Specialist!!!
    Join Date
    Jan 2005
    Posts
    7,877
    there isn't one. PHP has to be parsed, which means you can only do it on machines that have the PHP parsing engine loaded. You have to have PHP installed. You can only view it as text in Notepad or similar
    There is nothing to fear, but life itself.

  3. #3
    Join Date
    Nov 2009
    Posts
    2

    View PHP files

    Well, how good is it to setup locally a Xampp, Wamp or any LAMP if you cannot edit your files?
    There are on the net many free editors that will do the job.
    Among those an outstanding free IDE is eclipse, I use it on my machines for dev. Just be prepared to some trial before getting it all setup to your needs.
    Among the PHP IDE "for a fee" is Zend with eclipse
    you may also want to look at a very solid one UltraEdit.
    However as mentioned do a Google for PHP IDE and you'll find many to try.
    good luck.
    Keep us posted.

  4. #4
    Join Date
    Aug 1998
    Location
    Lone Star State Texas
    Posts
    1,553
    It's not the editting that i'm talking about, it's the viewing it as a webpage. I geuss the only way around this it to link it in a active html webpage
    Will update soon

  5. #5
    Join Date
    Nov 2009
    Posts
    2

    Firing up localhost

    Ah, I see.
    A few checks:
    from the very bottom of your machine, right hand corner do you see the xampp icon, if not it might be within the hidden icons, if it's not there go to start, programs and start xampp
    If xampp is started then "restart all services" Are they restarting OK?
    do you connect to a database, did you import your db using phpMyAdmin?

    Next: open your browser and type http://localhost/ report what you see.
    is your site loaded within www/ and is the index a .php?

    last go to windows/system32/drivers/etc/hosts
    open host with your fav editor or notepad if notepad be sure to turn on the "all files"
    do you see:
    127.0.0.1 localhost ?
    if your site index is not directly at root (www) but is in a dir/
    like my_site/index.php
    then add to your hosts file the following:
    127.0.0.1 my_site
    save and go back to browser and try it again.

    out of curiosity to check if Apache really runs
    create a file
    <?php
    phpinfo();
    ?>
    rename the default root index as index_OLD.php
    save the new file as index.php
    go back to localhost it should give you all the php.ini setting
    if not I will uninstal it and try wamp server or wamp five which are very solid!

    let us know

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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