PHP

PHP static late binding
jhm – Sun, 2010 – 11 – 28 12:07

I just stumbled across this myself and am glad that I am not crazy after all ...

PHP case sensitivity @#&^%!
jhm – Tue, 2010 – 10 – 26 08:54

The other day I finally figured out why some people are so violently opposed to PHP. When using object oriented features of PHP5 I discovered the hard way that PHP has some weird, backwards compatibility issue rules how it handles case.

In a nutshell, variables are case sensitive, but function names, and object methods (!!!) are not.

That explains why the following code does not work

<?php
class A {
function
GET($url) {
 
// retrieve the url
}
}
class
B extends A {
private var
$foo;

function
get($var) {
  return
$this->var;
}
}
?>

Your rating: None Average: 1 (1 vote)

views as CCK node reference filters
jhm – Fri, 2009 – 09 – 18 13:58

Drupal's CCK module supports views to filter the nodes to offer for the node reference field type.

The view can be specified with an argument, but the argument is static to the CCK field definition.

With the following snippet of code in the view arguments code, one can specify something dynamic, in my case part of the URL.

Your rating: None Average: 3 (1 vote)

Drupal.behaviors
jhm – Thu, 2009 – 09 – 17 18:04

I wasted several hours today trying to enable behaviors in a Drupal 5 site and just couldn't get it to work. Several other sites on the same server had it working. All the instructions I found on the web were straight forward and correlated with what I am doing.

Finally I figured out that core drupal 5 does not have behavior functionality. The jstools module implements this feature, since everything magically worked as soon as I enabled that module.

No votes yet

NGINX + PHP-FPM + APC = Awesome
jhm – Sun, 2009 – 07 – 26 06:55

Trawling the internet for solutions that combine APC with memcache I came across this article. It talkes about NGNIX and APC, one of my next frontiers (ngnix) anyways, so I decided to "bookmark" it here.

Multiple Node Access logic patch
jhm – Fri, 2008 – 11 – 14 11:13

drupal related

w2box
jhm – Mon, 2006 – 07 – 10 14:18

This is a simple php script which allow you to upload and download files. There isn't any complex user management because it aims more for private file repository use.

It as direct file deletion using AJAX, instant table sort using a self modified version of sorttable.js and finally upload file progressbar using a cgi(perl) script.

If you want to know more about those technologies, go to more information section.

zephyr - an ajax based framework for php5 developers
jhm – Sat, 2006 – 05 – 20 11:52

zephyr is an ajax based framework for php5 developers. you can easily develop business applications using this robust framework. this is extremely easy to learn and very simple to implement. you can deliver a full fledged ajax application with strong business layer in backend within some minutes. installation and deployment of packages that you develop for zephyr is hassle free. moreover you will get all the features of most popular templating engine "smarty" and powerfull data access layer "adoDB". lets go through the documentation process to discover how easy is to develop an ajax applicatio

G2 notification module
jhm – Sat, 2006 – 05 – 13 21:07

notification module (with scheduler discussion)