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.

All sites show internal 500 error

Discussion in 'General Discussion' started by cwalke32477, Nov 27, 2010.

  1. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    I'm really not liking 11.28.45, sold a VPS to a client, it installed cpanel from release, and it has been nothing but issues.

    This is all I get with websites.
    Any ideas what to do to figure out why this is happening?

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@remarketme.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.4 Perl/v5.8.8 Server at remarketme.com Port 80
     
  2. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    Well I got it up. I HAVE TO USE 'DSO' ON PHP!!!!!!!!!!!!
    I can't use suPHP or everything gives an internal 500.

    On another note mod_userdir also does not work. It gives 403 Forbidden errors when accessing ip/~username

    Anyone know how to get 11.28.45 to work with suPHP?
    And get the userdir to show properly?
     
  3. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    SuPHP and Mod_userdir should work on that cPanel version. Did you checked the Apache logs for "Internal Server 500 error" message? It should give you an idea what is causing the issues. FYI, when you enabled SuPHP, you should take care of the following things:

    1) directory/files persmissions should not be more than 755/644 respectively.
    2) php directives should not be mentioned in the .htaccess file. You will have to place/create php.ini under the domains who want to set their own values for php directives.

    And have someone look into for the Mod_userdir issue.
     
  4. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    this was a clean install.
    Everything should have been set properly from the install, like 11.26 did.

    So how do I check waht you were saying?
     
  5. RCraft

    RCraft Well-Known Member

    Joined:
    Nov 7, 2010
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Your first step is pretty simple. Switch it to suphp and do the following:

    tail -f /usr/local/apache/logs/error_log

    Then visit a page and see what the output is in the error log. That'll give us a bit more to go on then the generic 500 error message. When you get the 500 error it usually means that something with the users account is incorrect, but it could be other things. Won't know till see the output of your error log, however.
     
  6. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    Here is some of the logs info. It appears there some components missing?

    Code:
    root@server1 [/]# tail -f /usr/local/apache/logs/error_log
    [Wed Dec 01 18:23:54 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
    [Wed Dec 01 18:23:54 2010] [notice] ModSecurity for Apache/2.5.12 (http://www.modsecurity.org/) configured.
    [Wed Dec 01 18:23:55 2010] [notice] mod_bw : Memory Allocated 0 bytes (each conf takes 36 bytes)
    [Wed Dec 01 18:23:55 2010] [notice] mod_bw : Version 0.92 - Initialized [0 Confs]
    [Wed Dec 01 18:23:55 2010] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_mono/2.6.3 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.4 Perl/v5.8.8 configured -- resuming normal operations
    [Wed Dec 01 18:24:03 2010] [error] [client 76.122.100.36] /usr/bin/php: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
    [Wed Dec 01 18:24:03 2010] [error] [client 76.122.100.36] Premature end of script headers: index.php
    [Wed Dec 01 18:24:04 2010] [error] [client 76.122.100.36] File does not exist: /usr/local/apache/htdocs/index.php, referer: http://173.212.238.50/~bean12/
    [Wed Dec 01 18:25:29 2010] [error] [client 124.115.4.201] client denied by server configuration: /home/remarket/public_html/error_log
    [Wed Dec 01 18:25:29 2010] [error] [client 124.115.4.201] client denied by server configuration: /home/remarket/public_html/.htaccess
    [Wed Dec 01 18:26:49 2010] [error] [client 124.115.0.26] client denied by server configuration: /home/remarket/public_html/error_log
    [Wed Dec 01 18:26:49 2010] [error] [client 124.115.0.26] client denied by server configuration: /home/remarket/public_html/.htaccess
    
    
    Here is another one that shows Token syntax issues
    Code:
    root@server1 [/]# root@server1 [/]# tail -f /usr/local/apache/logs/error_log
    -bash: root@server1: command not found
    root@server1 [/]# [Wed Dec 01 18:23:54 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
    -bash: syntax error near unexpected token `('
    root@server1 [/]# [Wed Dec 01 18:23:54 2010] [notice] ModSecurity for Apache/2.5.12 (http://www.modsecurity.org/) configured.
    -bash: syntax error near unexpected token `('
    root@server1 [/]# [Wed Dec 01 18:23:55 2010] [notice] mod_bw : Memory Allocated 0 bytes (each conf takes 36 bytes)
    -bash: syntax error near unexpected token `('
    root@server1 [/]# [Wed Dec 01 18:23:55 2010] [notice] mod_bw : Version 0.92 - Initialized [0 Confs]
    -bash: [Wed: command not found
    root@server1 [/]# [Wed Dec 01 18:23:55 2010] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_mono/2.6.3 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.4 Perl/v5.8.8 configured -- resuming normal operations
    -bash: syntax error near unexpected token `('
    root@server1 [/]# [Wed Dec 01 18:24:03 2010] [error] [client 76.122.100.36] /usr/bin/php: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
    
     
    #6 cwalke32477, Dec 1, 2010
    Last edited: Dec 1, 2010
  7. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    It seems to pretty much boil down to this error now.
    However, I can find anything on Google about Licurl.so.4 just 5, 3 and 1
    How can I get this package?

    /usr/bin/php: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
     
  8. k-planethost

    k-planethost Well-Known Member

    Joined:
    Sep 22, 2009
    Messages:
    199
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Athens Greece
    in order to use suphp has a procedure isnt such simple
    suPHP uses the "mod_suphp.so" module which is stored inside /usr/local/apache/modules directory when you select "Mod SuPHP" during the EasyApache rebuild. Configuration file for suPHP can be found in /opt/suphp/etc directory.

    Note that when using suPHP as a PHP default handler, the permission of the directories inside /home/USER_NAME/public_html should be 755 and the file permissions should be 644 and the file should be owned by USER:USER.
    Else you will have apache errors on all dynamic sites
    you have to recompile apache i think in order to see if the right curl libraries are installed.
     
  9. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    I have already checked all of that, and recompiled a few times.
    Issue just persists. never had this issue with an 11.26.xx install
    Unfortunately my core linux skills are still a bit lacking.
    How would I ensure that everyone is owned by USER:USER
     
    #9 cwalke32477, Dec 2, 2010
    Last edited: Dec 2, 2010
  10. k-planethost

    k-planethost Well-Known Member

    Joined:
    Sep 22, 2009
    Messages:
    199
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Athens Greece
    Once EasyApache completes, you can set suPHP as the default handler for PHP via:

    "WHM Main >> Service Configuration >> Apache Configuration >> PHP and SuExec Configuration"

    Keep in mind that there are some requirements with suPHP:

    1) PHP files should must not be set to 0666 or 0777 permissions. Instead, they should be set to the standard of 0644. Directories should be 0755.

    2) PHP Files/directories must be owned by the account username, rather than by "nobody" or "root".

    3) "php_flag" and "php_value" entries in the .htaccess must be removed, and a php.ini should be used in the account instead for any custom values.

    Apache suEXEC has to be on

    in order to check you can fire the following commands for folder permissions
    You will only need to remove those lines from .htaccess files, not server level configurations.
    You can use the following command to check for accounts using those values in their .htaccess files:

    find /home*/*/public_html/ -mindepth 1 -iname "\.htaccess" -type f -exec grep -Hi "^php_*a*" '{}' \;

    Below are some commands you can run to change all permissions all at once. These commands must be ran at your own risk, as it is not easily reversible if you decide to switch back to DSO.

    find /home*/*/public_html/ -mindepth 1 -perm 0777 -type d -exec chmod -c 0755 '{}' \;

    find /home*/*/public_html/ -mindepth 1 -perm 0666 -type f -exec chmod -c 0644 '{}' \;

    find /home*/*/public_html/ -mindepth 1 -perm 0777 -type f -exec chmod -c 0644 '{}' \;

    For ownership:

    For ownership:

    for i in `ls /var/cpanel/users/`; do chown -R $i:$i /home/$i/public_html ; done

    Then make sure the ownership of the public_html directory is correct via the
    following command:

    for i in `ls /var/cpanel/users/`; do chown $i:nobody /home/$i/public_html ; done

    this commands will be used by our own risk as i sasy its not easy to switch back to dso
     
  11. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    I'll give these permission changes a try, at this point it doesn;t matter if they wreck the system and make dso useless, it's a still pretty mucha clean load, and a reinstall is easy at this point

    Aside from the permission issues, what about the libcurl.so.4 missing as indicated by the error logs?
     
  12. ModServ

    ModServ Well-Known Member

    Joined:
    Oct 17, 2006
    Messages:
    332
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Egypt
    cPanel Access Level:
    Root Administrator
    I assume that this problem is because of full suphp_log, check the size of the logs

    PHP:
    ls -lh /usr/local/apache/logs/suphp_log
    If it was 2GB then execute the following command

    PHP:
    echo > /usr/local/apache/logs/suphp_log
    Try and provide us with the result.

    About the libcurl, It couldn't make the Internal but if an account is using it.
     
  13. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    this server is a clean install, there no log file 2gb in size.
    it's not even live because i can't anything on 11.28.45 to work
    Libcur.so.4 is missing fro the system all together.only has 3
     
  14. ModServ

    ModServ Well-Known Member

    Joined:
    Oct 17, 2006
    Messages:
    332
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Egypt
    cPanel Access Level:
    Root Administrator
    Make an EasyApache again with those commands:
    PHP:
    wget http://www.setpkgs.com/BestConfiguration.yaml
    mv -f BestConfiguration.yaml /var/cpanel/easy/apache/profile/custom/
    /
    scripts/easyapache --profile=/var/cpanel/easy/apache/profile/custom/BestConfiguration.yaml --build
    After it finishes execute the following two commands:
    PHP:
    /usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1
    /etc/init.d/httpd restart
    Apache 2.2.x (Right now 2.2.14)
    PHP 5.2.14


    Tested in 120 Servers, Also you could check the configuration before you start if you like.
     
  15. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    Well here is a new update.
    I created a symbolic link for libcurl.so.4 to point to libcurl.so.3 and it miraculously worked. However, this could cause potential issues down the road with any update.

    Here is alo what I found. My production server on 11.26.20 has no libcurl.so.x files. The odd thing is, that when I setup the vps I mirrored the easyapache off of my settings from my productions server.

    So now what I did, on the vps, was go back to easyapache and remove curl, curlssl, and curl wrappers, and also deleted my symbolic link. Recompiled apache and voila suPHP is working.

    SO now the issue is is how do I get curl on this system, as many CMS packages require it? Odd that my production server which also has curl, curlssl, and curl wrappers enable has no libcurl.so.x files.

    currently recompiling apache with those options checked again, on the vps....
    update: I have isolated the issue to curlssl. So now how do I get get curlssl working in this new 11.28.xx version of cpanel?
     
    #15 cwalke32477, Dec 4, 2010
    Last edited: Dec 4, 2010
  16. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    This still continues to be an issue an this server.
    I had left curlSSL disabled, hoping that the next patch on 11.28 would fix the issue.
    Now the client needs curlSSL and the same problem has reared it's ugly head.

    In the apache logs it shows /usr/bin/php: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
    and once again, this file does not exist on the server. Why does it keep looking for this file?
    The build is now 11.28.64
     
  17. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    The issue is with php and there is nothing to deal with cPanel. Are you trying to enable both pp4 and php5 in the server. It will be always good an expert tech do a php recompilation. You can contact your host to do it for you.
     
  18. cwalke32477

    cwalke32477 Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Atlanta, Georgia
    cPanel Access Level:
    Root Administrator
    no, just php5
    Been using easyApache to compile it.
    I had already contated the datacenter, and they don;t know why either.
    But then again, it is an unmanaged server.
    This issue became apparent after the 11.28.54 CURRENT
    but even now, with it updated to STABLE 11.28.64, it is still an issue.
    All new servers deployed, do not have this problem. Just the ones that were deplaoyed during the 11.28.54 build.
     
  19. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hi Chris,

    I really thinks this php issue can be corrected with the help of an expert tech.
     
  20. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Is the system in question 64-bit? Of note, you can symlink the libcurl.so.4 as you mentioned doing previously without it having adverse effects.
     
Loading...

Share This Page