Problem with "home" directory in PHP 5.4

fickany

Member
Dec 28, 2011
12
0
51
cPanel Access Level
Root Administrator
Hi Everybody,

Due to the coming PHP version change, several security settings will cease including safe_mode. The PHP version 5.3.28, which is currently used, has this setting, but the 5.4 won’t. With safe-mode it is possible to prevent users to be able to see each other’s „home” directories, but later with the new version, it won’t be possible using this method. Personally, I would use php.ini with each user, but I could not find any recent and working instruction. Do you have any idea regarding this, or is there some instruction or tutorial? (PHP 5 Handler: suPHP)

Thank you!

Regards,
Gábor
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Personally, I would use php.ini with each user, but I could not find any recent and working instruction.
You can simply upload a copy of /usr/local/lib/php.ini to the account's public_html directory and modify it for the individual account. Or, do you mean there is a specific value you want to edit with PHP 5.4?

Thank you.
 

fickany

Member
Dec 28, 2011
12
0
51
cPanel Access Level
Root Administrator
You can simply upload a copy of /usr/local/lib/php.ini to the account's public_html directory and modify it for the individual account. Or, do you mean there is a specific value you want to edit with PHP 5.4?

Thank you.
I understand what you wrote and thank you for your answer, but I wouldn’t like the users to be able to change their php.ini files, therefore I would store them separately in another directory. (ie. /home/inis/user1.ini, /home/inis/user2.ini etc.) This would be important specifically because of open_basedir, that is, it would be blocked on a user basis (separately for every user) in their own ini file. (For example /home/user1 -> open_basedir = "/home/user1"). And if any user’s values have to be changed, then I could modify them separately for that user, independently from the others.