Results 1 to 18 of 18
  1. #1

    suphp not working?

    Hello,
    i have a VPS with multiple cpanel accounts (mine).
    Apache/Centos5/WHM11.28.86

    I thought i had suphp installed enabled, but if i have i don't think I have it working properly. My understanding is if it is working I cant set directories to 777. I have just installed a script setting folders to 777, config to 655 as required by the script, it happily installed. Shouldn't do this should it? or have I read it all wrong? I have googled till my eyes bled, but i still don't understand if it is working or not. Read a squillion posts and pages.

    In WHM/Configure PHP it says:
    PHP 5 Handler suphp
    Apache suEXEC on

    in my /usr/local/apache/conf/httpd.conf file it has:
    <VirtualHost xx.x.xxx.xxx:80>
    ServerName server.hostname.com
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin emailaddy.com
    <IfModule mod_suphp.c>
    suPHP_UserGroup nobody nobody
    </IfModule>

    Include "/usr/local/apache/conf/includes/pre_virtualhost_global.conf"
    Include "/usr/local/apache/conf/includes/pre_virtualhost_2.conf"
    are empty

    /etc/suphp.conf does not exist

    I did not install suphp, it is a managed vps, and looks like it is part of the Apache install.

    I could throw it at the host support, but i would love to get my head around it.

    So if someone can tell me where i have stuffed up, point me in the right direction, I would be exceedingly grateful.

  2. #2
    Join Date
    Nov 2010
    Location
    Arizona
    Posts
    297
    Have you tried re-running /scripts/easyapache?

  3. #3
    Yes , Try Running easyapache
    || Eminds Infotech || 9th Year of Server Management Solutions ||
    || Server Management || 24x7 Technical Support || Cloud Management ||
    || 24x7 Live Chat Support || VPS Management || Server Migrations ||
    || https://www.24x7cloudservermanagement.com||

  4. #4
    eNetCloud-CEO and asciiDigital, thanks - consensus gives confidence! Did so, some sites wouldn't load due to zend not installing. I let it load on default settings, it loads brightest and newest of everything, but latest zend wont work with php5.3.x.
    So recompiled with php 5.2.9, latest that zend can handle.

    Original problem persists - I can still change folders to 777, files to 666 in cpanel. Am I looking at this right? Should I be able to change to this permission level?

  5. #5
    Join Date
    Mar 2011
    Posts
    31
    Please execute the following command from the command line. This will help you in fixing the problem.


    ==========
    /usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1
    ==========

    where,

    5, is PHP version 5.
    none, we do not need PHP4.
    suphp, enable suphp
    1, Apache Suexec enabled.



    Good Luck

  6. #6
    LBA, thanks for helping.

    In WHM/Configure PHP it has -
    Current Cinfiguration
    Option Configured Value
    Default PHP Version (.php files) 5
    PHP 5 Handler suphp
    PHP 4 Handler none

    Apache suEXEC on

    So is this already OK?

  7. #7
    Join Date
    Mar 2011
    Posts
    31
    Quote Originally Posted by Traprock View Post
    LBA, thanks for helping.

    In WHM/Configure PHP it has -
    Current Cinfiguration
    Option Configured Value
    Default PHP Version (.php files) 5
    PHP 5 Handler suphp
    PHP 4 Handler none

    Apache suEXEC on

    So is this already OK?
    It shows that everything is okay.

    But run the above script if it is still not working. Also try restarting apache after this.

    Good Luck

  8. #8
    LBA,

    I'm getting a "no such file or directory"....

  9. #9
    OK, I am straw-clutching here. Is it probable that I have de-tuned suphp by modifying a config file somewhere? That remains intact after a couple of apache rebuilds? And if so, what does anyone think it could be?

  10. #10
    Join Date
    Mar 2011
    Posts
    31
    Hi,

    Just do an "/scripts/upcp --force" if that file is missing. This script has the ability to replace all cpanel missing file.

    Please make sure that "CPANEL=stable" in /etc/cpupdate.conf.

    Please feel free to PM me if the issue persists.

    Good Luck

  11. #11
    Please show us the contents of:

    /usr/local/apache/conf/php.conf

  12. #12
    # This file was automatically generated by the Cpanel PHP Configuration system
    # If you wish to change the way PHP is being handled by Apache on your system,
    # use the /usr/local/cpanel/bin/rebuild_phpconf script or the WHM interface.
    #
    # Manual edits of this file will be lost when Apache is updated.


    # SuPHP configuration for PHP5
    LoadModule suphp_module modules/mod_suphp.so
    suPHP_Engine on
    AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
    <Directory />
    suPHP_AddHandler application/x-httpd-php5
    </Directory>

    # End of autogenerated PHP configuration.

  13. #13
    Is the issue that you can create a folder with 777 perms, or that anything you put in that folder will not execute? I think suPHP won't prevent you from creating the folder with those perms, but that it won't run anything from it.

    My understanding may be incomplete, however.

  14. #14
    Join Date
    Oct 2010
    Location
    ON, Canada
    Posts
    960
    You can still set 777 permissions, but having 777 permissions on your scripts or the directories they reside in will not run and will instead cause a "500 internal server error" when attempting to execute them, this is done to protect you from someone abusing your scripts. Your scripts and directories can now, only have a maximum of 755 permissions (read/write/execute by you, read/execute by everyone else) and be able to run.
    GG Web Hosting
    Backup, Digital (SSL) Certificates, Domains, Hosting, Privacy Policy, Software
    S/W: Peel Ads, Softaculous, WHMCS Addons (Abuse Mon., Affiliate Peel Ads, Client Stat., Ord. Prevention, Ord. Stat., Softaculous NOC, Sys. Cleanup)
    Authorized Reseller Program

  15. #15
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    8,910
    Quote Originally Posted by Traprock View Post
    OK, I am straw-clutching here.
    You and everyone else trying to help. :]

    1. Have you checked the suphp logs?

    /usr/local/apache/logs/suphp_log

    2. Have you checked the Apache logs?

    /usr/local/apache/logs/error_log

    3. What I would recommend is tailing those logs and visit the website that's not working with suPHP. Post the relevant log entries here. It could be a number of things, but without seeing the logs it's hard to say.
    Patrick William | RACK911 Labs | Software Security Auditing
    400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com

    www.HostingSecList.com - Security notices for the hosting community.

  16. #16
    Join Date
    Oct 2010
    Location
    ON, Canada
    Posts
    960
    I don't think that they were saying their script isn't working.
    I thought i had suphp installed enabled, but if i have i don't think I have it working properly. My understanding is if it is working I cant set directories to 777. I have just installed a script setting folders to 777, config to 655 as required by the script, it happily installed. Shouldn't do this should it?
    I took that to mean that they installed the script just fine, but are confused about having been able to set 777 on a folder(s). As said in my last reply, 777 can be set even with suPHP; just not on any scripts or their containing folders, else an error will result.
    GG Web Hosting
    Backup, Digital (SSL) Certificates, Domains, Hosting, Privacy Policy, Software
    S/W: Peel Ads, Softaculous, WHMCS Addons (Abuse Mon., Affiliate Peel Ads, Client Stat., Ord. Prevention, Ord. Stat., Softaculous NOC, Sys. Cleanup)
    Authorized Reseller Program

  17. #17
    Join Date
    Dec 2005
    Location
    The Netherlands
    Posts
    107
    You can still set files and directories to 777, however you should be getting a "Internal Server Error" when you are trying to execute something there.

    Check also the message of Patrick, the logs of suphp often give very clear messages.
    If your logs of suphp are completely empty, it's 100% sure suphp is not active.

  18. #18
    Thanks to everyone for input.
    My initial query was whether file perms could be changed to 777, some readings say you can't, or i took it that way. Thanks for that clarification James.

    Tailing the suphp log shows all the 'executing user_file.php' as UID and GID, so that looks like a good thing.

    I was concerned initially because I installed a billing script that required many folders to be set to 777, and would not install until they were. So I did, and it installed, then i changed them to 755, and it works fine.

    I just changed them back to 777, and opened the page. The script displayed its own error page 'page not found'.

    I checked the logs again, shows all the executions, though no mention of any problem or non-execution.

    So, my summary... it is working, I am traveling under the protection of suphp, as I wanted. If you agree, thanks for all your help.

    But if you think it is not working properly, please say, or suggest further tests. Thanks again.

    Traprock from Oz

Similar Threads

  1. Replies: 3
    Last Post: 12-10-2010, 12:56 AM
  2. joomla not working after install suphp
    By seachen in forum Web Hosting
    Replies: 7
    Last Post: 11-19-2010, 11:42 AM
  3. suphp working with vsftpd
    By cent52 in forum Hosting Security and Technology
    Replies: 3
    Last Post: 04-26-2009, 06:01 PM
  4. suPHP isn`t working good.
    By xprotect in forum Dedicated Server
    Replies: 6
    Last Post: 03-20-2006, 12:48 PM
  5. suPHP not working
    By Jabolt in forum Hosting Security and Technology
    Replies: 1
    Last Post: 12-28-2005, 05:44 AM

Posting Permissions

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