DrupalCon excitement
With the upcoming release of Drupal 6, DrupalCon Boston 2008 promises to unleash a flood of cool new stuff.
With Actions in core, workflow-ng taking a new twist on Workflow, Views2 and Panels2, additions to the devel module for themers, upgrades to jQuery, new database Schema API, a fresh Drupal Association board, things look bright. I might make this the first Drupal or PHP conference I ever attempt to attend.
Sponsorship opportunities are still available and I expect the attendance to be sold out, especially since admission is ¼ the cost of php|tek. Maybe your sponsorship will even attract a bright new employee to your organization. Only the best are at DrupalCon.
Submitted by deekayen on Thu, 01/17/2008 - 12:37pm
deekayen's blogNew hook_theme() in Drupal 6
As of Drupal 6, when you're writing modules, you might find the theme() function doesn't work as you expect. Whereas before you'd pass a parameter to the theme() function that told it which theme_* function to call, now you have to register the theme_* function for it to actually get called.
Not doing so probably results in mysterious data loss during execution for most implementations. I've known about it for some time now and still forget to register my theme_* functions.
There are so few examples at the moment on how to register theme functions, I wrote a stub module with just enough code to show the registration at work. I've made it available for download as a .tgz for you to play around with on your own.
Submitted by deekayen on Wed, 11/21/2007 - 11:14am
deekayen's blog | Read more | 1 attachmentDries makes Views a priority
Dries Buytaert, Supreme Drupal Overlord, said today on the development@ mailing list the following:
As indicated earlier, I'm _all_ for incorporating more of CCK and Views into core. Let's make a concentrated effort for that in D7. It doesn't mean that _all_ of CCK/Views needs to be in core, but certainly the stable and critical parts should, IMO.
Barry Jaspan gets the credit for making the proper comments to receive such a reply.
Submitted by deekayen on Tue, 11/20/2007 - 11:43am
MySQL 5.1 on MacOS 10.5 filevault
First download MySQL 5.1 and MySQL 5.0. The GA versions are the ones that have the prefpanel for starting MySQL, so you have to get both the GA and RC if you want bleeding edge with the GUI startup.
Note: a configuration of this type is meant for a machine with one user since only that one user will be able to decrypt the filevault and unlock the data file location so MySQL can run.
Unpack the contents of 5.1.22 to /usr/local/mysql.
Mount the 5.0.45 dmg package and drag MySQL.prefPane to /Library/PreferencePanes. This is how I start MySQL. Do not click for MySQL to automatically start, because it won't be able to start until after you login your filevaulted account. MySQL does appear to be able to survive through putting a laptop to sleep, so you can just put your machine to sleep a lot if you don't like starting MySQL a lot.
Alternatively, command line nuts can start MySQL like this:
davidnorman:mysql root# /usr/local/mysql/support-files/mysql.server startCreate a place for the MySQL data files in your filevault. I picked /Users/davidnorman/mysql/data and made a global configuration file to match which I put in /etc/mysql/my.cnf. MySQL 5.0 expects the configuration at /etc/my.cnf and you will find if you use the MySQL 5.0 GUI tools, the configuration section will look there, too. I consider this a harmless penalty for using RC code.
[mysqld_safe]
user = davidnorman
log-error = /Users/davidnorman/mysql/data/davidnorman.local.err
basedir = /usr/local/mysql
datadir = /Users/davidnorman/mysql/data
max_allowed_packet=64M
[mysqld]
user = davidnorman
log-error = /Users/davidnorman/mysql/data/davidnorman.local.err
basedir = /usr/local/mysql
datadir = /Users/davidnorman/mysql/data
max_allowed_packet=64MMove the contents of /usr/local/mysql/data to your /Users/davidnorman/mysql/data equivalent and run /usr/local/mysql/scripts/mysql_install_db.
Start your MySQL server through Apple menu - System Preferences - MySQL. If the status doesn't turn green, check your /Users/davidnorman/mysql/data/davidnorman.local.err equivalent. My biggest problems were from permissions, which created errors that it either it couldn't find files or they were read-only. Eventually I found
$ sudo chmod -R 700 /Users/davidnorman/mysql
$ sudo chown -R davidnorman:davidnorman /Users/davidnorman/mysqlcleared it up since during other parts of the install process things were created and owned by user root or _mysql and were in a few were in the wheel group.
Set a root password if you want.
$ /usr/local/mysql/bin/mysqladmin -u root password 'newpasswordhere'Submitted by deekayen on Tue, 11/06/2007 - 11:49am
deekayen's blogCustom MAMP on Mac OS 10.5 Leopard
I wasn't able to get xdebug or Zend Debugger to work on my install of Mac OS 10.5 Leopard after trying the XTools version of PHP5 that now comes with the operating system, so I broke down and compiled PHP5 from scratch thinking it would make life easier in the end and finally get support for an mcrypt project I have on the todo list. I suspect it has to do with Leopard introducing 64 bit XTools software whereas xdebug and Zend Debugger were compiled for a 32 bit environment.
First, you should install XTools from the Leopard DVD and this installation process will just replace the Apache and PHP5 files that XTools installs and leave all the other configuration needed to get it to work in place.
The problem was when I loaded Apache, I couldn't connect. Console told me
httpd: Syntax error on line 114 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/libphp5.so into server: dlopen(/usr/libexec/apache2/libphp5.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/libphp5.so: mach-o, but wrong architecture
Apparently this is because the custom compile I did is 32 bit and the new pre-packaged Apache is 64 bit, so I recompiled Apache, too.
./configure --enable-layout=Darwin --enable-mods-shared=all
make
sudo make install I grabbed a source snapshot of PHP 5.2.6 from php.net. This configure line made a successful compile of PHP 5.2.6 with various extensions for linking to MySQL 5.1.22.
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs --enable-cli --with-zlib-dir=/usr --enable-mbstring --enable-mbregex --enable-sockets --with-curl=/usr --with-config-file-path=/etc --sysconfdir=/private/etc --with-mysql-sock=/tmp/mysqld.sock --with-pear=/Library/PHP --without-iconv --without-openssl --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/bin/mysql_config --with-mcrypt --with-xmlrpc --with-bz2 --with-curl --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6 --with-gd --with-pgsql
make
sudo make installThe MySQL config comes from installing the MySQL 5.1.22 official binaries to /usr/local/mysql.
Of course later, I realized Drupal 6 status page complains if GD isn't installed, so I found http://www.veola.net/macintosh/adding-gd-library-for-mac-os-x-leopard which even has the instructions on making GD a PHP extension so I didn't have to recompile all of PHP5. I used a more updated version of libpng because the one in the instructions didn't compile.
Submitted by deekayen on Mon, 11/05/2007 - 7:14pm
deekayen's blog
