Error Installing

I am trying to install Invoice Ninja 4.5.2

I have the following:

Ubuntu 14.06
Apache 2
PHP 7.2 (CoExist with 5.6)
MariaDB 10.0

When i try to go through the initial setup ( i copied the zip file moved it to /var/www/html/ninja changed the permissions and ownership as per the guide

When i go through the initial setup for the InvoiceNinja i get the following error

[2018-08-12 03:27:51] production.ERROR: Doctrine\DBAL\Driver\PDOException [0] : /var/www/html/ninja/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php [Line 47] => could not find driver {“context”:“PHP”,“user_id”:0,“account_id”:0,“user_name”:"",“method”:“POST”

it looks like you php-mysql extension in not installed or loaded.

I have the following when i do php -m
mysql
mysqli
mysqlnd

also i have couple of other apps on the apache server that uses the php mysql and they are working. I do the following commands though to switch between the 2 php versions

  sudo a2dismod php5.6 ; sudo a2enmod php7.2 ; sudo service apache2 restart

is your php -v reporting php5.6 or php 7.2?

PHP V7.2

“PHP 7.2.8-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jul 25 2018 10:51:50) ( NTS )”

When you are in the setup screen, and click Test Connection, do you get a success notification?

When i click test connection, it doesn’t do anything.

This, and the error you have noted previous indicates that php is unable to connect the the database.

Ok, finally figured this out, the PHP-MySQL was version 5.6, so i have updated this to 7.2 and i was able to pass the configuration page, and get redirected the login page.

I was able to login but i am getting another error after login

“production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError [0] : /var/www/html/ninja/app/Libraries/CurlUtils.php [Line 21] => Call to undefined function App\Libraries\curl_init()”

php-curl installed?

just installed it, and i am able to login but the display is very strange

How the look of the app after logins

Image URL if not displaying

https://ibb.co/nNG7az

check out browser console for errors, from the looks of it, it is not loading any of the javascript and/or css resources.

I can see the following errors:

Loading failed for the <script> with source “https://servername/ninja/server.php/built.js?no_cache=4.5.2”.

So just to make it a bit clear as well, i have a couple of other PHP applications installed in the same server, so i usually access the applications by browsing my server/appfolder

so i didn’t configure the documentroot in /etc/apache2/sites-available/000-default.conf to public folder under ninja folder.

Also, i appreciate all the help i am not a developer, so sorry if my questions is a bit basic

right,

I think you need to configure a proper virtual host so that everything resolves correct.

You also need to ensure mod_rewrite is enabled otherwise you will continue to struggle to get this working.

i will try to figure this out, however i am getting also lots of this errors :

anonymous>
https://servername/ninja/server.php/invoices:943:13
[Show/hide message details.] ReferenceError: $ is not defined[Learn More] invoices:1043:2
<anonymous>
https://servername/ninja/server.php/invoices:1043:2

Is there a way to get away from this errors, till i figure out how to configure the virtual hosts ??

Also i have noticed,

When i try to access the servername/ninja/public it auto redirect me to servername/ninja/public/login and gives me 404 Not found error

do i miss anything in this folder ??

It is working perfectly if i browse to:
ninja/public/index.php/dashboard

Do you know a way to redirect my site /ninja (main folder) to the /ninja/public/index.php ??

Sorry if this out of the application support scope

Everything is working now with no issues in my setup, but i just need a confirmation that this is the correct url iam using to access the application:

ninja/public/index.php

I see it has been over a week and I hope you have come right, but for those going forward:

You should be able to access the application without /ninja/public/index.php by updating your DocumentRoot directive to be an absolute path to the applications public folder, for example:
DocumentRoot "/var/www/ninja/public"

For those on shared hosting, you can make use of the .htaccess in the root of the project. See here for more info: https://coderwall.com/p/erbaig/laravel-s-htaccess-to-remove-public-from-url