I end up with below error when I try to install a component,module or plugin.
当我尝试安装一个组件、模块或插件时,我的错误将会降到以下。
JFolder::create: Could not create directory
What could be the issue?
有什么问题?
4 个解决方案
#1
24
Change the below variable to in your configuration file(configuration.php
) as shown.
将下面的变量更改为配置文件(configuration.php),如下所示。
public $log_path = '/logs';
public $tmp_path = '/tmp';
Also make sure that these folder has the folder permission 755.
还要确保这些文件夹具有文件夹权限755。
阅读更多
#2
2
Now I found two solutions for resolving this issue,and both of them has been worked very well:
现在我找到了解决这个问题的两种方法,而且都很有效:
Solution One:
解决方案一:
First find the exact absolute path to your tmp
folder by using this trick:
通过使用这个技巧,首先找到你的tmp文件夹的绝对路径:
Create a PHP file in your website root,for example path.php
在您的网站根中创建一个PHP文件,例如path.php。
Place this snippet of code in the file and hit the save button
将此代码片段放入文件中并点击save按钮。
<?php
$path = getcwd();
echo "Your Absolute Path is: ";
echo $path;
?>
Navigate to yourdomain.com/path.php
in your browser
在浏览器中导航到yourdomain.com/path.php。
From now on:
从现在开始:
- Login to your Joomla Administartor panel.
- 登录到Joomla管理员面板。
- Go to Global Configuration
- 进入全局配置
- Click on the "Server" tab
- 单击“服务器”选项卡。
- Change the path to the
"Absolute Path(you've just found)"/tmp
- 更改路径到“绝对路径(您刚刚找到)”/tmp。
-
Insert this line of code in your .htaccess file:
php_value open_basedir NULL
在.htaccess文件中插入这一行代码:php_value open_basedir NULL。
This solution has been worked very well for me,and it's doesn't deal with any Joomla's core file hacking.
这个解决方案对我来说非常有效,而且它不会处理任何Joomla的核心文件入侵。
Solution Two:
解决方案二:
- Login to your Joomla Administartor panel.
- 登录到Joomla管理员面板。
- Go to Global Configuration
- 进入全局配置
- Click no the "Server" tab
- 单击“服务器”选项卡。
- Change the path from
/public_html/tmp
to justtmp
- 将路径从/public_html/tmp更改为仅tmp。
- Login to control Panel(CPanel),(Or you can use a FTP account for this purpose)
- 登录到控制面板(CPanel),(或者您可以使用FTP帐号)
- Open File Manager (if you are using FTP,this step must be skipped)
- 打开文件管理器(如果您正在使用FTP,则必须跳过此步骤)
- Open Folder "libraries"
- 打开文件夹“库”
- Open Folder "joomla"
- 打开文件夹“逐浪”
- Open Folder "filesystem"
- 打开文件夹“文件系统”
- Right Click on "folder.php" and click Edit.
- 右键单击”文件夹。php”,单击编辑。
- 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');
- 查找该行,(search = obd): $obd = ini_get('open_basedir');在开始时注释掉这一行,所以它变成://$obd = ini_get('open_basedir');
- Save and Close.
- 保存并关闭。
#3
1
You can change the owner of Joomla folders to your apache server user.
您可以将Joomla文件夹的所有者更改为您的apache服务器用户。
You can find the apache server user with the following command:
您可以使用以下命令找到apache服务器用户:
ps aux | grep -v root | grep apache | cut -d\ -f1 | sort | uniq
Source: https://serverfault.com/questions/125865/finding-out-what-user-apache-is-running-as
来源:https://serverfault.com/questions/125865/finding-out-what-user-apache-is-running-as
For Ubuntu, it's www-data
.
对于Ubuntu,www - data。这是
After you know the apache user name, then you can change the owner of all the folders and files of your Joomla installation. You can use the following command to do so:
了解了apache用户名之后,就可以更改Joomla安装的所有文件夹和文件的所有者了。您可以使用以下命令来这样做:
(I suppose that your apache user is www-data
)
(我假设您的apache用户是www-data)
sudo chown -R www-data:www-data /path/to/your/joomla
If you are already inside your Joomla directory, then you can run the following command:
如果您已经在Joomla目录中,那么您可以运行以下命令:
sudo chown -R www-data:www-data .
#4
0
After a lot of trouble with this error, I got a break through. In the configuration.php file, edit the var logpath n tmppath values as below var $log_path = '/home/public_html/sitename/logs'; var $tmp_path = '/home/public_html/sitename/tmp';
在这个错误中有很多麻烦之后,我得到了一个突破。在配置。php文件,编辑var logpath n tmppath值,如下var $log_path = '/home/public_html/sitename/logs';var $ tmp_path =“/ home / public_html / sitename / tmp”;
This definately will work. And works for me.
这绝对会工作。对我来说和工作。
#1
24
Change the below variable to in your configuration file(configuration.php
) as shown.
将下面的变量更改为配置文件(configuration.php),如下所示。
public $log_path = '/logs';
public $tmp_path = '/tmp';
Also make sure that these folder has the folder permission 755.
还要确保这些文件夹具有文件夹权限755。
阅读更多
#2
2
Now I found two solutions for resolving this issue,and both of them has been worked very well:
现在我找到了解决这个问题的两种方法,而且都很有效:
Solution One:
解决方案一:
First find the exact absolute path to your tmp
folder by using this trick:
通过使用这个技巧,首先找到你的tmp文件夹的绝对路径:
Create a PHP file in your website root,for example path.php
在您的网站根中创建一个PHP文件,例如path.php。
Place this snippet of code in the file and hit the save button
将此代码片段放入文件中并点击save按钮。
<?php
$path = getcwd();
echo "Your Absolute Path is: ";
echo $path;
?>
Navigate to yourdomain.com/path.php
in your browser
在浏览器中导航到yourdomain.com/path.php。
From now on:
从现在开始:
- Login to your Joomla Administartor panel.
- 登录到Joomla管理员面板。
- Go to Global Configuration
- 进入全局配置
- Click on the "Server" tab
- 单击“服务器”选项卡。
- Change the path to the
"Absolute Path(you've just found)"/tmp
- 更改路径到“绝对路径(您刚刚找到)”/tmp。
-
Insert this line of code in your .htaccess file:
php_value open_basedir NULL
在.htaccess文件中插入这一行代码:php_value open_basedir NULL。
This solution has been worked very well for me,and it's doesn't deal with any Joomla's core file hacking.
这个解决方案对我来说非常有效,而且它不会处理任何Joomla的核心文件入侵。
Solution Two:
解决方案二:
- Login to your Joomla Administartor panel.
- 登录到Joomla管理员面板。
- Go to Global Configuration
- 进入全局配置
- Click no the "Server" tab
- 单击“服务器”选项卡。
- Change the path from
/public_html/tmp
to justtmp
- 将路径从/public_html/tmp更改为仅tmp。
- Login to control Panel(CPanel),(Or you can use a FTP account for this purpose)
- 登录到控制面板(CPanel),(或者您可以使用FTP帐号)
- Open File Manager (if you are using FTP,this step must be skipped)
- 打开文件管理器(如果您正在使用FTP,则必须跳过此步骤)
- Open Folder "libraries"
- 打开文件夹“库”
- Open Folder "joomla"
- 打开文件夹“逐浪”
- Open Folder "filesystem"
- 打开文件夹“文件系统”
- Right Click on "folder.php" and click Edit.
- 右键单击”文件夹。php”,单击编辑。
- 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');
- 查找该行,(search = obd): $obd = ini_get('open_basedir');在开始时注释掉这一行,所以它变成://$obd = ini_get('open_basedir');
- Save and Close.
- 保存并关闭。
#3
1
You can change the owner of Joomla folders to your apache server user.
您可以将Joomla文件夹的所有者更改为您的apache服务器用户。
You can find the apache server user with the following command:
您可以使用以下命令找到apache服务器用户:
ps aux | grep -v root | grep apache | cut -d\ -f1 | sort | uniq
Source: https://serverfault.com/questions/125865/finding-out-what-user-apache-is-running-as
来源:https://serverfault.com/questions/125865/finding-out-what-user-apache-is-running-as
For Ubuntu, it's www-data
.
对于Ubuntu,www - data。这是
After you know the apache user name, then you can change the owner of all the folders and files of your Joomla installation. You can use the following command to do so:
了解了apache用户名之后,就可以更改Joomla安装的所有文件夹和文件的所有者了。您可以使用以下命令来这样做:
(I suppose that your apache user is www-data
)
(我假设您的apache用户是www-data)
sudo chown -R www-data:www-data /path/to/your/joomla
If you are already inside your Joomla directory, then you can run the following command:
如果您已经在Joomla目录中,那么您可以运行以下命令:
sudo chown -R www-data:www-data .
#4
0
After a lot of trouble with this error, I got a break through. In the configuration.php file, edit the var logpath n tmppath values as below var $log_path = '/home/public_html/sitename/logs'; var $tmp_path = '/home/public_html/sitename/tmp';
在这个错误中有很多麻烦之后,我得到了一个突破。在配置。php文件,编辑var logpath n tmppath值,如下var $log_path = '/home/public_html/sitename/logs';var $ tmp_path =“/ home / public_html / sitename / tmp”;
This definately will work. And works for me.
这绝对会工作。对我来说和工作。