Home Forums Support Trouble Getting started intalled on Ubuntu 18.04 "Whoops"

This topic contains 14 replies, has 2 voices, and was last updated by  froglevelmc 8 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #17894

    froglevelmc
    Participant

    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.

    Thanks,
    Chris

    #17909

    Titanfail
    Participant

    Check /ninja/storage/logs/laravel-error.log. If you get the “Whoops, looks like something went wrong.” there’s usually a entry in there.

    #17995

    froglevelmc
    Participant

    The logs folder is empty.

    #17996

    Titanfail
    Participant

    Could be a permission issue. What do you get when you run stat -c "%U:%G" /var/www/html/invoiceninja/storage/?

    #17997

    froglevelmc
    Participant

    root:root

    #17998

    Titanfail
    Participant

    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.

    #17999

    froglevelmc
    Participant

    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*** [1698] : /var/www/html/invoiceninja/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOCo$

    #18000

    Titanfail
    Participant

    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 -m and 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.

    #18001

    froglevelmc
    Participant

    It is there. Should I try reinstalling it anyway?

    #18002

    Titanfail
    Participant

    If it’s there, then that won’t be the problem. Run php -m again and also look for dom, exif, gd, gmp, mbstring, mysql, SimpleXML, wddx, xml, xmlreader, xmlwriter, xsl, and zip.

    #18003

    froglevelmc
    Participant

    [email protected]:~$ php -m
    [PHP Modules]
    calendar
    Core
    ctype
    curl
    date
    dom
    exif
    fileinfo
    filter
    ftp
    gd
    gettext
    gmp
    hash
    iconv
    intl
    json
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    Phar
    posix
    readline
    Reflection
    session
    shmop
    SimpleXML
    sockets
    sodium
    SPL
    standard
    sysvmsg
    sysvsem
    sysvshm
    tokenizer
    wddx
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib

    [Zend Modules]
    Zend OPcache

    #18004

    froglevelmc
    Participant

    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.

    #18005

    froglevelmc
    Participant

    looked up the service… it was actually php7.2-fpm. So that’s not anything.

    #18006

    Titanfail
    Participant

    That was just making sure nginx and the php service got restarted. In a pinch, a complete reboot would have done the same thing.

    #18034

    froglevelmc
    Participant

    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.

    Thanks again!

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.

Posted in: