Turn On/Down Safe Mod for Each Account

Cyber-DL

Member
Jan 17, 2008
7
0
51
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 ?!
 

JPC-Stefan

Member
Oct 29, 2008
23
0
51
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.
 

hzJayJ

Well-Known Member
Nov 14, 2008
76
1
58
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
 
  • Like
Reactions: rhenderson

Cyber-DL

Member
Jan 17, 2008
7
0
51
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.
I put php.ini in this path : /home/username/public_html but it doesn't work
is this correct path ?

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
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 ?!
 

rhenderson

Well-Known Member
Apr 21, 2005
783
2
168
Oklahoma
cPanel Access Level
Root Administrator
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 ?!
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.
 

stdout

Well-Known Member
Apr 10, 2003
189
7
168
Nelspruit, Mpumalanga, South Africa
cPanel Access Level
Root Administrator
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 ?!
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.
 

Cyber-DL

Member
Jan 17, 2008
7
0
51
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.
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 !?
 

JPC-Stefan

Member
Oct 29, 2008
23
0
51
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.