December 28, 2018 at 5:43 pm #17894
I just got all new equipment… server, firewall, etc. I had invoice ninja installed on a Ubuntu 16.04 LTS box and working fine for a long time. I just upgraded all my equipment and did a fresh install of InvoiceNinja using the setup instructions from https://websiteforstudents.com/install-invoice-ninja-on-ubuntu-16-04-18-04-lts-with-nginx-mariadb-and-php-7-2-fpm/
Now when I try to hit the site I get “Whoops, looks like something went wrong.” with a little ghost that says “Exception!”
NOT a lot to go on? Anyone have any ideas? My Linux skills are on the lower side of mediocre so be easy on me.
ChrisDecember 29, 2018 at 3:30 am #17909
/ninja/storage/logs/laravel-error.log. If you get the “Whoops, looks like something went wrong.” there’s usually a entry in there.December 31, 2018 at 2:28 am #17995
The logs folder is empty.December 31, 2018 at 3:49 am #17996
Could be a permission issue. What do you get when you run
stat -c "%U:%G" /var/www/html/invoiceninja/storage/?December 31, 2018 at 5:31 am #17997
root:rootDecember 31, 2018 at 6:38 am #17998
That’s probably why, then. The webserver has no permissions to write to the directories beacuse the root user is the owner, so the webserver can’t really do anything.
chown -R www-data:www-data /var/www/html/invoiceninja/will assign ownership of the entire
invoiceninja/directory (and anything inside that) both the www-data user, and the www-data group (your nginx server).
After that, just to be sure the correct read/write/execute permissions are set, do
sudo chmod -R 775 /var/www/html/invoiceninja/, and that will assign read, write, and execute permissions to the www-data user and group, and read+execute to the rest of the system.December 31, 2018 at 7:19 am #17999
Yeah I ran those commands during installation.
I ran them again as su now the stat command returns www-data:www-data
instead of root:root but still no luck. I’ll the logs are working now.
[2018-12-31 05:37:38] production.ERROR: ***Doctrine\DBAL\Driver\PDOException***  : /var/www/html/invoiceninja/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOCo$December 31, 2018 at 7:44 am #18000
Well, that gets us closer to a solution. It looks like PHP might be missing a module needed to connect to the database. Try
php -mand see if “pdo_mysql” is listed. If not, you can install it with
sudo apt install php-mysql(don’t worry, MariaDB is a drop-in replacement for MySQL, so the module should still work). Then restart the webserver with
sudo service nginx restart, and for good measure,
sudo service php-fpm restart.December 31, 2018 at 7:53 am #18001
It is there. Should I try reinstalling it anyway?December 31, 2018 at 8:05 am #18002
If it’s there, then that won’t be the problem. Run
php -magain and also look for dom, exif, gd, gmp, mbstring, mysql, SimpleXML, wddx, xml, xmlreader, xmlwriter, xsl, and zip.December 31, 2018 at 8:07 am #18003
[email protected]:~$ php -m
Zend OPcacheDecember 31, 2018 at 8:14 am #18004
I tried restarting the service php-fpm and got the following
[email protected]:~$ sudo service php-fpm restart
Failed to restart php-fpm.service: Unit php-fpm.service not found.December 31, 2018 at 8:19 am #18005
looked up the service… it was actually php7.2-fpm. So that’s not anything.December 31, 2018 at 8:29 am #18006
That was just making sure nginx and the php service got restarted. In a pinch, a complete reboot would have done the same thing.January 1, 2019 at 3:20 pm #18034
Thanks for all your help. I ended up deleting and creating a new database file and it started working. Not sure what happened. But it’s up and working perfectly.
You must be logged in to reply to this topic.