[06] Error: during database connection.

scienceline

New member
Hi,

i have been trying to install DaDaBIK for sometime now....and faced a lot of issues resolving one after another as i am not expert on Linux, Apache and PHP. we really need your expertise to complete the installation. below is the details of the environment.

DaDaBIK version 7.1 pro,
browser IE,Chrome,Mozilla,
operating system: Debian 3.16.7
DBMS: Mysql 5.5.46
Web server: Apache 2.2.22.
PHP: 5.4.45

at this stage i am getting [06] Error: during database connection. when accessing the URL for install.php

and on the error.log file on the server i see [error] [client 85.159.201.53] PHP Fatal error: Call to a member function query() on
a non-object in /var/www/TEST_backend/include/db_functions_pdo.php on line 112

kindly provide with the step by step instructions on how to resolve this the details in the config.php file is correct as i can access the database with the root user when using mysql -u root -p command same user is entered in the config.php file with the correct password.

looking forward for your prompt response.

Thanks & Regards,
Bridget
 

eugenio

Administrator
Staff member
Hello,
is the IP you use as $host correct? If it's 127.0.0.1, have you tried with "localhost" as well, as suggested in the config file?

Is PDO correctly installed in your PHP environment?
 

scienceline

New member
Dear Eugenio,

Thank you for your prompt response, i installed php5-mysql and it started working.

However, once i use the install.php URL to install DaDaBIK after installation it gives me two URL's:

1. view the database application
2. admin page

This server is a VM on google cloud and i use http://External_IP/TEST_backend/install.php

when i hover the mouse over the two URL's mentioned above it shows the URL as:

1. http://External_IP/TEST_backend/install.php
2. http://External_IP/TEST_backend/admin.php

but when i click the Hyperlink it opens the below URL:

http://localhost/TEST_backend/login.php?function=show_login_form

if i change the // DBMS server host $host = 'localhost'; and $site_url = 'http://localhost/TEST_backend' in config.php file to the External IP address i receive the same [06] Error: during database connection.

kindly advice on how the URL should take IP address automatically instead of localhost.

Thanks & Regards,
Bridget
 

eugenio

Administrator
Staff member
$site_url must be set to the real site URL, so if the URL is http://External_IP/TEST_backend/ you need to use http://External_IP/TEST_backend/.

The Error: during database connection doesn't have anything to do with $site_url, it's related to the database connection, I re-asked my previous questions

1) If the address of the database host is 'localhost', have you tried both 'localhost' and '127.0.0.1'? Which host have you used when you tried to connect to mysql via terminal?

2) Is PDO correctly installed in your PHP environment?
 

scienceline

New member
Dear Eugenio,

I am using localhost as as database host and site url. I have changed the site url to external_ip instead of localhost and looks like it works now.

Many Thanks for your support. Will get back to you in case any queries.

Best Regards,

Bridget
 
Top