Php localhost/magento2/设置页面错误
当我想转到那个url时 我明白了 我加了这个Php localhost/magento2/设置页面错误,php,mysql,magento,Php,Mysql,Magento,当我想转到那个url时 我明白了 我加了这个 <Directory /var/www/html/magento2> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> 这是diirectory sudo ls /var/www/html/magento2/ app COPYING.txt LICENSE_A
<Directory /var/www/html/magento2>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
这是diirectory
sudo ls /var/www/html/magento2/
app COPYING.txt LICENSE_AFL.txt pub
bin dev LICENSE.txt setup
CHANGELOG.md Gruntfile.js.sample nginx.conf.sample update
composer.json index.php package.json.sample var
composer.lock ISSUE_TEMPLATE.md php.ini.sample vendor
CONTRIBUTING.md lib phpserver
我试了很多东西
这是php
php -v
PHP 7.0.10-2+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.10-2+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
这是mysql
root@vegan:/var/www/html/magento2# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 465
Server version: 5.7.13-0ubuntu0.16.04.2 (Ubuntu)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
这是apache2
root@vegan:/var/www/html/magento2# apache2 -v
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2016-07-14T12:32:26
root@vegan:/var/www/html/magento2#
这些似乎没有错误
当我去
http://localhost/magento2/setup
我犯了个错误
我改成
<Directory /var/www/html/magento2>
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
但现在我只得到带有php代码的pag,尽管localhost显示了真实页面:
为了
请向文件夹添加权限,然后尝试执行此操作?chmod-ru+wsudo chmod-Rf 777
也会显示出来:/这是关于php的,请向文件夹添加权限,然后尝试这样做?chmod-ru+wsudochmod-rf777
也显示出来:/这是关于php的
http://localhost/magento2/setup
<Directory /var/www/html/magento2>
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
Make files and directories writable:
To make files and directories writable so you can update components and upgrade the Magento software:
Log in to your Magento server.
Change to your Magento installation directory.
Enter the following commands:
chmod -R u+w .
<?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
if (PHP_SAPI == 'cli') {
echo "You cannot run this from the command line." . PHP_EOL .
"Run \"php bin/magento\" instead." . PHP_EOL;
exit(1);
}
try {
require __DIR__ . '/../app/bootstrap.php';
} catch (\Exception $e) {
echo <<<HTML
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
<div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;">
<h3 style="margin:0;font-size:1.7em;font-weight:normal;text-transform:none;text-align:left;color:#2f2f2f;">
Autoload error</h3>
</div>
<p>{$e->getMessage()}</p>
</div>
HTML;
exit(1);
}
// For Setup Wizard we are using our customized error handler
$handler = new \Magento\Framework\App\ErrorHandler();
set_error_handler([$handler, 'handler']);
\Zend\Mvc\Application::init(require __DIR__ . '/config/application.config.php')->run();