Question
How do I enable PHP's open_basedir directive?
Procedure
In the update to EasyApache 4, the WHM function for PHP open_basedir Tweak was removed. However, it is still possible to employ the use of the open_basedir restrictions.
To enable the use of open_basedir, you will need to edit the global PHP INI file for the PHP version you wish to use. You can do this in WHM by going to Home / Software / MultiPHP INI Editor. Click on the editor tab, then select your PHP version from the drop-down menu.
-
Find the section below:
CONFIG_TEXT: ; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
; http://php.net/open-basedir
;open_basedir = -
Remove the ";" from the bottom line so the value looks like this:
CONFIG_TEXT: open_basedir =
- Save your changes.
- cPanel users can now enable the directive for their own directory using the MultiPHP INI Editor menu.
Comments
0 comments
Article is closed for comments.