管理员登录时出错-Magento 2.1


10

我已经在nginx / PHP-FPM Web服务器上安装了带有PHP 7.0.11的Magento 2.1。当我转到Magento管理员URL并使用我的凭据登录时,收到错误消息-

警告:is_dir():open_basedir限制有效。文件(/ etc / pki / tls / certs)不在允许的路径内

这似乎是Magento 2.1的问题,因为我没有在具有相同服务器设置的Magento 2.0安装中遇到此问题。

为了解决此问题,我添加"/etc/pki/tls/certs"了open_basedir设置。

我的问题是:

  • 这个open_basedir错误确实是问题所在,还是由其他原因引起的?
  • "/etc/pki/tls/certs"在我的open_basedir设置中添加安全隐患吗?添加到open_basedir中似乎很奇怪。

可能为时已晚,但我已经弄清楚了:)
iphigenie

Answers:


11

我只是在此上浪费了一天,最终发现不,证书不是问题。作曲家就是问题所在。

/home/alpinewi/m2.alpinewines.co.uk/magento2/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php(801): Composer\Util\RemoteFilesystem->getSystemCaRootBundlePath()

我最终去研究了Magento 2的错误跟踪器,发现了一些东西!这都是由composer和2.1.2跟踪的composer版本造成的,这是一个alpha

编辑您的composer.json文件

找到线

"composer/composer": "@alpha"

改成

"composer/composer": "1.1.2 as 1.0.0-beta1"

现在运行

composer update

你应该看到

Updating dependencies (including require-dev)
- Installing composer/ca-bundle (1.0.6)
Downloading: 100%
- Removing composer/composer (1.0.0-beta1)
- Installing composer/composer (1.1.2)
Downloading: 100%

我认为ca-bundle可以解决错误。在最新的Alpha版本中完全没有

参见https://github.com/magento/magento2/issues/4359


显然,原始海报已经
为时已

如果您现在要在2017年使用此版本,则可能使用的版本号可能比1.1.2
更高

6

disable-tls:truecomposer.json文件中,如下列:

"config": {
"use-include-path": true 
"disable-tls": true
},

这是因为ssl

来源


这将安装不带TLS的Magento。您将失去运输安全性。这不仅会影响通过作曲家的安装,还会影响Magento应用程序本身。
hakre

0

响应时间很晚,但是可以通过更改服务器设置来解决。在Plesk中,如果转到PHP设置,则只需更改open_basedir为“无”即可。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.