If Drupals $db_url is defined as an array instead of a string (see http://drupal.org/node/18429 & default the case in the PressFlow distribution) _webform_mysql_views_check_requirements() produces a segmentation fault. Attached patch fixes this problem, enabling both array and string based $db_urls.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1027618-requirements.patch | 4.48 KB | cafuego |
| #1 | webform_mysql_views.db_url.2.patch | 1.07 KB | robin van emden |
| webform_mysql_views.db_url.patch | 501 bytes | robin van emden |
Comments
Comment #1
robin van emden commentedMissed one $db_url there. This patch should catch 'em all.
Comment #2
cafuego commentedI just hit this problem as well. I wonder if it's a good idea to modify the global $db_url in the middle of code execution. Wouldn't it be better to use a temp variable, like so?
It probably wouldn't hurt to implement this in hook_requirements and just refuse to install if it's not MySQL. I'll do a patch.
Comment #3
cafuego commentedAttached is a patch that moves the requirements check to
hook_requirements()in the install file and happily copes with $db_url being an array.For the record, this original code actually does exactly nothing, as
variable_set()doesn't return anything.Since the module now won't install at all unless its requirements are met, I've removed all reference to the webform_mysql_views_meets_reqs variable. Apart from in
hook_uninstall()Comment #4
robin van emden commentedNice. Tested patch, works.
Comment #5
cafuego commentedPatch from comment #3 ported to the latest git version and applied to 6.x-1.x-dev.
Comment #6
nemanja commentedIs there a fix for drupal 7 version?
Comment #7
cafuego commentedIt doesn't offhand look as if this was ever a problem for the D7 version, it directly queries the current database connection, as opposed to looking at what's in settings.php.
Is your Drupal segfaulting on the requirements check?