Re: Mysql 5.5 and PHP Mysql API Version 5.1.41

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 15, 2011 at 9:57 AM, Matthias Laug <matthias.laug@xxxxxxxxx> wrote:
> Hey there,
>
> I've just migrated to Mysql 5.5 from source and it works like a charm. Still every now and then (in intervals of approximatly an hour) I get the following error:
>
> Error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 110' in /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php:129 Stack trace: #0 /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('mysql:port=6664...', '#####', '#####', Array) #1 /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect() #2 /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Abstract.php(448): Zend_Db_Adapter_Pdo_Mysql->_connect() #3 /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES 'utf8...', Array) #4 /home/ydadmin/build/lieferando.de/11720/application/Bootstrap.php(99): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES 'utf8...') #5 /home/ydadmin/build/lieferando.de/11720/library/Zend/App in /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php on line 144
>
> It is like any queue is running full and this is the result, but actually no clue. My first guess is the API Version of the mysql client I am using with the precompiled php binaries (Ubuntu 10.10 Server, PHP 5.3.2-1ubuntu4.7 with Suhosin-Patch (cli) (built: Jan 12 2011 18:36:55))
>
> Does anyone else have the same problems?
>
> Thanks for any help,
> Matthias
> --

Have you tried a basic test w/o framework like this to ensure that
both installed versions of PHP & MySQL are working properly as
expected?

Test connection for sample data:
Penelope Guiness
Nick Wahlberg

Platform info:
Server Info: 5.5.7-rc-log
Client Info: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $
Webserver: Microsoft-IIS/7.5
PHP: 5.3.5-cgi-fcgi

<?php
$user = 'test';
$passwd = 'test';
$host = '127.0.0.1';
$dbname = 'sample_sakila';
$sql = 'SELECT * FROM actor LIMIT 0,2';
$dsn = "mysql:host={$host};dbname={$dbname}";

if ( !extension_loaded( 'pdo' ) ) throw new \Exception(' Requires PHP
PDO extension.');
if ( !extension_loaded( 'pdo_mysql' ) ) throw new \Exception('
Requires PHP PDO driver MySQL ');


echo '<pre>Test connection for sample data: '.PHP_EOL;
$dbh = new PDO( $dsn, $user, $passwd );
foreach( $dbh->query( $sql ) as $row )
{
    echo ucfirst( strtolower( $row['first_name'] ) ).' '
        .ucfirst( strtolower( $row['last_name'] ) ).PHP_EOL;
}
echo PHP_EOL.'Platform info: '.PHP_EOL;
$mysqli = new mysqli( $host, $user, $passwd, $dbname );
echo 'Server Info: '.$mysqli->server_info.PHP_EOL;
echo 'Client Info: '.$mysqli->client_info.PHP_EOL;
$mysqli->close();
echo 'Webserver: '.$_SERVER['SERVER_SOFTWARE'].PHP_EOL;
echo 'PHP: '.PHP_VERSION.'-'.PHP_SAPI.PHP_EOL;

show_source(__FILE__);

Note: The MySQL server is my own Win x64 compilation.  Nevertheless,
PHP shouldn't have any problems with MySQL 5.5.

Regards,
Tommy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux