Find the answer to your Linux question:
Results 1 to 9 of 9
i used https://help.ubuntu.com/community/ApacheMySQLPHP to set everything up i made a test.php file and put it in /var/www when i put http://localhost/test.php it will not load the page. i am sure ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    6

    cannot test any php files at http://localhost HELP


    i used https://help.ubuntu.com/community/ApacheMySQLPHP to set everything up
    i made a test.php file and put it in /var/www when i put http://localhost/test.php it will not load the page. i am sure that apache is running because when i try to start it it says apache is running

  2. #2
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    When you say it will not load the page, what does it do? Crash? Time out? Give a 404? Show a blank page? Show meaningless output?
    Stand up and be counted as a Linux user!

  3. #3
    Just Joined!
    Join Date
    Mar 2007
    Posts
    6

    hey

    the page does not load at all. it keeps saying loading but doesn't load. it time-out after 2 minutes

  4. #4
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    What's the code in your test script?
    Stand up and be counted as a Linux user!

  5. #5
    Just Joined!
    Join Date
    Mar 2007
    Posts
    6

    script

    <?php phpinfo(); ?>

  6. #6
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    And you have apache2, libapache2-mod-php5, and php5 installed?
    Does /etc/apache2/mods-enabled have entries for php5.conf and php5.load?
    Stand up and be counted as a Linux user!

  7. #7
    Just Joined!
    Join Date
    Mar 2007
    Posts
    6

    hey

    yes to both questions

  8. #8
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    Hmm, well, the install script should have done this already, but try restarting the Web server:
    Code:
    /etc/init.d/apache2 restart
    Stand up and be counted as a Linux user!

  9. #9
    Just Joined!
    Join Date
    Mar 2007
    Posts
    6

    hey

    i just reinstalled everything again but now when i try to test a php file using http://localhost/test.php it gives me an error "Unknown: Failed opening '/var/www/test.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0"

Posting Permissions

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