The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I can't get my main files to work..

Discussion in 'General Discussion' started by ryanlee, May 25, 2010.

  1. ryanlee

    ryanlee Member

    Joined:
    May 25, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Okay, so I just got cpanel setup and whatnot..

    I uploaded my forum, and for some reason I keep getting a blank page, my index.php files are in there but for some reason it's not reading it..

    I don't even have a mysql database uploaded so it should be reading index.php and coming up cannot connect to database but it's not doing anything, it's a blank page.

    I tried changing the main files to index.php in WHM

    also I even created a new account, uploaded a plain index.php file yet I go to the site and it's going to a default page..

    I can't figure out why it's doing this, any ideas?

    also I edited some file and I keep getting this..

    root@ [/home/]# service httpd restart
    Warning: DocumentRoot [/dev/null] does not exist
    root@ [/home/]#

    Please can you help me figure this out..

    thanks
     
  2. ryanlee

    ryanlee Member

    Joined:
    May 25, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    I even got this set

    # DirectoryIndex is set via the WHM -> Service Configuration -> Apache Setup -> DirectoryIndex Priority
    DirectoryIndex index.php index.html


    that's in /usr/local/a/usr/local/apache/conf/httpd.conf

    plus it shows correctly in whm.. i can't figure this out
     
  3. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    You get a blank page because the index.php is not processed correctly and "display_errors" in php.ini must be disable. Edit the php.ini at

    and set

    Save the file and restart the httpd service.

    If you still see a blank page, run the index.php page manually via shell. SSH to your server as root and execute the index page as

    it will display the error message. You can also check the Apache error logs at

     
  4. ryanlee

    ryanlee Member

    Joined:
    May 25, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    I checked it's set to ON

    I typed that in ssh and it does this

    root@ [/home/]# php index.php
    root@ [/home/]#

    it does nothing or says nothing

    any idea why i'm getting this error

    root@ [/home/]# service httpd restart
    Warning: DocumentRoot [/dev/null] does not exist
    root@ [/home/]#
     
  5. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    That warning message is not an issue.. it can be safely ignored. Have you checked the Apache error logs? What do they say? Would you mind if I take a look at your server?
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    In a cPanel/WHM environment, the proper way to restart Apache is to run:

    /scripts/restartsrv_httpd

    Just using service http restart will result in some things not happening (e.g. SSL-based websites not being brought back online).

    Also, website files should be stored within in /home/username (substitute username with the cPanel user's username) - often within /home/username/public_html/, not /home/.

    Check the cPanel user's home directory to see if there is an error_log file, it may help with the diagnosis.

    Another error log you can check as a server administrator is:

    /usr/local/apache/logs/error_log
     
  7. ryanlee

    ryanlee Member

    Joined:
    May 25, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    yes I know they are in home directorys I just removed the dir
     
  8. ryanlee

    ryanlee Member

    Joined:
    May 25, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    some reason it's reading the files from

    /usr/local/apache/htdocs/index.html

    instead of the home directory
     
  9. ryanlee

    ryanlee Member

    Joined:
    May 25, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    the weird thing is /http://scenecoderz.cc/~scenecod/
    that works
     
    #9 ryanlee, May 25, 2010
    Last edited by a moderator: May 26, 2010
  10. ryanlee

    ryanlee Member

    Joined:
    May 25, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    I added index.php
    with <php echo"hello wolrd"; ?>

    and now i look at the error and this what it says..

    [Wed May 26 00:10:54 2010] [error] [client 207.6.144.80] Premature end of script headers: index.php
    [Wed May 26 00:11:01 2010] [error] [client 207.6.144.80] SoftException in Application.cpp:357: UID of script "/home/ryan/public_html/index.php" is smaller than min_uid
    [Wed May 26 00:11:01 2010] [error] [client 207.6.144.80] Premature end of script headers: index.php
    [Wed May 26 00:11:11 2010] [error] [client 97.84.134.243] SoftException in Application.cpp:357: UID of script "/home/ryan/public_html/index.php" is smaller than min_uid
    [Wed May 26 00:11:11 2010] [error] [client 97.84.134.243] Premature end of script headers: index.php
    [Wed May 26 00:11:12 2010] [error] [client 97.84.134.243] SoftException in Application.cpp:357: UID of script "/home/ryan/public_html/index.php" is smaller than min_uid
    [Wed May 26 00:11:12 2010] [error] [client 97.84.134.243] Premature end of script headers: index.php
     
  11. ryanlee

    ryanlee Member

    Joined:
    May 25, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thanks everyone, I think it had to do with a problem with me editing files with root and it changed the permission
     
  12. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Permission --- probably not so much.

    Though you might of accidentally set some files to owner 'root' in which case you would definitely have problems running in your web browser
     
Loading...

Share This Page