Thursday, May 31, 2012

Install the Latest APC on Debian

apt-get install php-pear php5-dev apache2-threaded-dev build-essential
pecl install apc

Thursday, May 24, 2012

Calling the i18n Function __() in a Form in Symfony

Do not use __() in forms! Use translate:

$this->getWidgetSchema()->getFormFormatter()->translate('exampletext');

Wednesday, May 23, 2012

sfDependentSelectPlugin: Cannot set property 'onchange' of null

From README:

        // always the selects order has to be according to the dependency.
        // ich means: country > state > city
        $this->widgetSchema->moveField('city_id', 'after', 'state_id');


If you not set the order, you will get a Uncaught TypeError: Cannot set property 'onchange' of null error.

Wednesday, May 16, 2012

Sync Datetime in CentOS

service ntpd stop
ntpdate time.kfki.hu
service ntpd start

ps: or ntpdate pool.ntp.org

Tuesday, May 15, 2012

Wednesday, May 9, 2012

mssql_query Cause net::ERR_EMPTY_RESPONSE in Chrome

If you get net::ERR_EMPTY_RESPONSE Chrome error message when you want to query some simple select with native mssql_query in PHP, you should set mssql.datetimeconvert = Off in php.ini or use ini_set("mssql.datetimeconvert", false); in the code.