June 30, 2009

PHP 5.3 fertig!

Die neue PHP Version ist nun endgültig fertig und freigegeben. Zu den neuen Funktionen gehören Closures, Funktionsobjekte und Lambda-Funktionen, die native MySQL Library, namespaces und late static binding. Aber für mich am wichtigsten sind die Performance-Verbesserungen, PHP 5.3 wird ca. 1,5x so schnell sein wie 5.2 und durch den neuen Garbage Collector deutlich weniger Speicher verbrauchen.

MySQL Connection Error

Finally found the solution in the Ubuntu forums:

ln -s /etc/mysql/my.cnf /etc/my.cnf

Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ [Archive] – Ubuntu Forums.

Another problem … same error in phpMyAdmin cause the default for socket is “/tmp/mysql.sock”, you have to change that in your config file (config/config.inc.php):

[sourcecode language='php']
$cfg['Servers'][$i]['connect_type'] = ’socket’;
$cfg['Servers'][$i]['socket'] = ‘/var/run/mysqld/mysqld.sock’;
[/sourcecode]