[SOLVED] Changing Server: open_basedir restriction in effect

Joomla versions 2.5, 1.7 and 1.6 are all end-of-life since December 31st 2014 and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
chiappa
Joomla! Intern
Joomla! Intern
Posts: 82
Joined: Wed Oct 26, 2011 6:53 pm
Location: Mostly Northeast Asia
Contact:

[SOLVED] Changing Server: open_basedir restriction in effect

Post by chiappa » Thu Apr 12, 2012 9:48 am

Hi there. I'm having problems transferring Joomla! 2.5.4 to another server.

I've build my Joomla site on a local server and when I upload the files to a live server, update the mysql database, change to correct settings in configuration.php I get the following error message while trying to access the admin back end.
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/piip/htdocs/piip.piip.net/administrator/defines.php) is not within the allowed path(s): (/Library/WebServer/Documents:tmp) in /home/piip/htdocs/piip.piip.net/administrator/index.php on line 12

Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/home/piip/htdocs/piip.piip.net/administrator/includes/defines.php) is not within the allowed path(s): (/Library/WebServer/Documents:tmp) in /home/piip/htdocs/piip.piip.net/administrator/index.php on line 18

Warning: require_once(/home/piip/htdocs/piip.piip.net/administrator/includes/defines.php) [function.require-once]: failed to open stream: Operation not permitted in /home/piip/htdocs/piip.piip.net/administrator/index.php on line 18

Fatal error: require_once() [function.require]: Failed opening required '/home/piip/htdocs/piip.piip.net/administrator/includes/defines.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/piip/htdocs/piip.piip.net/administrator/index.php on line 18
It seems to still think it's in the old path. However I have changed public $log_path and public $tmp_path to the new path in configuration.php

Any ideas? Many thanks....!
Last edited by chiappa on Fri Apr 13, 2012 3:20 am, edited 1 time in total.

 
User avatar
chiappa
Joomla! Intern
Joomla! Intern
Posts: 82
Joined: Wed Oct 26, 2011 6:53 pm
Location: Mostly Northeast Asia
Contact:

Re: Changing Server: open_basedir restriction in effect

Post by chiappa » Fri Apr 13, 2012 3:19 am

Finally got it... I was reading about the "open_basedir" directive. "

Security Checklist 2 - Hosting and Server Setup: Consider Using PHP open_basedir

Did a locate php.ini and there it was: /home/xxxxx/htdocs/xxxxxxx.net/administrator/php.ini

upload_tmp_dir = /Library/WebServer/Documents/tmp
open_basedir = /Library/WebServer/Documents:tmp


Just changed those to the correct path and voila.

Btw. If your getting the cachelite error as well:

JLIB_CACHE_ERROR_CACHE_STORAGE_LOAD, Unable to load Cache Storage: cachelite

This post is a gem: Problem with new site - Cache/Lite.php

bchadwick
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu May 17, 2012 6:18 pm

Re: [SOLVED] Changing Server: open_basedir restriction in ef

Post by bchadwick » Fri May 18, 2012 1:50 am

Wish I would have found this fix eight hours ago, thank you for posting!

recycler
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Apr 28, 2007 11:13 am

Re: [SOLVED] Changing Server: open_basedir restriction in ef

Post by recycler » Sat Dec 08, 2012 12:26 pm

awesome... found your post in 15 minutes... fixed after 2 more...

thanx heaps...

kslang
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Oct 27, 2008 8:59 pm

Re: [SOLVED] Changing Server: open_basedir restriction in ef

Post by kslang » Fri May 17, 2013 6:24 pm

Chiappa, I have wasted an entire day on this... and once I found your reply, I was able to fix my Joomla site (that was moved) in 10 mins. THANK YOU... Such a simple fix ... Kudos

daiduong47
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Aug 14, 2011 8:35 pm
Contact:

Re: [SOLVED] Changing Server: open_basedir restriction in ef

Post by daiduong47 » Tue Sep 03, 2013 4:37 am

You can use component RS Firewall to solve this problem automatically. I've used it and success.
Anyway, thanks.

saveh1112
I've been banned!
Posts: 17
Joined: Thu Sep 05, 2013 12:46 pm
Location: iran

Re: [SOLVED] Changing Server: open_basedir restriction in ef

Post by saveh1112 » Tue Sep 10, 2013 6:57 am

i had this problem too
and i use Rs Firewall component and it solved
thank you very much

syed786
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jan 03, 2013 11:20 am

Re: [SOLVED] Changing Server: open_basedir restriction in ef

Post by syed786 » Fri Apr 18, 2014 8:08 am

I am getting Error "JFolder::create: Path not in open_basedir paths Unable to create destination" while installing Joomla extension. How to solve?
If you getting the error "JFolder::create: Path not in open_basedir paths Unable to create destination" while uploading and installing any extension, Please follow the steps.

1. Login to Joomla Administartor panel.

2. Go to Global Configuration

3. Click "Server"

4. Change the path from /public_html/tmp to "tmp"

5. Login to control Panel(CPanel)

6. Open File Manager

7. Open Folder "libraries"

8. Open Folder "joomla"

9. Open Folder "filesystem"

10. Right Click on "folder.php" and click Edit.

11. Look for the line, (search = obd):

Code:
$obd = ini_get('open_basedir');


Comment out that line with // at the beginning so it becomes:
Code:
//$obd = ini_get('open_basedir');

12. Save and Close.

slowman
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Aug 17, 2015 4:02 am

Re: [SOLVED] Changing Server: open_basedir restriction in ef

Post by slowman » Mon Aug 17, 2015 4:23 am

Hello, first to nothing, sorry for my bad English.
I had a similar problem, maybe this can help someone in the future, Im using RSFirewall and have done a security check, the system told me that one of my site's weakness is not having "open_basedir" and "disable_functions" enabled, so RS firewall attempt to Fix that creating a php.ini file and changing the configuration.php file.

The problem is that not all hosting providers allow this, my provider does not allow reading or changing the php.ini file, even you cant see it anywhere.

So i fixed it by:

-Removing the php.ini file inside my publichtml folder, created by RSFirewall (this works just for people with the same case as me)
-Entering the backend, and in global configuration, and under the system tab find cache configuration, and set it to "progresive", and in cache handler set it to "file".
If you can't get access to your backend you can change your configuration.php like this:
Code:
public $cache_handler = 'cachelite';
IN:
Code:
public $cache_handler = 'file';
OR:
Code:
public $caching = '0';
IN:
Code:
public $caching = '2';


Some info here: https://www.rsjoomla.com/support/docume ... -work.html

 

Locked

Return to “Installation Joomla! 2.5”