Page 2 of 3

Re: Can not start the site after installation Aimeos.

Posted: 19 Jan 2018, 11:33
by aimeos
I think you only have to clear the composer cache

Re: Can not start the site after installation Aimeos.

Posted: 23 Jan 2018, 07:30
by netman2002
1. I completely reinstall composer (with clearing cache)
2. Perfom a new instalation of this package: https://github.com/aimeos/aimeos (Laravel + Aimeos + demo)
(Install log in attachment)

All the same error appears... :(

Re: Can not start the site after installation Aimeos.

Posted: 23 Jan 2018, 15:26
by aimeos
Can you please try that file (rename to "en")? If it also doesn't work, there must be something wrong with your Gettext installation

Re: Can not start the site after installation Aimeos.

Posted: 24 Jan 2018, 12:43
by netman2002
I changed the file, but also does not work

Re: Can not start the site after installation Aimeos.

Posted: 24 Jan 2018, 21:53
by aimeos
OK, now I would say that your Gettext installation is broken or somehow not working. Did you already try on another machine?

Re: Can not start the site after installation Aimeos.

Posted: 25 Jan 2018, 06:06
by netman2002
Yes, I guess that something wrong with environment sitting.
One more error ocured when I try to open this path http://test.inf-tec.ru/admin
The login page is successfuly opened if user not logged in. After login proccess the error arrised:

ErrorException thrown with message "file_exists(): open_basedir restriction in effect. File(/usr/share/php/super.php) is not within the allowed path(s): (/home/SHERLAND_AC/web/test.inf-tec.ru/public_html:/home/SHERLAND_AC/tmp:/home/SHERLAND_AC/web/test.inf-tec.ru/laravel/v54:/home/SHERLAND_AC/web/test.inf-tec.ru/laravel/v55:/home/SHERLAND_AC/web/test.inf-tec.ru/laravel/shop:/home/SHERLAND_AC/web/test.inf-tec.ru/laravel/aimeos)"

Stacktrace:
#64 ErrorException in /home/SHERLAND_AC/web/test.inf-tec.ru/laravel/aimeos/vendor/aimeos/aimeos-core/Bootstrap.php:80
#63 file_exists in /home/SHERLAND_AC/web/test.inf-tec.ru/laravel/aimeos/vendor/aimeos/aimeos-core/Bootstrap.php:80
#62 Aimeos\Bootstrap:autoload in [internal]:0
#61 spl_autoload_call in [internal]:0
#60 is_callable in /home/SHERLAND_AC/web/test.inf-tec.ru/laravel/aimeos/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/View/Helper/Access/Standard.php:46
#59 Aimeos\MW\View\Helper\Access\Standard:transform in /home/SHERLAND_AC/web/test.inf-tec.ru/laravel/aimeos/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/View/Standard.php:88
#58 call_user_func_array in /home/SHERLAND_AC/web/test.inf-tec.ru/laravel/aimeos/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/View/Standard.php:88
#57 Aimeos\MW\View\Standard:__call in /home/SHERLAND_AC/web/test.inf-tec.ru/laravel/aimeos/ext/ai-admin-jqadm/admin/jqadm/src/Admin/JQAdm/Common/Decorator/Page.php:48
#56 Aimeos\Admin\JQAdm\Common\Decorator\Page:setView in /home/SHERLAND_AC/web/test.inf-tec.ru/laravel/aimeos/ext/ai-admin-jqadm/admin/jqadm/src/Admin/JQAdm/Factory.php:71
... and so on

Why the system try to open file /usr/share/php/super.php? I do not understand.

ENVIRONMEN...

The public folder of site in Ubuntu system is: /home/SHERLAND_AC/web/test.inf-tec.ru/public_html/
The Laravel core (and Aimeos) folder is: /home/SHERLAND_AC/web/test.inf-tec.ru/laravel/aimeos/
The index.php in public folder contain the next lines:

...
require __DIR__.'/../laravel/aimeos/vendor/autoload.php';
...
$app = require_once __DIR__.'/../laravel/aimeos/bootstrap/app.php';
...

The Apache .conf file contain the following directives for this virtual host:

<Directory /home/SHERLAND_AC/web/test.inf-tec.ru/public_html>
...
php_admin_value open_basedir /home/SHERLAND_AC/web/test.inf-tec.ru/public_html:/home/SHERLAND_AC/web/test.inf-tec.ru/laravel/aimeos
...
</Directory>
(Without this directive the Laravel not work)

May be I done somthing wrong?
Can you give me the refrence to 'best practice' of how to correctly install Laravel on Ubuntu and configure the Apache (and PHP) settings to succesfuly and secure start the Laraver?

Re: Can not start the site after installation Aimeos.

Posted: 25 Jan 2018, 13:21
by aimeos
OK, now we are getting closer! open_basedir is known to be very problematic, not only for Aimeos. You should disable it for your vhost completely

Re: Can not start the site after installation Aimeos.

Posted: 25 Jan 2018, 13:26
by netman2002
Can you to trace the ./ext/ai-gettext/lib/custom/src/MW/Translation/File/Mo.php file in your environment?

This file contain definition of the class 'Mo' and have the method:

protected function extract()
{
$magic = $this->readInt( 'V' );

if( ( $magic === self::MAGIC1 ) || ( $magic === self::MAGIC3 ) ) { //to make sure it works for 64-bit platforms
$byteOrder = 'V'; //low endian
} elseif( $magic === ( self::MAGIC2 & 0xFFFFFFFF ) ) {
$byteOrder = 'N'; //big endian
} else {
throw new \Aimeos\MW\Translation\Exception( 'Invalid MO file' );
}

$this->readInt( $byteOrder );
$total = $this->readInt( $byteOrder ); //total string count
$originals = $this->readInt( $byteOrder ); //offset of original table
$trans = $this->readInt( $byteOrder ); //offset of translation table

$this->seekto( $originals );
$originalTable = $this->readIntArray( $byteOrder, $total * 2 );
$this->seekto( $trans );
$translationTable = $this->readIntArray( $byteOrder, $total * 2 );

return $this->extractTable( $originalTable, $translationTable, $total );
}

Can you trace with 'dd()' the first five call to readInt() in this method for 'en' file?

My results is:
1: 2500072158
2: 318767104
3: 469762048
4: 3019898880
5: 486539264

I want to compare results.
(The 'en' files in my and your side are equels)

Re: Can not start the site after installation Aimeos.

Posted: 25 Jan 2018, 13:32
by aimeos
Can you please disable open_basedir first completely?

Re: Can not start the site after installation Aimeos.

Posted: 25 Jan 2018, 13:37
by netman2002
Ok, I'm to try...
But how the php is to access the laravel core files outer of site root dir?