3.0.5.2 update - Unable to connect to dbispconfig database after update

Discussion in 'ISPConfig 3 Priority Support' started by lmason674, Apr 18, 2013.

  1. lmason674

    lmason674 New Member

    Using Centos 5.9 (x64)
    I used the ispconfig_update script successfully, upgraded from 3.0.4.6.
    All of the sites I host work fine.
    I can access mysql with phpmyadmin without trouble.
    But after the update, I can longer access ISPConfig interface on port 8080.
    The error message at the browser is -

    "Database Error: Unable to connect to the database:Could not connect to database"

    I have no errors accessing databases using mysql, including dbispconfig using "mysql -h localhost -u ispconfig -p (using password from ../interface/lib/config.inc.php)"

    I have searched all relevant log files, but find nothing.

    Everything on the server works great, just no ISPConfig interface.

    Any Ideas?

    *******************************
    Till said -

    Please check that the php mysqli commands are available.
    __________________
    Till Brehm
    ********************************
    I replied -
    MySQLi is installed and available.
    Here is the display for mysql & mysqli from PHP_INFO -

    mysql

    MySQL Support enabled
    Active Persistent Links 0
    Active Links 0
    Client API version 5.0.95
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /var/lib/mysql/mysql.sock
    MYSQL_INCLUDE -I/usr/include/mysql
    MYSQL_LIBS -L/usr/lib64/mysql -lmysqlclient

    Directive Local Value Master Value
    mysql.allow_local_infile On On
    mysql.allow_persistent On On
    mysql.connect_timeout 60 60
    mysql.default_host no value no value
    mysql.default_password no value no value
    mysql.default_port no value no value
    mysql.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock
    mysql.default_user no value no value
    mysql.max_links Unlimited Unlimited
    mysql.max_persistent Unlimited Unlimited
    mysql.trace_mode Off Off

    mysqli

    MysqlI Support enabled
    Client API library version 5.0.95
    Active Persistent Links 0
    Inactive Persistent Links 0
    Active Links 0
    Client API header version 5.0.77
    MYSQLI_SOCKET /var/lib/mysql/mysql.sock

    Directive Local Value Master Value
    mysqli.allow_local_infile On On
    mysqli.allow_persistent On On
    mysqli.default_host no value no value
    mysqli.default_port 3306 3306
    mysqli.default_pw no value no value
    mysqli.default_socket no value no value
    mysqli.default_user no value no value
    mysqli.max_links Unlimited Unlimited
    mysqli.max_persistent Unlimited Unlimited
    mysqli.reconnect Off Off


    Any other suggestions?
    *****************************

    I could really use some help here.

    Thanks.

    Lonnie
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    netstat -tap | grep mysql

    Do you get any additional php error messages in the global apache error.log?
     
    Last edited: Apr 19, 2013
  3. lmason674

    lmason674 New Member

    This is the only error that appears in apache error log when I access ispconfig on port :8080 -
    "[Fri Apr 19 16:42:16 2013] [error] [client 192.168.0.44] File does not exist: /var/www/html/favicon.ico"

    I did find this error in /var/log/ispconfig_install.log -
    "Thu Apr 18 13:49:24 MDT 2013 - [ISPConfig] - /tmp/ispconfig3_install/install/lib/installer_base.lib.php, Line 1489: WARNING: Failed to execute the command adduser apache ispapps"

    I have searched system log files and that is all I found.

    [root@cbsserv ~]# netstat -tap | grep mysql
    tcp 0 0 *:mysql *:* LISTEN 26983/mysqld
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:36655 ESTABLISHED 26983/mysqld
    tcp 0 0 localhost.localdomain:36723 localhost.localdomain:mysql ESTABLISHED 17512/amavisd (ch17
    tcp 0 0 localhost.localdomain:36655 localhost.localdomain:mysql ESTABLISHED 17509/amavisd (ch19
    tcp 0 0 localhost.localdomain:38032 localhost.localdomain:mysql ESTABLISHED 8322/smtpd
    tcp 0 0 localhost.localdomain:38036 localhost.localdomain:mysql TIME_WAIT -
    tcp 0 0 localhost.localdomain:38037 localhost.localdomain:mysql ESTABLISHED 8323/proxymap
    tcp 0 0 localhost.localdomain:38026 localhost.localdomain:mysql ESTABLISHED 8323/proxymap
    tcp 0 0 localhost.localdomain:38027 localhost.localdomain:mysql ESTABLISHED 8325/trivial-rewrit
    tcp 0 0 localhost.localdomain:38025 localhost.localdomain:mysql ESTABLISHED 8323/proxymap
    tcp 0 0 localhost.localdomain:38030 localhost.localdomain:mysql ESTABLISHED 8322/smtpd
    tcp 0 0 localhost.localdomain:38031 localhost.localdomain:mysql ESTABLISHED 8323/proxymap
    tcp 0 0 localhost.localdomain:38028 localhost.localdomain:mysql ESTABLISHED 8322/smtpd
    tcp 0 0 localhost.localdomain:38029 localhost.localdomain:mysql ESTABLISHED 8322/smtpd
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:36723 ESTABLISHED 26983/mysqld
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:38028 ESTABLISHED 26983/mysqld
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:38029 ESTABLISHED 26983/mysqld
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:38030 ESTABLISHED 26983/mysqld
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:38031 ESTABLISHED 26983/mysqld
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:38025 ESTABLISHED 26983/mysqld
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:38026 ESTABLISHED 26983/mysqld
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:38027 ESTABLISHED 26983/mysqld
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:38037 ESTABLISHED 26983/mysqld
    tcp 0 0 localhost.localdomain:mysql localhost.localdomain:38032 ESTABLISHED 26983/mysqld
    [root@cbsserv ~]#

    Lonnie
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Can you enable the MySQL log in /etc/my.cnf so that MySQL logs all queries? That way you should be able to find out what queries are executed when you try to log into ISPConfig, and what query is causing the problem.

    The options to enable logging in my.cnf should be something like this:
    Code:
    general_log_file        = /var/log/mysql/mysql.log
    general_log             = 1
     
  5. lmason674

    lmason674 New Member

    FYI: The syntax in my.cnf for MySQL 5.0.95 is "log={file location}"

    Here is the query from the log file -
    ***********
    /usr/libexec/mysqld, Version: 5.0.95-log (Source distribution). started with:
    Tcp port: 0 Unix socket: /var/lib/mysql/mysql.sock
    Time Id Command Argument
    130420 13:27:51 1 Connect Access denied for user 'UNKNOWN_MYSQL_US'@'localhost' (using password: NO)
    130420 13:27:57 2 Connect root@localhost on
    2 Query SET NAMES 'utf8'
    2 Quit
    ***********

    Other query entries show that ispconfig@localhost on dbispconfig for mail transport works correctly.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Can you post all the MySQL queries that are executed when you try to access ISPConfig?
     
  7. lmason674

    lmason674 New Member

    This is a production server so there is a large number of entries in a query log.

    Here is a log file capture I ran for a few seconds. I started the log, attempted to access ISPConfig, and stopped the log. The log shows a website being accessed and email being processed. In the middle is a highlighted entry. This is when I attempted to run the ISPConfig interface -
    ***************
    /usr/libexec/mysqld, Version: 5.0.95-log (Source distribution). started with:
    Tcp port: 0 Unix socket: /var/lib/mysql/mysql.sock
    Time Id Command Argument
    130421 11:38:20 1 Connect Access denied for user 'UNKNOWN_MYSQL_US'@'localhost' (using password: NO)
    130421 11:38:27 2 Connect c1_db_user@localhost on
    2 Query SET NAMES 'utf8'
    2 Init DB c1_csbs
    2 Query SET sql_mode = 'MYSQL40'
    2 Query SELECT * FROM csbs_session WHERE session_id = 'hkt9fdlihd8fck9i3badaecqh1'
    2 Query DELETE FROM csbs_session WHERE ( time < '1366565007' )
    2 Query SELECT * FROM csbs_session WHERE session_id = 'hkt9fdlihd8fck9i3badaecqh1'
    2 Query UPDATE `csbs_session` SET `time`='1366565907',`userid`='0',`usertype`='',`username`='',`gid`='0',`guest`='1',`client_id`='0',`data`='__default|a:7:{s:15:\"session.counter\";i:1;s:19:\"session.timer.start\";i:1366565882;s:18:\"session.timer.last\";i:1366565882;s:17:\"session.timer.now\";i:1366565882;s:22:\"session.client.browser\";s:74:\"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Qwest 1.0)\";s:8:\"registry\";O:9:\"JRegistry\":3:{s:17:\"_defaultNameSpace\";s:7:\"session\";s:9:\"_registry\";a:1:{s:7:\"session\";a:1:{s:4:\"data\";O:8:\"stdClass\":0:{}}}s:7:\"_errors\";a:0:{}}s:4:\"user\";O:5:\"JUser\":19:{s:2:\"id\";i:0;s:4:\"name\";N;s:8:\"username\";N;s:5:\"email\";N;s:8:\"password\";N;s:14:\"password_clear\";s:0:\"\";s:8:\"usertype\";N;s:5:\"block\";N;s:9:\"sendEmail\";i:0;s:3:\"gid\";i:0;s:12:\"registerDate\";N;s:13:\"lastvisitDate\";N;s:10:\"activation\";N;s:6:\"params\";N;s:3:\"aid\";i:0;s:5:\"guest\";i:1;s:7:\"_params\";O:10:\"JParameter\":7:{s:4:\"_raw\";s:0:\"\";s:4:\"_xml\";N;s:9:\"_elements\";a:0:{}s:12:\"_elementPath\";a:1:{i:0;s:73:\"/var/www/clients/client1/web3/web/libraries/joomla/html/parameter/element\";}s:17:\"_defaultNameSpace\";s:8:\"_default\";s:9:\"_registry\";a:1:{s:8:\"_default\";a:1:{s:4:\"data\";O:8:\"stdClass\":0:{}}}s:7:\"_errors\";a:0:{}}s:9:\"_errorMsg\";N;s:7:\"_errors\";a:0:{}}}' WHERE session_id='hkt9fdlihd8fck9i3badaecqh1'
    2 Query SELECT * FROM csbs_components WHERE parent = 0
    2 Query SELECT folder AS type, element AS name, params FROM csbs_plugins WHERE published >= 1 AND access <= 0 ORDER BY ordering
    2 Query SELECT m.*, c.`option` as component FROM csbs_menu AS m LEFT JOIN csbs_components AS c ON m.componentid = c.id WHERE m.published = 1 ORDER BY m.sublevel, m.parent, m.ordering
    2 Query SELECT id FROM csbs_plugins WHERE element = 'joomsef' AND folder = 'system' AND published = 1
    2 Query SELECT * FROM csbs_sefurls WHERE sefurl = '' OR sefurl = 'index.php' LIMIT 1
    2 Query SELECT `file`, `params` FROM `csbs_sefexts`
    2 Query SELECT template FROM csbs_templates_menu WHERE client_id = 0 AND (menuid = 0 OR menuid = 1) ORDER BY menuid DESC LIMIT 0, 1
    2 Query SELECT a.id, a.title, a.alias, a.title_alias, a.introtext, a.fulltext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by, a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.images, a.attribs, a.urls, a.metakey, a.metadesc, a.access, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug, CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, g.name AS groups, u.email as author_email, cc.title AS category, s.title AS section, s.ordering AS s_ordering, cc.ordering AS cc_ordering, a.ordering AS a_ordering, f.ordering AS f_ordering FROM csbs_content AS a INNER JOIN csbs_content_frontpage AS f ON f.content_id = a.id LEFT JOIN csbs_categories AS cc ON cc.id = a.catid LEFT JOIN csbs_sections AS s ON s.id = a.sectionid LEFT JOIN csbs_users AS u ON u.id = a.created_by LEFT JOIN csbs_groups AS g ON a.access = g.id WHERE 1 AND a.access <= 0 AND a.state = 1 AND (( cc.published = 1 AND s.published = 1 ) OR ( a.catid = 0 AND a.sectionid = 0 ) ) AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2013-04-21 17:38:27' ) AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2013-04-21 17:38:27' ) ORDER BY f.ordering LIMIT 0, 9
    2 Query SELECT a.id, a.title, a.alias, a.title_alias, a.introtext, a.fulltext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by, a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.images, a.attribs, a.urls, a.metakey, a.metadesc, a.access, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug, CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, g.name AS groups, u.email as author_email, cc.title AS category, s.title AS section, s.ordering AS s_ordering, cc.ordering AS cc_ordering, a.ordering AS a_ordering, f.ordering AS f_ordering FROM csbs_content AS a INNER JOIN csbs_content_frontpage AS f ON f.content_id = a.id LEFT JOIN csbs_categories AS cc ON cc.id = a.catid LEFT JOIN csbs_sections AS s ON s.id = a.sectionid LEFT JOIN csbs_users AS u ON u.id = a.created_by LEFT JOIN csbs_groups AS g ON a.access = g.id WHERE 1 AND a.access <= 0 AND a.state = 1 AND (( cc.published = 1 AND s.published = 1 ) OR ( a.catid = 0 AND a.sectionid = 0 ) ) AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2013-04-21 17:38:27' ) AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2013-04-21 17:38:27' ) ORDER BY f.ordering
    2 Query SELECT `filters` FROM `csbs_sefexts` WHERE `file` = 'com_content.xml' LIMIT 1
    2 Query SELECT `w`.`word`, `u`.`sefurl`, `u`.`metatitle` FROM `csbs_sefwords` AS `w` INNER JOIN `csbs_sefurlword_xref` AS `x` ON `w`.`id` = `x`.`word` INNER JOIN `csbs_sefurls` AS `u` ON `u`.`id` = `x`.`url`
    2 Query SELECT id, title, module, position, content, showtitle, control, params FROM csbs_modules AS m LEFT JOIN csbs_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
    2 Query SELECT * FROM `csbs_sefurls` WHERE `origurl` = 'index.php?option=com_content&id=1&layout=blog&view=category' LIMIT 2
    2 Query SELECT `catid` FROM `csbs_content` WHERE `id` = '7'
    2 Query SELECT `catid` FROM `csbs_content` WHERE `id` = '8'
    2 Query SELECT `catid` FROM `csbs_content` WHERE `id` = '9'
    2 Query SELECT `catid` FROM `csbs_content` WHERE `id` = '3'
    2 Query SELECT `catid` FROM `csbs_content` WHERE `id` = '4'
    130421 11:38:28 2 Query SELECT `catid` FROM `csbs_content` WHERE `id` = '2'
    2 Query SELECT `catid` FROM `csbs_content` WHERE `id` = '5'
    2 Query SELECT `catid` FROM `csbs_content` WHERE `id` = '25'
    2 Query SELECT `catid` FROM `csbs_content` WHERE `id` = '16'
    2 Query SELECT a.*, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug FROM csbs_content AS a INNER JOIN csbs_categories AS cc ON cc.id = a.catid INNER JOIN csbs_sections AS s ON s.id = a.sectionid WHERE a.state = 1 AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2013-04-21 17:38:27' ) AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2013-04-21 17:38:27' ) AND s.id > 0 AND a.access <= 0 AND cc.access <= 0 AND s.access <= 0 AND (cc.id=5) AND s.published = 1 AND cc.published = 1 ORDER BY a.ordering ASC LIMIT 0, 5
    2 Query SELECT * FROM csbs_banner WHERE showBanner = 1 AND (imptotal = 0 OR impmade < imptotal) AND cid = 1 AND catid = 8 ORDER BY sticky DESC, ordering LIMIT 0, 2
    2 Query UPDATE csbs_banner SET impmade = impmade + 1 WHERE bid = 2
    2 Query UPDATE csbs_banner SET impmade = impmade + 1 WHERE bid = 3
    2 Query SELECT `filters` FROM `csbs_sefexts` WHERE `file` = 'com_banners.xml' LIMIT 1
    2 Query SELECT * FROM `csbs_sefurls` WHERE `origurl` = 'index.php?option=com_banners&bid=2&task=click' LIMIT 2
    2 Query SELECT * FROM `csbs_sefurls` WHERE `origurl` = 'index.php?option=com_banners&bid=3&task=click' LIMIT 2
    2 Query SELECT * FROM csbs_session WHERE session_id = 'hkt9fdlihd8fck9i3badaecqh1'
    2 Query UPDATE `csbs_session` SET `time`='1366565907',`userid`='0',`usertype`='',`username`='',`gid`='0',`guest`='1',`client_id`='0',`data`='__default|a:7:{s:15:\"session.counter\";i:2;s:19:\"session.timer.start\";i:1366565882;s:18:\"session.timer.last\";i:1366565882;s:17:\"session.timer.now\";i:1366565907;s:22:\"session.client.browser\";s:74:\"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Qwest 1.0)\";s:8:\"registry\";O:9:\"JRegistry\":3:{s:17:\"_defaultNameSpace\";s:7:\"session\";s:9:\"_registry\";a:1:{s:7:\"session\";a:1:{s:4:\"data\";O:8:\"stdClass\":0:{}}}s:7:\"_errors\";a:0:{}}s:4:\"user\";O:5:\"JUser\":19:{s:2:\"id\";i:0;s:4:\"name\";N;s:8:\"username\";N;s:5:\"email\";N;s:8:\"password\";N;s:14:\"password_clear\";s:0:\"\";s:8:\"usertype\";N;s:5:\"block\";N;s:9:\"sendEmail\";i:0;s:3:\"gid\";i:0;s:12:\"registerDate\";N;s:13:\"lastvisitDate\";N;s:10:\"activation\";N;s:6:\"params\";N;s:3:\"aid\";i:0;s:5:\"guest\";i:1;s:7:\"_params\";O:10:\"JParameter\":7:{s:4:\"_raw\";s:0:\"\";s:4:\"_xml\";N;s:9:\"_elements\";a:0:{}s:12:\"_elementPath\";a:1:{i:0;s:73:\"/var/www/clients/client1/web3/web/libraries/joomla/html/parameter/element\";}s:17:\"_defaultNameSpace\";s:8:\"_default\";s:9:\"_registry\";a:1:{s:8:\"_default\";a:1:{s:4:\"data\";O:8:\"stdClass\":0:{}}}s:7:\"_errors\";a:0:{}}s:9:\"_errorMsg\";N;s:7:\"_errors\";a:0:{}}}' WHERE session_id='hkt9fdlihd8fck9i3badaecqh1'
    2 Quit
    130421 11:38:40 3 Connect root@localhost on
    3 Query SET NAMES 'utf8'
    3 Quit

    130421 11:38:44 4 Connect ispconfig@localhost on dbispconfig
    4 Query SELECT password FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT password FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT password FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT password FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT password FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT password FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'
    4 Query SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND disablepop3 = 'n'

    ***************

    I repeated this log capture several times to insure the results were the same.

    Lonnie
     
  8. lmason674

    lmason674 New Member

    Here is another query log capture. I stopped all other process on the server that would write to the log. I started the log, tried to access ISPConfig 4 times and then stopped the log. -
    ***************
    /usr/libexec/mysqld, Version: 5.0.95-log (Source distribution). started with:
    Tcp port: 0 Unix socket: /var/lib/mysql/mysql.sock
    Time Id Command Argument
    130421 11:20:19 1 Connect Access denied for user 'UNKNOWN_MYSQL_US'@'localhost' (using password: NO)
    130421 11:20:34 2 Connect root@localhost on
    2 Query SET NAMES 'utf8'
    2 Quit
    130421 11:20:36 3 Connect root@localhost on
    3 Query SET NAMES 'utf8'
    3 Quit
    130421 11:20:37 4 Connect root@localhost on
    4 Query SET NAMES 'utf8'
    4 Quit
    130421 11:20:38 5 Connect root@localhost on
    5 Query SET NAMES 'utf8'
    5 Quit
    *************

    Hope this helps.

    Lonnie
     
  9. lmason674

    lmason674 New Member

    I don't assume to know the answers here, but it looks like there is no database name being passed during the "connect".
    Won't it be "connect root@localhost on dbispconfig"?
     
    Last edited: Apr 21, 2013
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    In the ispconfig code, username, password, host and database name are passed in the __construct function of the mysqli object. Is the database name set in the file /usr/local/ispconfig/interface/lib/config.inc.php ?

    What irritates me is that all your other sites are working with mysql db (or maybe they dont use mysqli and just mysql is working?) and on the other hand there are no known issues with the ispconfig mysqli library which is installed on thousands of servers already.
     
  11. lmason674

    lmason674 New Member

    I share your frustration. I have been using ISPConfig 3 for over two years with great success. I am confussed, the 3.0.5.2 update worked without any indication of a problem.

    In the config.inc.php file the user is 'ispconfig', but the mysql query indicates 'root' as the user?

    Here's my /usr/local/ispconfig/interface/lib/config.inc.php file -

    **********************
    <?php
    /*
    Copyright (c) 2007 - 2013, Till Brehm, projektfarm Gmbh
    All rights reserved.

    Redistribution and use in source and binary forms, with or without modification,
    are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.
    * Neither the name of ISPConfig nor the names of its contributors
    may be used to endorse or promote products derived from this software without
    specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
    OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */

    //** Web-only
    if( !empty($_SERVER['DOCUMENT_ROOT']) ) {

    Header("Pragma: no-cache");
    Header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
    Header("Content-Type: text/html; charset=utf-8");

    //** Set a few php.ini values
    ini_set('register_globals',0);
    ini_set('magic_quotes_gpc', 0);

    if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS']) || isset($_REQUEST['s']) || isset($_REQUEST['s_old']) || isset($_REQUEST['conf'])) {
    die('Internal Error: var override attempt detected');
    exit;
    }
    }

    //** Set a few php.ini values
    if(get_magic_quotes_runtime()) set_magic_quotes_runtime(false);
    if(isset($app)) unset($app);
    if(isset($conf)) unset($conf);


    //** SVN Revision
    $svn_revision = '$Revision: 3937 $';
    $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);

    //** Application
    define('ISPC_APP_TITLE', 'ISPConfig');
    define('ISPC_APP_VERSION', '3.0.5.2');
    define('DEVSYSTEM', 0);


    //** Database
    $conf['db_type'] = 'mysql';
    $conf['db_host'] = 'localhost';
    $conf['db_database'] = 'dbispconfig';
    $conf['db_user'] = 'ispconfig';
    $conf['db_password'] = '{REMOVED}';
    $conf['db_charset'] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")
    $conf['db_new_link'] = false;
    $conf['db_client_flags'] = 0;

    define('DB_TYPE',$conf['db_type']);
    define('DB_HOST',$conf['db_host']);
    define('DB_DATABASE',$conf['db_database']);
    define('DB_USER',$conf['db_user']);
    define('DB_PASSWORD',$conf['db_password']);
    define('DB_CHARSET',$conf['db_charset']);


    //** Database settings for the master DB. This setting is only used in multiserver setups
    $conf['dbmaster_type'] = 'mysql';
    $conf['dbmaster_host'] = '';
    $conf['dbmaster_database'] = 'dbispconfig';
    $conf['dbmaster_user'] = '';
    $conf['dbmaster_password'] = '{REMOVED}';
    $conf['dbmaster_new_link'] = false;
    $conf['dbmaster_client_flags'] = 0;


    //** Paths
    $conf['ispconfig_log_dir'] = '/var/log/ispconfig';
    define('ISPC_ROOT_PATH', realpath(dirname(__FILE__).'/../')); // Main ROOT is the parent directory to this file, ie interface/ or server/. NO trailing slashes.
    define('ISPC_LIB_PATH', ISPC_ROOT_PATH.'/lib');
    define('ISPC_CLASS_PATH', ISPC_ROOT_PATH.'/lib/classes');
    define('ISPC_WEB_PATH', ISPC_ROOT_PATH.'/web');
    define('ISPC_THEMES_PATH', ISPC_ROOT_PATH.'/web/themes');
    define('ISPC_WEB_TEMP_PATH', ISPC_WEB_PATH.'/temp'); // Path for downloads, accessible via browser
    define('ISPC_CACHE_PATH', ISPC_ROOT_PATH.'/cache');
    define('ISPC_LOG_PATH', $conf['ispconfig_log_dir']);

    //** Paths (Do not change!)
    $conf['rootpath'] = substr(dirname(__FILE__),0,-4);
    $conf['fs_div'] = '/'; // File system separator, "\\" on Windows and "/" on Linux and UNIX
    $conf['classpath'] = $conf['rootpath'].$conf['fs_div'].'lib'.$conf['fs_div'].'classes';
    $conf['temppath'] = $conf['rootpath'].$conf['fs_div'].'temp';
    $conf['logpath'] = ISPC_LOG_PATH; // Actually just a copy of $conf['ispconfig_log_dir'], might be removed in a later version

    define('FS_DIV',$conf['fs_div']);
    define('SERVER_ROOT',$conf['rootpath']);
    define('INCLUDE_ROOT',SERVER_ROOT.FS_DIV.'lib');
    define('CLASSES_ROOT',INCLUDE_ROOT.FS_DIV.'classes');


    //** Server
    $conf['app_title'] = ISPC_APP_TITLE;
    $conf['app_version'] = ISPC_APP_VERSION;
    $conf['app_link'] = 'http://www.ispconfig.org/';
    $conf['modules_available'] = 'dashboard,admin,mail,sites,monitor,client,dns,help';
    $conf['server_id'] = '1';
    $conf['init_scripts'] = '/etc/init.d';


    //** Interface
    $conf['interface_modules_enabled'] = 'dashboard,mail,sites,dns,tools,help';

    //** Demo mode
    /* The demo mode is an option to restrict certain actions in the interface like
    * changing the password of users with sys_userid < 3 etc. to be
    * able to run the ISPConfig interface as online demo. It does not
    * affect the server part. The demo mode should be always set to false
    * on every normal installation
    */
    $conf['demo_mode'] = false;


    //** Logging
    $conf['log_file'] = $conf['ispconfig_log_dir'].$conf['fs_div'].'ispconfig.log';
    $conf['log_priority'] = 2; // 0 = Debug, 1 = Warning, 2 = Error


    //** Allow software package installations
    $conf['software_updates_enabled'] = false;


    //** Themes
    $conf['theme'] = 'default';
    $conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
    $conf['logo'] = 'themes/default/images/header_logo.png';

    //** Default Language and Timezone
    $conf['language'] = 'en';
    $conf['debug_language'] = false;

    //* Complete timezone list: http://php.net/manual/en/timezones.php
    $conf['timezone'] = 'UTC';


    //** Misc.
    $conf['interface_logout_url'] = ''; // example: http://www.domain.tld/


    //** Auto Load Modules
    $conf['start_db'] = true;
    $conf['start_session'] = true;

    //** Constants
    define('LOGLEVEL_DEBUG',0);
    define('LOGLEVEL_WARN',1);
    define('LOGLEVEL_ERROR',2);

    //** include a local config-file if there is one
    //** IMPORTANT!!!
    //** DO NOT MAKE A COPY OF THIS FILE AS LOCAL CONFIG-FILE
    //** USE A EMPTY FILE AND ONLY COPY THE SETTINGS IN IT, YOU NEED TO OVERRIDE
    if (is_file(dirname(__FILE__) . '/config.inc.local.php')) include_once 'config.inc.local.php';
    ?>
    **********************

    Lonnie
     
    Last edited: Apr 22, 2013
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The ispconfig configuration file content is fine. May you take a look into your phpmyadmin configuration file (on debian and ubuntu it is /etc/phpmyadmin/config.inc.php) if phpmyadmin uses mysql or mysqli extension on your server (just to verify if its a mysqli extension probem).

    If you have a line in that file:

    $cfg['Servers'][$i]['extension'] = 'mysqli';

    then phpmyadmin uses mysqli as well.
     
  13. lmason674

    lmason674 New Member

    On Centos 5 the config file is /usr/share/config.inc.php.

    Here is the file -

    **************
    <?php
    /* vim: set expandtab sw=4 ts=4 sts=4: */
    /**
    * phpMyAdmin sample configuration, you can use it as base for
    * manual configuration. For easier setup you can use scripts/setup.php
    *
    * All directives are explained in Documentation.html and on phpMyAdmin
    * wiki <http://wiki.phpmyadmin.net>.
    *
    * @version $Id$
    */

    /*
    * This is needed for cookie based authentication to encrypt password in
    * cookie
    */
    $cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

    /*
    * Servers configuration
    */
    $i = 0;

    /*
    * First server
    */
    $i++;
    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'http';
    /* Server parameters */
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = false;
    /* Select mysqli if your server has it */
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    /* User for advanced features */
    // $cfg['Servers'][$i]['controluser'] = 'pma';
    // $cfg['Servers'][$i]['controlpass'] = 'pmapass';
    /* Advanced phpMyAdmin features */
    // $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
    // $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
    // $cfg['Servers'][$i]['relation'] = 'pma_relation';
    // $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
    // $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
    // $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
    // $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
    // $cfg['Servers'][$i]['history'] = 'pma_history';
    // $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

    /*
    * End of servers configuration
    */

    /*
    * Directories for saving/loading files from server
    */
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';

    ?>

    **************

    Lonnie
     

    Attached Files:

  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so phpmyadmin is able to use the mysqli extension from php.

    May you please try this:

    1) Make a backup of the file /usr/local/ispconfig/interface/lib/config.inc.php
    2) Change the mysql login details to user "root" and the mysql root password in that file and try if the ispconfig login works with that.

    This way we can find out if its a user privilege problem of the mysql user.
     
  15. lmason674

    lmason674 New Member

    I did as you requested, changed the user/password to root in the config.inc.php file.
    The error is the same.
    I also changed the user/password to something completely wrong.
    The error was the same.

    In both cases I logged the mysql queries. The log entries were the same message as we have been seeing, no difference.

    Is it possible an interface .php file was damaged during transfer/decompress? (just grasping at straws here)
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you would see some kind of php error then. But you can redo the update to ensure that all files are correct.

    Code:
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    tar xvfz ISPConfig-3-stable.tar.gz
    cd ispconfig3_install/install
    php -q update.php
    If this wont help, you might consider to contact us for remote login support so we can check that on your server. Our support can be reached here:

    http://support.projektfarm.com/
     
  17. lmason674

    lmason674 New Member

    (SOLVED) - Unable to connect to dbispconfig

    I finally had the time to dig and resolve this problem.

    It was a conflict between the Apache module of Webdmin and an update for Apache. The default directory for virtual sites changed. Add to that, the ispconfig.vhost settings didn't seem to change the root document directory for the :8080 vhost correctly (I'm still looking into this).

    I don't know if this is a Centos (5.9), Apache, Webmin thing or not, but after I moved the "ispconfig" symlink file from /var/www/ispconfig to /var/www/html - everything started working correctly.

    Maybe this information will help someone else, or maybe this is just a freak "1 in a million" event that I had the pleasire of experiencing - in any case - Till, thank you for all of your assistance and PLEASE KEEP UP THE GOOD WORK!

    p.s. - The "unable to connect to database" error was due to the fact that there was an old, unused website located in /var/www/html that had bad DB credentials configured. I replaced it with the ispconfig symlink file.
     

Share This Page