Closed (fixed)
Project:
Glossary
Version:
6.x-1.0-beta4
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
29 Feb 2008 at 23:44 UTC
Updated:
17 Mar 2008 at 18:25 UTC
Jump to comment: Most recent file
On my gentoo linux php is compiled without ctype so glossary fails with error on main page:
Fatal error: Call to undefined function ctype_alnum() in /www/drupal/sites/all/modules/glossary/glossary.module on line 421
Solution:
Either document requirement or add a fallback to regular expressions or something like that if it's possible at all.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | glossary-6.x-1.0-beta4-ctype-requirement-check.patch | 1.44 KB | ruslan_zakirov |
Comments
Comment #1
nancydruHave you asked your host to include it?
Comment #2
nancydruYour host really had to go out of their way to turn this off - http://us.php.net/manual/en/ref.ctype.php
Comment #3
ruslan_zakirov commentedGuys, just document it! It's not a hosting. It's my PC with Gentoo linux where such options are controlled by USE flags. I just recompiled php with USE flag ctype and everything works fine. Problem is that my site was unavailable for while when I enabled this module and was configuring it. Admin interface works just fine, but other things where actual filtering is applied don't. So I had to jump into admin UI to disable module to made site active for end-users while new version of php was being compiled. A little note will help other people avoid such problems.
Comment #4
nancydruFirst, I'm not a guy.
Second, how can I possibly go through every single option that PHP has and document whether or not my modules needs it? Drupal has a minimum required level of PHP 4.3.5. According to the manual:
Third, it is a Drupal standard that if you require something in a module that is above Drupal's minimum, you must code a hook_requirements function to check for it. Then we get back to going through every PHP option... If you'd like to invest the time creating a patch to do that, I will test it and include it if it looks good. Otherwise, I have to mark this as "won't fix."
Comment #5
ruslan_zakirov commentedHi,
Sorry for "guy". Thanks for pointers into the right direction and your valuable feedback, however there are a lot of different OSes out there that may have PHP compiled with different options and sometimes list of built-in features may vary from official defaults. I hope that implementation of requirements checks will help some users avoid problems before enabling this great module. Couldn't agree it's a minor issue and that you shouldn't fix it. There are too many people who couldn't read error messages, debug issues using google, write in any programming languages and do other funny things. With thought that it's better to safe your expensive time I wrote a patch.
It's my first code in php so please find few minutes to cleanup it before applying. Thank you.
Comment #6
nancydruComment #7
nancydru