Monday, February 13, 2012
Friday, October 21, 2011
PDO utf-8 issues
Had issues with json_encode complaining:
Fixed it by adding
source
Invalid UTF-8 sequence in argument
Fixed it by adding
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"
to the PDO creation line.. ie:$pdo = new PDO(
'mysql:host=mysql.example.com;dbname=example_db',
"username",
"password",
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
source
Thursday, October 20, 2011
Tuesday, October 11, 2011
Emacs, geben and xdebug
* sudo pecl install xdebug
* edit php.ini
* download geben: http://trac.sakura.ne.jp/geben/
* unpack it into ~/emacs.d/ (emacs includes folder) * add this to your .emacs file:
* open a php service with the parameter
`?XDEBUG_SESSION_START` to start debugging
source
* edit php.ini
zend_extension=/path/to/xdebug.so ; usually /usr/lib/php5/20060613+lfs/xdebug.so [debug] xdebug.remote_autostart=off xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=localhost xdebug.remote_port=9000* restart apache: /etc/init.d/apache2 restart
* download geben: http://trac.sakura.ne.jp/geben/
* unpack it into ~/emacs.d/ (emacs includes folder) * add this to your .emacs file:
(add-to-list 'load-path "/home/your/emacs.files/geben") (add-to-list 'load-path "/home/your/emacs.files/geben/gud")* restart emacs and run geben with `M-x geben`
* open a php service with the parameter
`?XDEBUG_SESSION_START` to start debugging
source
Thursday, September 22, 2011
Ignoring changes in a tracked file in git
Ignore changes: git update-index --assume-unchanged
Un-ignore changes:git update-index --no-assume-unchanged
[source]
Thursday, September 15, 2011
Monday, August 8, 2011
Setting 'git pull' to use --rebase for all branches
git config --global branch.autosetuprebase always
Subscribe to:
Posts (Atom)