Sunday, January 27, 2013

Solve "JFolder::create: coud not create directory" problem


I will show you how to solve the problems "JFolder::create: Could not create directory" or "JFolder::create: Path not in open_basedir paths; Unable to create destination" in Joomla 1.5

 If you have tried everything else on your installation (changing the $log_path to ./log, change $tmp_path to ./tmp, chmod folders to 777) and you still can't install any module or component in Joomla, then continue reading.

 This solution is helpfull if you can't change the ownership of the files and directories on your server (usually shared hosts) and you don't want to wait for help from your hosting provider.

All Steps :
change chmod to 777 for this folders :
  • /administrator/backups/
  • /administrator/components/
  • /administrator/language/
  • /administrator/language/en-GB/
  • /administrator/modules/
  • /administrator/templates/
  • /components/
  • /language/
  • /language/en-GB/
  • /modules/
  • /plugins/
  • /plugins/content/
  • /plugins/editors/
  • /plugins/editors-xtd/
  • /plugins/search/
  • /plugins/system/
  • /plugins/user/
  • /plugins/xmlrpc/
  • /tmp/
  • /templates/
  • /cache/

1. Open "your-website.com/libraries/joomla/filesystem" with your default FTP client.
Please make backup of the file first.
2. Download filename "folder.php".
3. Open folder.php in your default text editor
4. Go to line 210
5. Look for: " if (strpos($path, $test) === 0) { " and change it to "if (strpos($path, $test) === 1) { "
6. Than look for (line 216): " if ($inBaseDir == false) { " and change to " if ($inBaseDir == true) { "
7. Save your file (folder.php)
8. Upload it to the location "your-website.com/libraries/joomla/filesystem".

Disqus Comments