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.

Turn On/Down Safe Mod for Each Account

Discussion in 'General Discussion' started by Cyber-DL, Nov 20, 2008.

  1. Cyber-DL

    Cyber-DL Member

    Joined:
    Jan 17, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hello ,

    i have a problem , i want Turn Off Safe mod for a list of my Accounts , Only for 15 of my accounts ,

    how can i do this ?!
     
  2. JPC-Stefan

    JPC-Stefan Member

    Joined:
    Oct 29, 2008
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    You can turn off the safe mode by placing custom php.ini file in each account's web-directory and changing the safe mode value to off in it.
     
  3. hzJayJ

    hzJayJ Well-Known Member

    Joined:
    Nov 14, 2008
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    If the server is not suPHP enabled, you can add the below entries into your .htaccess file.

    php_value safe_mode off

    If the above dosent works please try using :

    php_flag safe_mode off

    or replace the "off" word with: 0
     
    rhenderson likes this.
  4. Cyber-DL

    Cyber-DL Member

    Joined:
    Jan 17, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I put php.ini in this path : /home/username/public_html but it doesn't work
    is this correct path ?

    i try but this method doesn't work too !


    In DirectAdmin we has dedicated php.ini file for each account , Cpanel did have this feature ?!
     
  5. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Yes if you run SuPHP you can have a dedicate php.ini for each account, otherwise you have to create a .htaccess make sure the dot is before the htaccess and do what hzJayJ said to do. Before we used SuPHP we used
    php_flag safe_mode = off in our .htaccess file.

    I could be wrong because we have not been running SuPhp for very long but the php.ini we are using now did not include child directories.
     
  6. stdout

    stdout Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    189
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Nelspruit, Mpumalanga, South Africa
    cPanel Access Level:
    Root Administrator
    Try copying your php.ini to the directory where your script resides.
    eg. http://yourwebsite.com/script123/test.php

    Copy the customized php.ini to /public_html/script123/ so the settings can take affect in that directory. Unlike the .htaccess - the php.ini needs to be present in every directory where you wish the change to take affect.
     
  7. Cyber-DL

    Cyber-DL Member

    Joined:
    Jan 17, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    i put php_flag safe_mode = off to my .htaccess file ! but 500 Internal Server Error was show :D .

    why 500 Internal Server Error ? so what's next STep !?
     
  8. JPC-Stefan

    JPC-Stefan Member

    Joined:
    Oct 29, 2008
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    To find out the exact reason of getting 500 Internal Server Error please check the apache logs and use the below command:

    Code:
     tail -f /usr/local/apache/logs/error_log 
    
    However you may getting 500 error because SUPHP doesn't allow to edit php variables and flags in .htaccess file. For this you have to put php.ini file in your public_html directory.

    Use phpinfo(); function to find out the loaded php.ini file path, if it is loading from system default path or from your directory.
     
  9. 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
    If the 500 error is generated by SuPHP, check /usr/local/apache/logs/suphp_log instead
     
Loading...

Share This Page