Mantis - php5_ctype
Viewing Issue Advanced Details
4977 regular use major always 2012-07-12 04:30 2012-07-25 05:08
lsiden  
 
normal  
closed  
fixed  
none    
none  
0004977: Fatal error: Call to undefined function ctype_digit()
php5 was compiled with '--enable-ctype=shared' (see attached), yet this simple script will throw a fatal error:

<? echo ctype_digit("1");
$ pkgutil -c |grep php
You're not root and didn't set -W, using home dir.
CSWap2-modphp5 5.3.10,REV=2012.03.24 SAME
CSWap2modphp5 5.3.10,REV=2012.03.24 SAME
CSWphp5 5.3.10,REV=2012.03.24 SAME
CSWphp5-calendar 5.3.10,REV=2012.03.24 SAME
CSWphp5-ctype 5.3.10,REV=2012.03.24 SAME
CSWphp5-curl 5.3.10,REV=2012.03.24 SAME
CSWphp5-dev 5.3.10,REV=2012.03.24 SAME
CSWphp5-gd 5.3.10,REV=2012.03.24 SAME
CSWphp5-json 5.3.10,REV=2012.03.24 SAME
CSWphp5-ldap 5.3.10,REV=2012.03.24 SAME
CSWphp5-mbstring 5.3.10,REV=2012.03.24 SAME
CSWphp5-mcrypt 5.3.10,REV=2012.03.24 SAME
CSWphp5-mysql 5.3.10,REV=2012.03.24 SAME
CSWphp5-mysqli 5.3.10,REV=2012.03.24 SAME
CSWphp5-openssl 5.3.10,REV=2012.03.24 SAME
CSWphp5-pdo 5.3.10,REV=2012.03.24 SAME
CSWphp5-pdomysql 5.3.10,REV=2012.03.24 SAME
CSWphp5-readline 5.3.10,REV=2012.03.24 SAME
CSWphp5-session 5.3.10,REV=2012.03.24 SAME
CSWphp5-tidy 5.3.10,REV=2012.03.24 SAME
CSWphp5-zip 5.3.10,REV=2012.03.24 SAME
CSWphp5calendar 5.3.10,REV=2012.03.24 SAME
CSWphp5ctype 5.3.10,REV=2012.03.24 SAME
CSWphp5curl 5.3.10,REV=2012.03.24 SAME
CSWphp5devel 5.3.10,REV=2012.03.24 SAME
CSWphp5gd 5.3.10,REV=2012.03.24 SAME
CSWphp5json 5.3.10,REV=2012.03.24 SAME
CSWphp5ldap 5.3.10,REV=2012.03.24 SAME
CSWphp5mbstring 5.3.10,REV=2012.03.24 SAME
CSWphp5mcrypt 5.3.10,REV=2012.03.24 SAME
CSWphp5mysql 5.3.10,REV=2012.03.24 SAME
CSWphp5mysqli 5.3.10,REV=2012.03.24 SAME
CSWphp5openssl 5.3.10,REV=2012.03.24 SAME
CSWphp5readline 5.3.10,REV=2012.03.24 SAME
CSWphp5session 5.3.10,REV=2012.03.24 SAME
CSWphp5tidy 5.3.10,REV=2012.03.24 SAME
CSWphp5zip 5.3.10,REV=2012.03.24 SAME
CSWphpmyadmin 3.4.7.1,REV=2011.11.13 SAME
txt file icon php-i.txt [^] (22,340 bytes) 2012-07-12 04:30
Issue History
2012-07-12 04:30 lsiden New Issue
2012-07-12 04:30 lsiden File Added: php-i.txt
2012-07-12 15:24 bwalton Note Added: 0010021
2012-07-12 16:10 lsiden Note Added: 0010022
2012-07-25 05:08 bwalton Note Added: 0010053
2012-07-25 05:08 bwalton Status new => closed
2012-07-25 05:08 bwalton Resolution open => fixed

Notes
(0010021)
bwalton   
2012-07-12 15:24   
I think you'll need to add extension=ctype.so to php.ini. It's not there in the default config so it doesn't get enabled at install time...I guess it's normally built in statically?

I'll arrange for the default php.ini to include a commented out line for this module so it should work cleanly in the future.

If the above doesn't help you, let me know.
(0010022)
lsiden   
2012-07-12 16:10   
"extension=ctype.so" fixed it, thanks. The PHP docs said that it should be a built-in function, but I guess I should have paid attention to phpinfo() saying "--enable-ctype='shared'", meaning it needs to load the .so.
(0010053)
bwalton   
2012-07-25 05:08   
The recipe has been updated to ensure that ctype.so is listed as an extension in the default php.ini file.