Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: how to run php file in browser

  1. #1
    Join Date
    Mar 2011
    Location
    India
    Beans
    73
    Distro
    Ubuntu 11.04 Natty Narwhal

    how to run php file in browser

    i have the php5,apache2 and mysql installed....i just cant run the php file...i try to double click it and an endless loop of new tabs get opend......i did php myfile,php from terminal and u know wat happens(my code)

  2. #2
    Join Date
    Oct 2009
    Location
    Upminster, Essex, UK
    Beans
    544

    Thumbs down Re: how to run php file in browser

    I can only think that you php is bad and you have infinity recursing loop somewhere?

    does:

    Code:
    <?php
           phpinfo();
    ?>
    If you still get the error you may have a recursive virtualhost / .htaccess rewrite
    Code:
    cd /fridge/beer | drink && fallover

  3. #3
    Join Date
    Mar 2011
    Location
    India
    Beans
    73
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how to run php file in browser

    no dude...i dont have php script in my php file...its plain html....but is double clicking the .php file the right way of runin a php file.....
    ..
    ..i thought we have to configure the sever and do some process.....im hoppin to find the process

  4. #4
    Join Date
    Mar 2011
    Location
    India
    Beans
    73
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how to run php file in browser

    this is what happens if i open the file in firefox...and if i click ok another new tab and same screen
    Attached Images Attached Images

  5. #5
    Join Date
    Nov 2010
    Beans
    122
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how to run php file in browser

    the answer is simple you must copy your php, I believe the hello world will be best to /var/www.
    And open from any navigator.....firefox is cool
    localhost/hello.php

    dont forget to have php packet for apache.

  6. #6
    Join Date
    Mar 2011
    Location
    India
    Beans
    73
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how to run php file in browser

    i cant copy it..permission denied.....im new to ubuntu and sudo thing needs some practice to me....is the a way to be a root user in the normal gui

  7. #7
    Join Date
    Oct 2009
    Location
    Upminster, Essex, UK
    Beans
    544

    Thumbs down Re: how to run php file in browser

    /* completely irrelevant so removed to avoid confusion */
    Last edited by satanselbow; May 7th, 2011 at 02:33 PM.
    Code:
    cd /fridge/beer | drink && fallover

  8. #8
    Join Date
    Mar 2011
    Location
    India
    Beans
    73
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how to run php file in browser

    ok...now tweekin my apache... i did not put the file in server...i just opend a texteditor and typed the file......i hav to submit my project on monday and i have no clue how to get startd......

  9. #9
    Join Date
    Nov 2010
    Beans
    122
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how to run php file in browser

    go to package administrator get the package:

    libapache2-mod-php5

    go to accesories, terminal, type:
    cd /home/ravikanth/scribble/wt

    sudo cp menu.php /var/www

    type your password to answer to the sudo and try the link:

    localhost/menu.php
    Last edited by dozycat; May 7th, 2011 at 02:42 PM.

  10. #10
    Join Date
    Mar 2011
    Location
    India
    Beans
    73
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how to run php file in browser

    im getting the 404 not found error

Page 1 of 2 12 LastLast

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
  •