open_basedir path
Hello everybode,
Can any body tell me how to set the open_basedir path in php.ini if I use suphp?
What paths should be included in the open_basedir path?
Thank you very much.
-
Hello, Is there a reason you're not using the option within WHM? Documentation: PHP open_basedir Tweak 0 -
Hello :) Per the user interface, if PHP is configured to run as a CGI, SuPHP or FastCGI process, the open_basedir setting must be manually specified in the relevant php.ini file. There is a post on this here that you might find helpful: open_basedir with suPHP Thnak you. 0 -
Hello, I read the post before but I want to make sure that just the three paths: open_basedir = /home/:/usr/lib/php:/usr/local/lib/php:/tmp will make all the websites work probably since I host 3 websites in my VPS. I also found some posts stated that open_basedir = /home/users/you/public_html vs open_basedir = /home/ Will it be fine to use that path so it is more specific? Thank you very much. 0 -
You can edit the path so that it's restricted to the account's home directory. Remember this is for the individual php.ini within the account, and not the global php.ini file. Thank you. 0 -
Thank you very much.I understand now. 0 -
Hello cPanel staff, One more question: For the individual php.ini file ,should I copy the whole content of the global php.ini file then paste and modify what I need or just copy the part I need to modify (For example: just one line open_base_dir = /home/users/ ) ? Thank you very much 0 -
I recommend copying the global php.ini file and then modifying it accordingly, as opposed to just creating an empty php.ini and adding individual entries. Thank you. 0 -
I have copied php.ini file from /usr/local/lib/php.ini to /home/martin/php.ini and I have added in it: open_basedir = /home/:/usr/lib/php:/usr/local/lib/php:/tmp Why can I still still access and read / through php script which is located in /home/martin/pubic_html/script.php? And question number two, why not set this globally in whm in Service Configuration " PHP Configuration Editor -> open_basedir? 0 -
[quote="Clouseau, post: 1814931">I have copied php.ini file from /usr/local/lib/php.ini to /home/martin/php.ini and I have added in it: open_basedir = /home/:/usr/lib/php:/usr/local/lib/php:/tmp Why can I still still access and read / through php script which is located in /home/martin/pubic_html/script.php?
Hello :) I'm not sure I understand the question here. Per our documentation: It limits PHP's access to the user's home directory, /tmp, and a few necessary PHP system directories. Based on your question, the PHP script is located in the user's home directory. Is that not the case? Thank you.0
Please sign in to leave a comment.
Comments
9 comments