Page 1 of 1

PostPosted: Fri Feb 23, 2007 3:42 am
by maddin
hi steve
my provider upgraded his php version and myqlversion and changed to apache 2....
since this time I encounter the following error on all of my dataface apps (which were working like a charm before the upgrade)
Code: Select all
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /data/mad/myserver.de/www/html/df6.13r4/dataface-0.6.13r4/Dataface/Application.php on line 200
Error connecting to the database: Lost connection to MySQL server at 'reading initial communication packet', system error: 111

PhpMyAdmin works and i can access my tables there..
line 200 Application.php says :
Code: Select all
$this->_db = mysql_connect( $dbinfo['host'], $dbinfo['user'], $dbinfo['password'] );
         if ( !$this->_db ){
            echo 'Error connecting to the database: '.mysql_error();
            exit;
         }



Code: Select all
--------phpinfo--mysql settings------------------------------------
Active Persistent Links    1
Active Links    1
Client API version    5.0.32
MYSQL_MODULE_TYPE    external
MYSQL_SOCKET    /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE    -I/usr/include/mysql
MYSQL_LIBS    -L/usr/lib -lmysqlclient

Directive   Local Value   Master Value
mysql.allow_persistent   On   On
mysql.connect_timeout   60   60
mysql.default_host   localhost   localhost
mysql.default_password   no value   no value
mysql.default_port   no value   no value
mysql.default_socket   no value   no value
mysql.default_user   no value   no value
mysql.max_links   Unlimited   Unlimited
mysql.max_persistent   Unlimited   Unlimited
mysql.trace_mode   Off   Off
-------------------------------------------------------------------
PHP Version 5.2.0-8

did you ever encounter similar problems or
do you have any ideas how to solve this problem,
or do i have to change my provider?
cheers
martin

PostPosted: Fri Feb 23, 2007 12:15 pm
by shannah

First,Ê You should not have to change hosts.


I found this blog post describing the same error.

http://www.thescripts.com/forum/thread1744.html

If you search for this error, it pops up a lot of web pages - but these are pages that actually had the error, not posts about the error.

Is your host running windows.Ê If so, this page:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes.asp

indicates that a system error 111 is a buffer overflow.Ê Not sure how to remedy this, but it sounds like a problem with their mysql install.Ê I wouldn't read too much into the fact that PHPMyAdmin is working fine because it may be using a different connection method (e.g. it could be using mysql_pconnect, or the new mysqli extension).

You may want to do some trivial test scripts that just connect to a database using mysql_connect and do a select to see if that works.

-Steve