Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    12

    Smile Apache Problem


    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.
    Attached Files Attached Files

  2. #2
    Just Joined!
    Join Date
    Mar 2010
    Posts
    12
    Come on guys.. 29 views and no reply. Want me to add something?

  3. #3
    Linux Engineer
    Join Date
    Mar 2005
    Location
    Where my hat is
    Posts
    766
    Setting var/www/html is rather odd. Norrmally, if I'm setting up a site (Centos and Apache), the web pages go under /home. Is there a reason why you selected var instead?
    Registered Linux user #384279
    Vector Linux SOHO 7

  4. #4
    Just Joined!
    Join Date
    Mar 2010
    Location
    Grand Rapids, MI
    Posts
    15
    Any errors in the apache error log?
    Does /etc/httpd/conf.d/php.conf exist?

  5. #5
    Just Joined!
    Join Date
    Mar 2010
    Posts
    12

    Unhappy

    Quote Originally Posted by retired1af View Post
    Setting var/www/html is rather odd. Norrmally, if I'm setting up a site (Centos and Apache), the web pages go under /home. Is there a reason why you selected var instead?
    Hey retired1af thanx for your attention.
    Some instructions that I followed are from techiecorner. This forum won't let me post URLs so I can't give it to you, but the instructions read like this:

    Once both services is running, you can point your browser to localhost and you should see a welcome page from CentOS
    If you see that welcome page, you just installed everything successfull.
    To test if php is running, go to /var/www/html and create an index.php file with the content below
    <?php phpinfo(); ?>
    and refresh your browser again. If you see a purple PHP information page showing all the php configuration variables, then php is running now.

  6. #6
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    /var/www/html is the out-of-box defacto standard for apache on all redhat-esque distros I have seen.

    Under your conf.d directory, do you have a php.conf file? If not you are missing the module to actually load the php file. Otherwise, we would probably need to look at your error logs to see if there isn't something else going on.

    If it is present then apache is loading it on your machine, per the Include statement in your conf file. Also be sure to add index.php to your Directory Index parameter in your conf file.

    Usually when a blank page appears, it means you have syntax errors in your php, normally php is not suppose to dump error messages to the browser that is rather insecure.

    Try this:
    test.php
    Code:
    <?php
    phpinfo();
    ?>
    In your browser go to
    http://whatever.your.machine.is/test.php

    It should load the info page, if it doesn't then you have a missing module.

    But if it were a missing module, you would be prompted to download the page itself, as the server would have no idea what to do.

    Sorry if i seem erractic I've drank way too much coffee.
    linux user # 503963

  7. #7
    Just Joined!
    Join Date
    Mar 2010
    Posts
    12

    Unhappy

    Quote Originally Posted by scathefire View Post
    /var/www/html is the out-of-box defacto standard for apache on all redhat-esque distros I have seen.

    Under your conf.d directory, do you have a php.conf file? If not you are missing the module to actually load the php file. Otherwise, we would probably need to look at your error logs to see if there isn't something else going on.

    If it is present then apache is loading it on your machine, per the Include statement in your conf file. Also be sure to add index.php to your Directory Index parameter in your conf file.

    Usually when a blank page appears, it means you have syntax errors in your php, normally php is not suppose to dump error messages to the browser that is rather insecure.

    Try this:
    test.php
    Code:
    <?php
    phpinfo();
    ?>
    In your browser go to
    *******

    It should load the info page, if it doesn't then you have a missing module.

    But if it were a missing module, you would be prompted to download the page itself, as the server would have no idea what to do.

    Sorry if i seem erractic I've drank way too much coffee.
    Yes the php.conf file is there and below is it's contents:
    #
    # PHP is an HTML-embedded scripting language which attempts to make it
    # easy for developers to write dynamically generated webpages.
    #

    LoadModule php5_module modules/libphp5.so

    #
    # Cause the PHP interpreter to handle files with a .php extension.
    #
    AddHandler php5-script .php
    AddType text/html .php

    #
    # Add index.php to the list of files that will be served as directory
    # indexes.
    #
    DirectoryIndex index.php

    #
    # Uncomment the following line to allow PHP to pretty-print .phps
    # files as PHP source code:
    #
    #AddType application/x-httpd-php-source .phps

  8. #8
    Just Joined!
    Join Date
    Mar 2010
    Posts
    12
    Quote Originally Posted by STanner View Post
    Any errors in the apache error log?
    Does /etc/httpd/conf.d/php.conf exist?
    Print
    Post | Search
    [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


    Wrap text View as:
    Line numbers
    2010 ShareText.ORG
    Terms | FAQ | About

  9. #9
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    PHP is fine, but you are missing quite a few modules in whatever it is you are trying to load
    linux user # 503963

  10. #10
    Just Joined!
    Join Date
    Mar 2010
    Posts
    12
    Quote Originally Posted by scathefire View Post
    PHP is fine, but you are missing quite a few modules in whatever it is you are trying to load
    so what would you suggest? i guess it's all matter of user permissions. i would be a happy person if i could just run a test.php from my Apache.

Page 1 of 2 1 2 LastLast

Posting Permissions

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