I’m starting out life as a Drupal n00b. Installed Drupal 7.2 on a number of boxes (basically on all machines I use). On some Windows machines, I use XAMPP, on others (with lots of memory) I picked up a CentOS VM running on a free VMWare player.
The most convenient place to get the VMWare image has been from VMWare itself. This link provides a CentOS 5.3 image (http://www.vmware.com/appliances/directory/34758) – but a simple yum update and you’re up to CentOS 5.6 as of this writing.
First thing to do is to add the EPEL repo. (basically a couple of RPM commands which I did not document). This is completely biased but I find EPEL to be more ‘complete’ than RPMForge. For instance, if you’re using php-xdebug, then you’re S.O.L. with RPMForge.
CentOS 5.6 is still on PHP 5.1.6 – so if you like that, keep it, otherwise yum update to php 5.3.
Make sure you install VMWare tools – makes life easier allowing shared directories between the host OS (Windows 7 in my case) and CentOS. Of course, you could go the samba share route like Sacha Chua did on this post.
If you’re going the php53 route, remove 5.1.6. (yum remove php-cli php-common php). Then install 5.3 (yum install php53 php53-gd php53-mysql php-dom php53-devel) – Drupal needs those.
I turned off iptables on my machine. If you ever get to the a point where you can SSH to your box but an http request does not respond – it’s a good chance iptables is blocking you. I could do this since my VMWare is NAT’d to my machine. Most people (Sacha included) prefer to run their VM in ‘bridge’ mode – which means that it’s a peer on the subnet. If that’s the case, I’d be leery about turning off iptables.
Download Drupal and follow the install instructions.
THEN: jump into the built a module tutorial. Seriously. So many links on the web have Drupal 6 tutorials for building modules. But a lot of things changed between Drupal 6 and Drupal 7 – not the least of which are the module_hooks. THUS: if you’re following along on a Drupal 6 tutorial and all of a sudden you can’t get past the point where your ‘block’ is supposed to show up in Admin->Structure->Blocks list – then the chances are you didn’t implement the Drupal 7 hooks.
For instance: if your module is named: lame_module, you’ll need to implement lame_module_block_info() and lame_module_block_view(). NOT lame_module_block()… grrr.. I wasted an hour of my time trying to debug that. Follow this tutorial: http://drupal.org/node/1074360 – works like a charm – although I daresay they could have made the tutorial a little easier for n00bs. There was, for instance, no need to delve into the DB as early as the tutorial did – and concentrate instead on the initial render of block view of the module.
I guess that’s about it. It appears to be a decent framework. Quite different from developing in CakePHP or Zend or Symfony – in a way it feels more ‘cumbersome’ – but already in drupal is functionality that I would not have to write in other frameworks. We shall see how I feel at the end of the month. I might really hate it.
Something I did notice: Drupal has a *LOT* of information on the Web. Mostly with a version of Drupal that is not 7.x. Stay away from it, IMHO. it’s better to read 7.x-specific stuff than be mislead by old docs.
Stay tuned to this space. I’ll post more of my Drupal adventures in the coming days.