Simple Invoices database connection problem
  • ykolabhaiykolabhai March 2009

    Hi Justin

    I am trying the beta 3 on my site and I have the following problem
    ===========================================
    Simple Invoices database connection problem
    ===========================================
    Could not connect to the Simple Invoices database

    For information on how to fix this pease refer to the following database error:
    --> SQLSTATE[HY000] [2005] Unknown MySQL server host 'mysql5.dns-systems.net:3307' (1)

    If this is an Access denied error please make sure that the database.params setting in config/config.ini are correct
    ===========================================

    I than removed the port number then I got

    ===========================================
    Simple Invoices database connection problem
    ===========================================
    Could not connect to the Simple Invoices database

    For information on how to fix this pease refer to the following database error:
    --> SQLSTATE[28000] [1045] Access denied for user 'lenz_sz3nd'@'magma.bpweb.net' (using password: YES)

    If this is an Access denied error please make sure that the database.params setting in config/config.ini are correct
    ===========================================

    The second error is telling me my password is correct but it can't locate the database

    My database info is as follows

    Hostname: mysql5.dns-systems.net
    Port: 3307
    Username: lenz_sz3nd
    Database Name: lenz_sz3nd

    My config file looks like this

    database.adapter = pdo_mysql
    database.params.host = mysql5.dns-systems.net
    database.params.username = lenz_sz3nd
    database.params.password = **********
    database.params.dbname = lenz_sz3nd

    Regards

    Yusuf

  • justinjustin March 2009

    Hey Yusuf

    try localhost or 127.0.0.1 in database.params.host

    let us know how you go

    Cheers

    Justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • ykolabhaiykolabhai March 2009

    Hi Justin

    I did that and had the same error I notified my hosting company and this is the comment that they came back with

    the 1st response was

    Hi Yusuf. The database host name should be mysql5.dns-systems.net not localhost.

    Then when I tried the database host name mysql5.dns-systems.net I got the the errors above. My webhost came back with the following response

    It looks like it doesn’t like the port :3307 appended onto the hostname. You
    will have to remove this, and consult the programs documentation or authors
    to see where you can specify a custom MySQL port number.


    Regards
    Yusuf

  • justinjustin March 2009

    Hey Yusuf,

    stick port=3307; in the function db_connector() in include/sql_queries.php

    refer: http://au2.php.net/manual/en/ref.pdo-mysql.php#80306 for example

    let us know how you go

    i might have to put a port option in the config

    Cheers

    Justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • ykolabhaiykolabhai March 2009

    Hi Justin

    in sql_queries.php i did this
    default:
    //mysql
    $connlink = new PDO(
    $pdoAdapter.':host='.$config->database->params->host.'; port='.$config->database->params->port.'; dbname='.$config->database->params->dbname, $config->database->params->username, $config->database->params->password, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8", PDO::MYSQL_ATTR_INIT_COMMAND=>"SET CHARACTER SET utf8;")
    );
    in config.ini i did this
    database.params.port = 3307

    this worked for me however when i activate authentication I get

    Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[28000] [1045] Access denied for user 'lenz_sz3nd'@'magma.bpweb.net' (using password: YES)' in /usr/local/lib/php/Zend/Db/Adapter/Pdo/Abstract.php:143 Stack trace: #0 /usr/local/lib/php/Zend/Db/Adapter/Abstract.php(767): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 /usr/local/lib/php/Zend/Db/Adapter/Abstract.php(837): Zend_Db_Adapter_Abstract->quote('accounts', NULL) #2 /usr/local/lib/php/Zend/Auth/Adapter/DbTable.php(354): Zend_Db_Adapter_Abstract->quoteInto('`password` = MD...', 'accounts') #3 /usr/local/lib/php/Zend/Auth/Adapter/DbTable.php(285): Zend_Auth_Adapter_DbTable->_authenticateCreateSelect() #4 /home/lenz/IIQ3BHE0/htdocs/simpleinvoices/modules/auth/login.php(67): Zend_Auth_Adapter_DbTable->authenticate() #5 /home/lenz/IIQ3BHE0/htdocs/simpleinvoices/index.php(278): include_once('/home/lenz/IIQ3...') #6 {main} thrown in /usr/local/lib/php/Zend/Db/Adapter/Pdo/Abstract.php on line 143

    Regards
    Yusuf

  • ykolabhaiykolabhai March 2009

    Hi Justin

    Any feedback for me

    Regards
    Yusuf

  • ykolabhaiykolabhai March 2009

    HI Justin

    Sorted

    I included the prot in the login.php and that worked

    This is the what I changed in login.php

    //$dbAdapter = new Zend_Db_Adapter_Pdo_Mysql(array('dbname' => ':memory:'));
    /*
    $dbAdapter = new Zend_Db_Adapter_Pdo_Mysql(array(
    'host' => $config->database->params->host,
    'port' => $config->database->params->port,
    'username' => $config->database->params->username,
    'password' => $config->database->params->password,
    'dbname' => $config->database->params->dbname
    ));
    */
    $dbAdapter = Zend_Db::factory($config->database->adapter, array(
    'host' => $config->database->params->host,
    'port' => $config->database->params->port,
    'username' => $config->database->params->username,
    'password' => $config->database->params->password,
    'dbname' => $config->database->params->dbname)
    );

    Regards

  • justinjustin March 2009

    ah - thanks for that - ill update the code - inc auth code to work with different mysql port

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • ykolabhaiykolabhai March 2009

    Hi Justin

    Thks please specify that the default port is 3306.

    I have problems with the backup it gives me an error There was an error connecting to the database server

    the other problem is when i try and select backup database from the dashboard it takes me to Manage Customers :: Add New Customer. screen

    Regards

  • justinjustin May 2009

    Hey Yusuf,

    port has now been added into config.ini with default of 3306 so i should work all happy for your in the next release

    Cheers

    Justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • omacomomacom January 2010

    HI justin i have this erreur on OVH HOST


    Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[42000] [1203] User polyformdt_fact already has more than 'max_user_connections' active connections' in /homez.323/polyformdt/www/epaper/library/Zend/Db/Adapter/Pdo/Abstract.php:143 Stack trace: #0 /homez.323/polyformdt/www/epaper/library/Zend/Db/Adapter/Abstract.php(417): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 /homez.323/polyformdt/www/epaper/library/Zend/Db/Adapter/Pdo/Abstract.php(230): Zend_Db_Adapter_Abstract->query('SHOW TABLES', Array) #2 /homez.323/polyformdt/www/epaper/library/Zend/Db/Adapter/Abstract.php(703): Zend_Db_Adapter_Pdo_Abstract->query('SHOW TABLES', Array) #3 /homez.323/polyformdt/www/epaper/library/Zend/Db/Adapter/Pdo/Mysql.php(94): Zend_Db_Adapter_Abstract->fetchCol('SHOW TABLES') #4 /homez.323/polyformdt/www/epaper/include/language.php(17): Zend_Db_Adapter_Pdo_Mysql->listTables() #5 /homez.323/polyformdt/www/epaper/include/init.php(154): include_once('/homez.323/poly...') #6 /homez.323/polyformdt/www/epaper/index in /homez.323/polyformdt/www/epaper/library/Zend/Db/Adapter/Pdo/Abstract.php on line 143


    Please help

  • justinjustin January 2010

    @omacom

    ask your web host to increase the 'max_user_connections' allowed for MySQL - this should fix the problem

    cheers

    Justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • kombalakombala December 2011

    Hi Justin,

    I have the same error when trying to install simple invoice version.name= 2010.2 update 1 - stable,
    when i use database.params.host = mysql6.000webhost.com, error message is this
    >>Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000] [1203] User a3709326_si1 already has more than 'max_user_connections' active connections' in /home/a3709326/public_html/library/Zend/Db/Adapter/Pdo/Abstract.php:129 Stack trace: #0 /home/a3709326/public_html/library/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('mysql:host=mysq...', 'a3709326_si1', 'admin123', Array) #1 /home/a3709326/public_html/library/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect() #2 /home/a3709326/public_html/library/Zend/Db/Adapter/Abstract.php(448): Zend_Db_Adapter_Pdo_Mysql->_connect() #3 /home/a3709326/public_html/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SHOW TABLES', Array) #4 /home/a3709326/public_html/library/Zend/Db/Adapter/Abstract.php(765): Zend_Db_Adapter_Pdo_Abstract->query('SHOW TABLES', Array) #5 /home/a3709326/public_html/library/Zend/Db/Adapter/Pdo/Mysql.php(114): Zend_Db_Adapter_Abstract->fetchCol('SHOW TABLES') #6 /home/a3709326/pu in /home/a3709326/public_html/library/Zend/Db/Adapter/Pdo/Abstract.php on line 144

    but when i change database.params.host = localhost error message is this >>
    ===========================================
    Simple Invoices database connection problem
    ===========================================

    Could not connect to the Simple Invoices database

    For information on how to fix this pease refer to the following database error:
    --> SQLSTATE[28000] [1045] Access denied for user 'a3709326_si1'@'localhost' (using password: YES)

    If this is an Access denied error please enter the correct database connection details config/config.ini

    Note: If you are installing Simple Invoices please follow the below steps:
    1. Create a blank MySQL database
    2. Enter the correct database connection details in the config/config.ini file
    3. Refresh this page

    i change the config.ini according to instruction and it's seem correct. here is my config.ini

    database.params.host = mysql6.000webhost.com
    database.params.username = a3709326_si1
    database.params.password = admin123
    database.params.dbname = a3709326_si1
    database.params.port = 3306

    I need help to make this simple invoices works. Its a great program compare to others and all i need now is to make this thing working.

  • kombalakombala December 2011

    Please, give me some help.

  • modirmodir December 2011

    Hi,

    Create a small php script with the following code:
    <?php<br />
    $link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
    if (!$link) {
    die('Not connected : ' . mysql_error());
    }

    // make foo the current db
    $db_selected = mysql_select_db('foo', $link);
    if (!$db_selected) {
    die ('Can\'t use foo : ' . mysql_error());
    }
    ?>

    Change the variables accordingly. If you can connect then it could be a SimpleInvoices problem else it is a problem with the parameters (username, etc.) you have.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Categories