Test page not working

Discussion in 'Apache' started by aditya9999, Mar 18, 2010.

  1. #1
    Hey guys I am tring to install wordpress on my CentOS Virtual Machine. So far my progress has been as follows:
    Installed following through yum:
    • mod_ssl
    • mysql-server
    • php
    • php-mysql

    Started httpd and mysql
    Changed permission on /var/www/html folder through chmod 777 html/

    The Apache server is working fine because i can see default through localhost

    The problem is that I have placed an index.php page in html folder but it is not opening through localhost. All I get is a blank page. I guess if I can't open such a simple page, my Wordpress install won't work either.


    I am new to Linux so please be kind with phrases and terms. Details would be really helpful. I have attached some files for your reference. Looking forward to your kind help. TC.
     
    aditya9999, Mar 18, 2010 IP
  2. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #2
    I hope that you have some content within that index.php file? I always suggest, instead of using the default Apache folder, that you create a new user, and have Apache serve pages using the userdir option. I find that it helps to keep things organized. Another alternative would be to create a new directory under /var/www/html, such as /var/www/html/site1/, and point your browser to that page.

    If it still does not work, make sure you consult your error_log for Apache.
     
    RHS-Chris, Mar 18, 2010 IP
  3. aditya9999

    aditya9999 Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hey Chris thanks for your attention and reply.

    I deployed Wordpress to /var/www/html yesterday. It creates a new directory as u asked me to do but I am unable to see any wordpress pages too. Yes, my sample page did have phpinfo(). I have installed wordpress/wpmu before on ubuntu with XAMPP before successfully. But this time I want to avoid XAMPP and do everything from scratch.

    Is it possible that Apache is considering any other directory as it's default web directory?

    I will sure post my error_log once I reach my PC. Thanks again.
     
    aditya9999, Mar 19, 2010 IP
  4. aditya9999

    aditya9999 Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    [Thu Mar 18 03:11:05 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Thu Mar 18 03:11:05 2010] [notice] Digest: generating secret for digest authentication ...
    [Thu Mar 18 03:11:05 2010] [notice] Digest: done
    [Thu Mar 18 03:11:05 2010] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
    [Thu Mar 18 03:11:05 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
    [Thu Mar 18 03:12:03 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Thu Mar 18 03:12:04 2010] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
    [Thu Mar 18 03:12:07 2010] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
    [Thu Mar 18 03:17:34 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Thu Mar 18 03:18:21 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:18:21 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:19:33 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:19:33 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:19:36 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:19:36 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:19:48 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Thu Mar 18 03:20:01 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:20:01 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:20:27 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:20:27 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:20:59 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:20:59 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:21:10 2010] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /var/www/html/index.html
    [Thu Mar 18 03:24:45 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Thu Mar 18 03:24:47 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Thu Mar 18 03:28:50 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:28:50 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:28:51 2010] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
    [Thu Mar 18 03:28:54 2010] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
    [Thu Mar 18 03:28:54 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:28:54 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:28:59 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:28:59 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:29:09 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:29:09 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:29:11 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:29:11 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:29:18 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:29:18 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:29:39 2010] [notice] caught SIGTERM, shutting down
    [Thu Mar 18 03:29:39 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Thu Mar 18 03:29:40 2010] [notice] Digest: generating secret for digest authentication ...
    [Thu Mar 18 03:29:40 2010] [notice] Digest: done
    [Thu Mar 18 03:29:40 2010] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
    [Thu Mar 18 03:29:40 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
    [Thu Mar 18 03:29:43 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:29:43 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:29:46 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:29:46 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:29:50 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:29:50 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:30:17 2010] [notice] caught SIGTERM, shutting down
    [Thu Mar 18 03:30:27 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Thu Mar 18 03:30:28 2010] [notice] Digest: generating secret for digest authentication ...
    [Thu Mar 18 03:30:28 2010] [notice] Digest: done
    [Thu Mar 18 03:30:28 2010] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
    [Thu Mar 18 03:30:28 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
    [Thu Mar 18 03:30:34 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:30:34 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:30:36 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:30:36 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:30:39 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 03:30:39 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 03:30:53 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Thu Mar 18 03:34:14 2010] [error] [client 127.0.0.1] File does not exist: /var/www/html/server-status
    [Thu Mar 18 03:45:13 2010] [error] [client 127.0.0.1] File does not exist: /var/www/html/server-status
    [Thu Mar 18 04:15:02 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Thu Mar 18 04:17:39 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Thu Mar 18 04:18:26 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 04:18:26 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 04:18:28 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 04:18:28 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 04:18:31 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 04:18:31 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 04:18:32 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 04:18:32 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 04:31:53 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
    [Thu Mar 18 04:32:51 2010] [error] [client 127.0.0.1] File does not exist: /var/www/html/wordpress-mu
    [Thu Mar 18 04:33:10 2010] [error] [client 127.0.0.1] File does not exist: /var/www/html/wordpress-mu
    [Thu Mar 18 04:33:20 2010] [error] [client 127.0.0.1] File does not exist: /var/www/html/wordpress-mu
    [Thu Mar 18 04:52:42 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 04:52:42 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
    [Thu Mar 18 04:53:02 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
    [Thu Mar 18 04:53:02 2010] [error] [client 127.0.0.1] PHP Warning: Unknown: Failed opening '/var/www/html/index.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
     
    aditya9999, Mar 19, 2010 IP
  5. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #5
    What are the permissions on the index.php file?
     
    RHS-Chris, Mar 19, 2010 IP
  6. aditya9999

    aditya9999 Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    File properties say "user" has red and write permissions
     
    aditya9999, Mar 19, 2010 IP
  7. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #7
    Do you have shell access to the server? If so, can you paste the output of :

    ls -l /var/www/html/index.php
     
    RHS-Chris, Mar 19, 2010 IP
  8. aditya9999

    aditya9999 Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    there you go:
    -rw------- 1 user user 20 Mar 18 05:23 /var/www/html/index.php
     
    aditya9999, Mar 19, 2010 IP
  9. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #9
    Change them to 644:

    chmod 644 /var/www/html/index.php
     
    RHS-Chris, Mar 19, 2010 IP
  10. aditya9999

    aditya9999 Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    u know what.. u are a genius. IT WORKED. i know it's not a biggie for you but it's for me. In past 5 days, I till date have made 5 new VM for this thing and ultimately it worked. Many many thanks.
     
    aditya9999, Mar 19, 2010 IP
  11. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #11
    Permissions are a big thing on a linux machine. Glad to hear that all is working now :)
     
    RHS-Chris, Mar 19, 2010 IP