Magento with Ubuntu 16.04 + Nginx+Mariadb+php7. Does not load the page

Asked

Viewed 153 times

1

I have the following environment:

Ubuntu16.04 + Nginx + Mariadb + Php7. I downloaded Magento through Composer:

composer create-project magento/community-edition magento2 -s dev --prefer-dist

Then I created a database on the Mariadb server.

Normally the next step would be to open the folder and pass user and password of the newly created database.

I type the URL cb100.com and I’m redirected to cb100.com/setup/.

The answer I have is a blank page. The favicon of the tab is Brazilian. That is, something is working.

When I see the Nginx log that’s what I have:

could not find named location "@handler", client: 127.0.0.1, server:
cb100.com, request: "POST /setup/index.php/session/prolong HTTP/1.1",
host: "cb100.com", referrer: "http://cb100.com/setup/"

I don’t have any more leads

The only change I made was in the project folders permission. I passed them all to the group www-data. Group under which the Nginx runs.

chown -R ila:www-data cb100.com;

Is there any configuration missing in Nginx?

UPDATE

I’ll post Magento’s code mysite.com/index.php and mysite.com/setup/index.php

cb100.com/index.php

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);
}

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication('Magento\Framework\App\Http');
$bootstrap->run($app);

cb100.com/setup/index.php

<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
echo "here";
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();
  • Which user and group are configured in nginx.conf? And if the group is www-data, the folder files have enough permission? Did you install PHP and the required modules? Take a look in this tutorial. PS: I realized you did cross-posting of the problem on various websites of the network, I usually include a link to each of them in the question to facilitate the life of other users.

  • Yes, I posted in English on the Askubuntu and on the Magento exchange. I wondered if it was something specific to the People or Ubuntu. Yes my environment has all the requirements of php. I installed in hand each one of them. This same environment runs other sites, including with Windows. I couldn’t understand the Nginx log error, for this project with Magento.

  • 1

    Post the error and other relevant information (version of everything, etc). I never got to install Magento in this version of Ubuntu. But I have an environment running on Ubuntu 14.04 with PHP-FPM, the installation was very quiet.

  • I updated the question

1 answer

0

The White page is in firefox?

  1. To resolve this error go to: /var/www/html/Magento/app/code/core/Mage/Core/Model/
  2. typhoon vim Layout.php
  3. go to line 555 and edit the code $out .= $this->getBlock($callback[0])->{$callback[1]}(); leave it so. Note that you only changed two keys one after the last pointer and closed after the last coach.
  4. Case of database error inside the folder: go to var/www/html/Magento/code/core/Mago/Install/Model/Installer/ and edit the db.php code on line 101 with the message: Mage::throwException(Mage::helper('install')->__($e->getMessage()));
  • Hi @Douglas, I’ll try this approach of yours. But it’s not only firefox. I tried it on Chrome tbm. I don’t think it’s anything connected to browser. I think it has to do with the installation via Poser. Something is missing that has been downloaded but not installed.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.