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.

Comments

nancydru’s picture

Priority: Normal » Minor
Status: Active » Postponed (maintainer needs more info)

Have you asked your host to include it?

nancydru’s picture

Your host really had to go out of their way to turn this off - http://us.php.net/manual/en/ref.ctype.php

ruslan_zakirov’s picture

Guys, 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.

nancydru’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

First, 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:

Beginning with PHP 4.2.0 these functions are enabled by default...

The windows version of PHP has built in support for this extension.

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."

ruslan_zakirov’s picture

Version: 6.x-1.0-beta3 » 6.x-1.0-beta4
StatusFileSize
new1.44 KB

Hi,

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.

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Closed (won't fix) » Fixed
nancydru’s picture

Status: Fixed » Closed (fixed)