hi guys,
i have struck upon a problem that i think i may have been aluding to when asking questions about hosthames and hosts file configuration.
I am now installing boxbilling onto a server i setup…
virtualmin>virtual server>billing.foo.com.au
box billing takes me through asking for the following
Database hostname:
Database name:
Database user:
Database password:
no i have had no problems completing everything on the above with the exception of “Database hostname”. I thought that it would be “localhost”, however, this doesnt work.
I went into command shell and did the following steps
1. mysql -u myusername -p (and hit enter)
2. enterred my user password (and hit enter)
3. MariaDB [(none)]> SHOW VARIABLES WHERE Variable_name = ‘hostname’; (and hit enter)
±--------------±--------+
| Variable_name | Value |
±--------------±--------+
| hostname | server3 |
±--------------±--------+
1 row in set (0.01 sec)
As you can clearly see, the mariadb hostname is “server3” and not “localhost”. However, when i look in mysql server configuration in virtualmin, the MySQL listening address is 127.0.0.1 (and i saw somewhere else in virtualmin (i forget where) that the server is called localhost)
I am now a little confused as boxbilling setup will not allow me past the database setup page.
Here is the php_error log for box billing installation…
#0 /home/billing/public_html/install/index.php(67): Box_Installer->canConnectToDatabase(‘localhost’, ‘billing’, ‘billing’, ‘mypassword’)
#1 /home/billing/public_html/install/index.php(466): Box_Installer->run(‘check-db’)
#2 {main}
thrown in /home/billing/public_html/install/index.php on line 201
[13-Oct-2017 06:14:12 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/billing/public_html/install/index.php:201
and here is /install/index.php lines 199-208
private function canConnectToDatabase($host, $db, $user, $pass)
{
$link = @mysql_connect($host, $user, $pass);
if ($link) {
$db_selected = @mysql_select_db($db, $link);
if($db_selected) {
mysql_close($link);
return true;
}
mysql_close($link);
Here is a google drive link to install/index.php https://drive.google.com/open?id=0B7IkcUtUKfX8ZVBmY1ZqTXdUUkU