Can not start the site after installation Aimeos.

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: Can not start the site after installation Aimeos.

Post by aimeos » 19 Jan 2018, 11:33

I think you only have to clear the composer cache
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

netman2002
Posts: 15
Joined: 17 Jan 2018, 09:05

Re: Can not start the site after installation Aimeos.

Post by netman2002 » 23 Jan 2018, 07:30

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... :(
Attachments
install.zip
(6.62 KiB) Downloaded 197 times

User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: Can not start the site after installation Aimeos.

Post by aimeos » 23 Jan 2018, 15:26

Can you please try that file (rename to "en")? If it also doesn't work, there must be something wrong with your Gettext installation
Attachments
client-i18n-en.gz
(815 Bytes) Downloaded 198 times
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

netman2002
Posts: 15
Joined: 17 Jan 2018, 09:05

Re: Can not start the site after installation Aimeos.

Post by netman2002 » 24 Jan 2018, 12:43

I changed the file, but also does not work

User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: Can not start the site after installation Aimeos.

Post by aimeos » 24 Jan 2018, 21:53

OK, now I would say that your Gettext installation is broken or somehow not working. Did you already try on another machine?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

netman2002
Posts: 15
Joined: 17 Jan 2018, 09:05

Re: Can not start the site after installation Aimeos.

Post by netman2002 » 25 Jan 2018, 06:06

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?

User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: Can not start the site after installation Aimeos.

Post by aimeos » 25 Jan 2018, 13:21

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

netman2002
Posts: 15
Joined: 17 Jan 2018, 09:05

Re: Can not start the site after installation Aimeos.

Post by netman2002 » 25 Jan 2018, 13:26

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)

User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: Can not start the site after installation Aimeos.

Post by aimeos » 25 Jan 2018, 13:32

Can you please disable open_basedir first completely?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

netman2002
Posts: 15
Joined: 17 Jan 2018, 09:05

Re: Can not start the site after installation Aimeos.

Post by netman2002 » 25 Jan 2018, 13:37

Ok, I'm to try...
But how the php is to access the laravel core files outer of site root dir?

Post Reply