如何在PHP中为Joomla设置open_basedir [英] How to setup open_basedir in PHP for Joomla

查看:133
本文介绍了如何在PHP中为Joomla设置open_basedir的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在服务器上的php.ini文件中设置open_basedir,但是我不确定如何.

I am trying to setup open_basedir on the php.ini file on the server however I'm not really sure how.

我是否在服务器上的某个位置创建目录?

Do I create a directory somewhere on the server?

推荐答案

您可以在Joomla中检查当前状态!管理员,在站点"-系统信息"-"PHP信息"下(示例来自2.5)

You can check the current status in Joomla! Administrator, under Site - System Information - PHP Information (example from 2.5)

找到您的php.ini文件(在"PHP信息"页面中搜索php.ini,该文件应该在已加载的配置文件"下),进行备份,然后添加以下行(已适应您当前的需求;请不要忘记在open_basedir之前删除注释符号;)

Find your php.ini file (search for php.ini in the PHP Information page, it should be under Loaded Configuration File), make a backup and then add the following line (adapted to your current needs; don't forget to remove the comment sign ; before open_basedir):

open_basedir = /home/users/you/public_html

重新启动您的Web服务器(可能是Apache).

现在在Joomla!您应该看到open_basedir的值.

Now in Joomla! you should see the a value for open_basedir.

确保您测试了Joomla!通过尝试一些基本任务来进行安装,包括更新扩展或安装新扩展.

Make sure you test your Joomla! installation by trying some basic tasks, including updating an extension or installing a new one.

更多文档可在此处找到:

Joomla!文档-考虑使用PHP open_basedir

php.net文档-open_basedir

这篇关于如何在PHP中为Joomla设置open_basedir的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆