I got the following error for PHP after recent portupgrade:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/memcache.so' - /usr/local/lib/php/20090626/memcache.so: Undefined symbol "php_session_create_id" in Unknown on line 0
to fix this all you need to do is reinstall pecl-memcache, like this:
When you have a network drive mapped as a drive (persistent), and you experience delay at windows boot time, there is a clever trick you can do to speed up the process, and have your location mounted on boot at the same time. The phenomenon appears when Windows tries to mount a drive before the network is ready (don't really know why they haven't thought of that, but my experience tells me that windows was always a bit problematic in networking). So here is the method:
To be honest, I like using a GUI when it's available, but if it's not, or if it's much slower to use one, well You'll stuck with git command line, and in that case a color presentation of log or diff will help you a lot in finding what you are looking for. This may be an old trick, but it helped me a lot:
Sometimes during PHP unit testing You'll need to redefine a function, and then - later - restore it to it's original state. One way to do that with Runkit ... Let's say that we don't want to get "Cannot modify header information - headers already sent by" error messages when testing a code which uses setcookie php command. We can use the following trick:
I have been struggling with setting up runkit with PHP 5.3 under Windows 7, and found out that there is no DLL released for that version, and PHP will not work with pre-compiled DLL's you can found on the net, so I made my own dll which works. Just wanted to share it in hope that it will help others as well.
I like drupal's db_query solution, it's simple, it's secure and easy to implement. If you want to use it outside of the Drupal framework, here is a stand alone code for mysql...