ibn
December 28, 2017, 12:14am
1
Dear InvoiceNinja Team,
I’ve run an update via the most recent git repo code (branch origin/master), followed by the composer update/install:
i) PHP 7.0.26 up and running, apache2, mysql db
ii) no errors during the composer update
iii) have updated the key: php artisan ninja:update-key --legacy=true
iv) also cleared the cache a couple of times when loading /public/update
v) no errors in apache2 log
v) also tried to install via shell skript (https://pastebin.com/j657uv9A ) instead of the git code:
The shell update process seems to break at the same stage:
<<< printf ‘Running update migration commands (%s/update)…\n\n’ “$app_url”
wget -q --spider “$app_url/update” >>>
since the final printf is not executed
I would greatly appreciate your advice.
Many thanks!
Ingo
hillel
December 28, 2017, 12:19am
2
Are there details about the error in the web server logs?
Note: you should run ‘composer install’ not ‘composer update’
ibn
December 28, 2017, 1:59am
3
Unfortunately, there are no details about this error in the apache log.
Thanks for pointing out, I’ve run .composer install, though it says nothing to install or update.
I’ve also checked the /public/.htaccess:
RewriteBase /
was commented out already.
If there’s no way to fix this, would you advise to set up a clean, new installation and migrate/restore the existing db?
If yes, are there any best practice hints for this?
Thanks a lot indeed.
Ingo
hillel
December 28, 2017, 2:06am
4
Maybe this will help to see the error details in the logs: https://stackoverflow.com/a/20511956/497368
If you use a clean install you’d want to use mysqldump to transfer the database and make sure to copy over the .env file.
ibn
December 28, 2017, 3:01am
5
The HTTP 500 php error points to:
“NOTICE: PHP message: PHP Fatal error: Uncaught ReflectionException: Class LaravelCrawlerDetect does not exist in /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:749”
[28-Dec-2017 14:54:59] WARNING: [pool MYDOMAIN.de ] child 25054 said into stderr: “Stack trace:”
[28-Dec-2017 14:54:59] WARNING: [pool MYDOMAIN.de ] child 25054 said into stderr: “#0 /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(749): ReflectionClass->__construct(‘LaravelCrawlerD…’)”
[28-Dec-2017 14:54:59] WARNING: [pool MYDOMAIN.de ] child 25054 said into stderr: “#1 /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(644): Illuminate\Container\Container->build(‘LaravelCrawlerD…’, Array)”
[28-Dec-2017 14:54:59] WARNING: [pool MYDOMAIN.de ] child 25054 said into stderr: “#2 /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(709): Illuminate\Container\Container->make(‘LaravelCrawlerD…’, Array)”
[28-Dec-2017 14:54:59] WARNING: [pool MYDOMAIN.de ] child 25054 said into stderr: “#3 /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(1203): Illuminate\Foundation\Application->make(‘LaravelCrawlerD…’)”
[28-Dec-2017 14:54:59] WARNING: [pool MYDOMAIN.de ] child 25054 said into stderr: “#4 /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/vendor/laravel/framework/src/Illuminate/…”
Would you have any advice on this?
Again, thanks a lot!
Ingo
hillel
December 28, 2017, 3:05am
6
Try commenting out the Crawler
references in app/Exceptions/Handler.php
ibn
December 28, 2017, 3:19am
7
Thanks, done that.
The log now shows the error:
[28-Dec-2017 15:07:41] WARNING: [pool MYDOMAIN.de ] child 25126 said into stderr: “Stack trace:”
[28-Dec-2017 15:07:41] WARNING: [pool MYDOMAIN.de ] child 25126 said into stderr: “#0 /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/app/Libraries/Utils.php(410): Illuminate\Support\Facades\Facade::__callStatic(‘get’, Array)”
[28-Dec-2017 15:07:41] WARNING: [pool MYDOMAIN.de ] child 25126 said into stderr: “#1 /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/app/Exceptions/Handler.php(74): App\Libraries\Utils::logError(’***Symfony\Comp…’)”
[28-Dec-2017 15:07:41] WARNING: [pool MYDOMAIN.de ] child 25126 said into stderr: “#2 /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalThrowableError))”
[28-Dec-2017 15:07:41] WARNING: [pool MYDOMAIN.de ] child 25126 said into stderr: “#3 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))”
[28-Dec-2017 15:07:41] WARNING: [pool MYDOMAIN.de ] child 25126 said into stderr: “#4 {main}”
[28-Dec-2017 15:07:41] WARNING: [pool MYDOMAIN.de ] child 25126 said into stderr: " thrown in /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on…"
[28-Dec-2017 15:07:41] WARNING: [pool MYDOMAIN.de ] child 25126 said into stderr: “NOTICE: PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Illuminate\Support\Facades\Session::get() in /var/www/vhosts/MYDOMAIN.de/httpdocs/ninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:237”
hillel
December 28, 2017, 3:24am
8
Try deleting bootstrap/cache/services.php
ibn
December 28, 2017, 3:28am
9
Thanks, have deleted bootstrap/cache/services.php
Unfortunately, the error remains.
Would be grateful for any further hint.
Many thanks.
hillel
December 28, 2017, 3:31am
10
It may be related to permissions, you could try running chmod -R 777 storage
and then chmod -R 755 storage
to see if it helps,
ibn
December 28, 2017, 3:48am
11
Checked the permission settings you mentioned. Doesn’t solve the issue, unfortunately.
What I notice though: the content in /storage/version.txt is: 3.8.1, which was my version before update.
Shouldn’t that be a higher version number for the /public/update to start migration?
Any final try?
Many thanks.
hillel
December 28, 2017, 3:51am
12
Sorry, I’m out of ideas… maybe try with a clean install.
ibn
December 28, 2017, 3:53am
13
Never mind, thanks a lot indeed!
For migrating into a clean install, is there anything else except for the i) db dump and ii).env I would have to backup and move?
hillel
December 28, 2017, 4:27am
14
If you’re using the documents feature you’d also need to move them.
ibn
December 28, 2017, 4:47am
15
Thanks a lot, highly appreciate your support!