Andy@

Mar / 03 / 2009

Flash and PHP Sessions

Watch out for using sessions in PHP and flash. You need to make sure they stay in sync; so when you have created a session in PHP (using session_start() ), you need to get the session id ( session_id() ) and pass it back to the flash. Then, in your flash communications, pass the session_id back to the PHP, and set it in the PHP like this (before you run session_start() ):-

if (isset($_REQUEST["session_id"])) {
	session_id($_REQUEST["session_id"]);
}
Feb / 26 / 2009
Feb / 24 / 2009
Feb / 24 / 2009

Install XDebug

Finally getting around to properly looking into XDebug and PHP debugging in a structured way… with that in mind, here is a very short How-To install.

sudo pecl install xdebug

There now … that was easy!

Ok so there’s a little more; assuming you installed php using MacPorts, you will need to edit this file:-

/opt/local/etc/php.ini

and add the following lines:-

[xdebug]
zend_extension="/opt/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/var/log/xdebug/

I created a folder at /var/log/xdebug/ to take the output of the xdebug profiler

Finally, restart apache.

Feb / 24 / 2009
Feb / 19 / 2009

Bloggit

After a long absence from the world of blogs and blogging, I am back with a blog related to my day to day work at Steamshift - what we are doing, learning about, publishing and interesting projects and experiments. Hope y’all dig it.

Page 2 of 2 Newer Entries →