Main
29
July
2016

Fixing open_basedir in Joomla

Many security tools and blogs suggest setting the open_basedir in the php.ini file.  The open_basedir directive "Limits the files that can be accessed by PHP to the specified directory-tree, including the file itself. ... When the file is outside the specified directory-tree, PHP will refuse to access it." *

 

However, it can often trigger the error:

JFolder::create: Path not in open_basedir paths

 

In order to solve this, you have three options:

1. Disable it:  

Open your php.ini file and comment out the line below with a semi-colon ;

;open_basedir = /home/username/public_html

 

If you do not see it in there, you can check your .htaccess and comment out with a number sign (that's hashtag for younger folks) #

#php_admin_value open_basedir /home/username/public_html

 

2. Set to null:  

Open your php.ini file and comment out the line below with a semi-colon ;

open_basedir = none

 

In the htaccess, it is 

php_admin_value open_basedir none

 

2. Fix it:  

Since Joomla needs access to your tmp folder, you need to adjust the line to below**:

open_basedir = /home/username/public_html:/tmp/

 

In the htaccess, it is 

php_admin_value open_basedir /home/username/public_html:/tmp/

 

/home/username/public_html:/tmp/

 

* Source:
http://php.net/manual/en/ini.core.php#ini.open-basedir

** Source:https://docs.joomla.org/Security_Checklist_2_-_Hosting_and_Server_Setup#Consider_Using_PHP_open_basedir

 

 

 

Categories: Error Fixes, Server Settings, .htaccess, php.ini, Security

blog comments powered by Disqus

Sitemap

Get Started with YellowWebMonkey

Invalid Input

Invalid web address.

Invalid Input

Invalid Input

Joomla Certified Administrator

Joomla Maintenance Plans

Get started with reliable monthly care provided by a Joomla certified company.

Invalid Input

Invalid web address.

Invalid Input

Invalid Input