Post by adejuwon » Fri Jun 11, 2021 8:09 am

Hello all

Am trying to set up an opencart store but once click next to go to the Configuration from the Pre-Installation screen i get the following error.

Warning: Use of undefined constant DB_DRIVER - assumed 'DB_DRIVER' (this will throw an Error in a future version of PHP) in /var/www/vhosts/domain.com/hm.domain.com/upload/install/controller/startup/database.php on line 19Warning: Use of undefined constant DB_HOSTNAME - assumed 'DB_HOSTNAME' (this will throw an Error in a future version of PHP) in /var/www/vhosts/domain.com/hm.domain.com/upload/install/controller/startup/database.php on line 19Warning: Use of undefined constant DB_USERNAME - assumed 'DB_USERNAME' (this will throw an Error in a future version of PHP) in /var/www/vhosts/domain.com/hm.domain.com/upload/install/controller/startup/database.php on line 19Warning: Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' (this will throw an Error in a future version of PHP) in /var/www/vhosts/domain.com/hm.domain.com/upload/install/controller/startup/database.php on line 19Warning: Use of undefined constant DB_DATABASE - assumed 'DB_DATABASE' (this will throw an Error in a future version of PHP) in /var/www/vhosts/domain.com/hm.domain.com/upload/install/controller/startup/database.php on line 19

Kindly assist

Regards

Newbie

Posts

Joined
Sun Oct 06, 2013 8:20 am

Post by ADD Creative » Fri Jun 11, 2021 4:57 pm

You need to post more information. OpenCart version, PHP version, etc. Make sure your config.php files are completely empty.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by straightlight » Fri Jun 11, 2021 5:07 pm

One or both config.php files might be empty or incomplete.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by adejuwon » Fri Jun 11, 2021 6:30 pm

Hello @straightlight and @ADD Creative thanks for replying

I have PHP 7.3.28 and 7.4.20 on the server and have tried both didn't work.

The two config files are empty I can confirm and am running opencart 3.0.3.7

Newbie

Posts

Joined
Sun Oct 06, 2013 8:20 am

Post by straightlight » Fri Jun 11, 2021 6:35 pm

Are you running the install as a fresh install or as an upgrade?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by adejuwon » Fri Jun 11, 2021 10:26 pm

its a fresh install

Newbie

Posts

Joined
Sun Oct 06, 2013 8:20 am

Post by ADD Creative » Sat Jun 12, 2021 12:04 am

Check your config.php files are zero in length and don't have any white space on BOM.

You will only get to the part that is giving you the error if they are not zero in size.
https://github.com/opencart/opencart/bl ... ase.php#L4

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 107 guests