Categories
Burningbird Technology Weblogging

My first attempt at Drupal 7 upgrade fails

I made my first attempt to use the new Drupal 7 beta to upgrade my existing module experiment site. Unfortunately, I quickly ran into a fatal error:

DatabaseSchemaObjectExistsException: Table cache_path already exists. in DatabaseSchema->createTable() (line 621 of /home/myname/public_html/books/includes/database/schema.inc).

I submitted a bug for the error at the time it happened. Checking back later, though, I couldn’t find the bug. I assumed I had mucked it up somehow when submitting, so re-submitted it. However, when I checked a couple of minutes later, I couldn’t find the second bug. I noticed then that when you access My Issues, it only shows open bugs. When I adjusted to show all bugs, I found that my bugs had been quickly closed out by someone saying they were duplicates of another.

I can understand the enthusiasm the developers have with wanting to close out bugs quickly, but unfortunately, my bug was not a duplicate of the bug so noted. What caused the problem, though, is known, but the error message I received was inaccurate.

Drupal 7 is dependent on the PHP Data Objects (PDO) extension that is now in PHP core. Previously, we could add PDO via PECL—the PHP Extension Community Library. However, the PECL PDO is out of date and Drupal 7 now only supports the core PDO.

One problem with this, though, is that cPanel, the site management tool popular with many Shared Hosting companies, disabled PHP core PDO because of compatibility issues. It’s only been recently that the application has stopped disabling PDO, but hosting companies like mine are still in the process of upgrading to the PHP core PDO. Until these companies make this upgrade, we can’t upgrade to Drupal 7.

The problem is further compounded by the fact that the Drupal 7 upgrade doesn’t test for the appropriate version of PDO, and we get bizarre errors such as the one I described earlier. Luckily, there is now a patch, which I ended up testing yesterday and that should give people the appropriate error. The problem with it, though, is that it recommends people check out the requirements page for Drupal, which, among other things, informs people that they can install PDO with PECL.

screenshot of Drupal requirements page with PECL PDO instruction highlighted

Hopefully, the disconnects will soon be corrected, and most folks are in environments where the PDO is from PHP core, rather than PECL. I was impressed at how fast everyone did jump on this after the initial duplicate bug mistake was discovered. Once the patch is in place, and the documentation updated, people will at least now know why they can’t upgrade and can chat with their hosting provider about the necessary upgrade.

Until my own shared environment is upgraded, though, I’ll have to stay in 6.x land. Many thanks to Everett Zufelt for his help in pulling all the Drupal pieces together for me.

Print Friendly, PDF & Email