6

I am trying to install a new extension in Joomla,But I am getting this error Message: "JFolder::create: Path not in open_basedir paths Unable to create destination"

What is the solution?

  • @Farahmand,Thank you,But please note that,this website has been created for Joomla,and it's on Public beta.So I think Joomla user will going to this website in the future. – Hbirjand Sep 27 '14 at 11:44
  • Okay, could you edit your question and add more details like the name of the extension you wanted to install (or say any new extension), server name and version, tmp directory permissions, etc.? I think hacking core Joomla files is not a good idea. – Farahmand Sep 27 '14 at 12:30
  • @Farahmand,yes hacking the Joomla's core file is not a good Idea,That is why I have posted this question here!,just because I am looking for another solution,even my solution is working. – Hbirjand Sep 28 '14 at 14:06
5

I have test another solution thanks to the user @farahmand and it's worked very well and I decided to provide a step by step guide for the solution

Solution One:

First find the exact absolute path to your tmp folder by using this trick:

Create a PHP file in your website root,for example path.php

Place this snippet of code in the file and hit the save button

<?php
$path = getcwd();
echo "Your Absolute Path is: ";
echo $path;
?>

Navigate to yourdomain.com/path.php in your browser

From now on:

  1. Login to your Joomla Administartor panel.
  2. Go to Global Configuration
  3. Click no the "Server" tab
  4. Change the path to the "Absolute Path(you've just found)"/tmp
  5. Insert this line of code in your .htaccess file: php_value open_basedir NULL

    this solution has been worked very well for me,and it's doesn't need any Joomla's core file hacking.

Here is another step by step guide for the second solution:

  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): $obd = ini_get('open_basedir'); Comment out that line with // at the beginning so it becomes://$obd = ini_get('open_basedir');
  12. Save and Close.

I have tested @johanpw's solution and it's working very well too,but sometimes you can't change the Joomla configuration from Joomla Backend,so you must change the configuration.php parameters directly using your control panel or a FTP account.

  • 1
    In your Joomla's root directory, open .htaccess (or htaccess.txt for Windows) and add this line of code: php_value open_basedir NULL – Farahmand Sep 27 '14 at 14:17
  • 1
    Thank you for testing my workaround. I haven't had this issue yet so I couldn't test it myself. Good job! – Farahmand Sep 28 '14 at 16:18
2

Another solution suggested at the Joomla forum is to enable the FTP layer.

The FTP layer can be enabled from System -> Global Configuration -> Server tab -> FTP Settings. Add FTP details (host, username and password) for a user with access to your server.

I'm not able to test it myself because I can't reproduce the error, but apparently by enabling FTP, Joomla is able to overcome certain server limitations.

  • I have tested your solution and it's working.Thanks @johanpw,and 1+. – Hbirjand Oct 7 '14 at 6:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.