AbanteCart Community

eCommerce construction => Installation and Configuration => Topic started by: onyxnz on March 12, 2017, 03:41:24 PM

Title: DB_DRIVER
Post by: onyxnz on March 12, 2017, 03:41:24 PM
I am having trouble installing latest version on localhost, where I do all my dev work;
LinuxMint18.1 with Nginx and PHP7-FPM with MariaDB.
I get to /install/index.php?rt=install&runlevel=1 after submitting the config form, and it starts the progress scroller, then this:

Following error has occurred during installation:
OK:
Name   Info
10000::database error
Error: Could not load database file DB_DRIVER! in /home/onyx/htdocs/abante/public_html/core/lib/db.php on line 46


Config.php is writeable.
I have tried by Mysqli and PDO options for database, but it is still just using the POST field name DB_DRIVER to search for the database driver...wot the?
Title: Re: DB_DRIVER
Post by: abolabo on March 13, 2017, 03:41:23 AM
did you tried cli install? i mean file https://github.com/abantecart/abantecart-src/blob/master/public_html/install/cli_install.php
see comments for run command
Title: Re: DB_DRIVER
Post by: onyxnz on March 13, 2017, 05:42:38 AM
Yes I did, and noticed that the comment documentation in the header of that file is very wrong, too.

php cli_install.php install --db_host localhost --db_user onyx --db_password mariadb --db_name abantecart --db_prefix hk1_ --admin_path onyx_hkadmin --db_driver mysqli --db_port 3306 --username onyx --password mypassword --email myemail @ gmail.com

had to remove --http_server directive for this post due to defeat inability to post external links! and added spaces to email address
results in:
FAILED! Pre-installation check failed: Invalid E-Mail!
   Error: Could not load database file 1!

Title: Re: DB_DRIVER
Post by: onyxnz on March 13, 2017, 05:52:11 AM
is there a sample config.php file somewhere ?
I want to try with that written manually
Title: Re: DB_DRIVER
Post by: abolabo on March 13, 2017, 06:02:53 AM
you have error in command.
should to set
--db_driver=amysqli
Title: Re: DB_DRIVER
Post by: onyxnz on March 13, 2017, 03:05:12 PM
Tried that with same results -
FAILED! Pre-installation check failed: Invalid E-Mail!
   Error: Could not load database file 1!
Title: Re: DB_DRIVER
Post by: abolabo on March 14, 2017, 05:43:35 AM
see working example at line 34

https://github.com/abantecart/abantecart-src/blob/1.2.10/.travis.yml#L34
Title: Re: DB_DRIVER [solved]
Post by: onyxnz on March 14, 2017, 08:05:51 AM
AHA!

So the '=' are required, which is totally different from the documentation inside cli_install.php which says:

* Command line tool for installing AbanteCart
*
* Usage:
* cd install
*
*    php cli_install.php install
*                               --db_hostname localhost
*                                --db_username root
*                                --db_password pass
*                                --db_database abantecart
*                                --db_driver mysqli
*                                --db_port 3306
*                                --username admin
*                                --password admin


So now I have managed to install, thanks.
Title: Re: DB_DRIVER
Post by: abolabo on March 14, 2017, 12:52:00 PM
oh.. i thought you had tried to run script with --help or without any arguments to view syntax:)
Anyway comment is already corrected