Closed (fixed)
Project:
Pathauto
Version:
4.7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
11 Apr 2005 at 01:56 UTC
Updated:
30 May 2007 at 16:13 UTC
4.6RC1/Pathauto 4.6
* Installed module
* Activated module
* Friendly URL's, Path module activated.
* Settings/Pathauto used to define path according to example, bulk update setting checked
* Saved Setttings
* Return to Settings/Pathauto gives this error:
Fatal error: Call to undefined function: ctype_alnum() in /htdocs/www/modules/pathauto.module on line 250
Deactivating/Deinstalling - Reinstalling/Reactivating module has no effect, error keeps occurring.
Comments
Comment #1
mikeryanWhat version of php are you running? Note that ctype_alnum() is builtin to versions of PHP >= 4.3.0, and Drupal requires PHP 4.3.3 or greater.
Comment #2
jvincher commentedAh, that explains it then. I'm running 4.3.10, have been running Drupal 4.5.2 problem free for months. Forgive my ignorance but has this requirement been added recently?
Comment #3
jvincher commentedErr, it's late here. What I meant to say is that I should be okay then.
Comment #4
mikeryanYou've got a sufficient version of PHP - looking at the PHP ctype docs, the only reason I can see that ctype_alnum() wouldn't work would be if PHP on your server had been specifically built with the ctype library disabled (but why would anyone do that?).
Comment #5
mikeryanComment #6
jvincher commentedAs a follow up, it was a ctype setting in php.ini. My host allows me to change that settings in their account panel so it was easy. Still odd that they had it turned off by default. Anyway, works like a charm now.
Comment #7
olav commentedI hade the same problem with missing ctype_alnum in my stock SuSE PHP5.0.3. My fix was to add a replacement function to the top of pathauto.module:
Comment #8
Thomas Sewell commentedIf you are using FreeBSD and php5, install the php5-ctype port, i.e. `portinstall -R php5-ctype`.
Comment #9
starbow commentedThanks Thomas, that was a really useful tip!
Comment #10
gregglesIt seems it's safe to simply rely on ctype_alnum() being present in the PHP installation rather than creating our own version of the function. If we do create it, I think the better place would be common.inc
Comment #11
owen barton commentedWith SuSE the package is also named php5-ctype, and can be installed using YAST
Comment #12
gregglesThanks grugnog.
I think we should probably add this to the documentation so that people can find it more easily. I'm marking this as assigned to me and related to documentation to reflect that idea.
Comment #13
gregglesDone: http://drupal.org/node/109904
Thanks grugnog and Thomas Sewell for providing the actual commands/methods to install.
Comment #14
(not verified) commentedComment #15
gregglesfor anyone who had this problem I'd appreciate your testing out this alternative: http://drupal.org/node/134473
I don't have this problem so I really appreciate getting other folks to test it.