0

I've installed drush on ubuntu 14.04 apparently successfully but attempting to use drush within my drupal 7 app yields this:

PHP Fatal error: Call to undefined function ctype_alnum() in /home/sam/.phpbrew/php/php-5.4.34/lib/php/drush/includes/command.inc on line 896

OK, I'm still new at PHP but apparently my php 5.4.34 installed via phpbrew is calling it? From reading about this function on PHP I see that it's part of PHP 5.4. That said, it does not show up in my phpinfo() page. Looking around the web the few times I see this as an issue seems an issue with certain modules. My code using the drush installed on OS X shows no problems so perhaps it's not my code?

Ubuntu didn't seem to report errors on install and I'm not sure if I need to install some extension to my php or if there's something wrong with my code. Help me see where I need to fix this? thx, sam

  • However you view it, I think this is off-topic, as it primarily relates to PHP, and not Drupal. More specifically, it appears to be related to how phpbrew compiles your php binary, so not even the Ubuntu packages are relevant. I'm voting to close, but FWIW, phpbrew docs indicate the solution might be phpbrew ext install ctype – Letharion Jan 26 '15 at 16:59
  • Again, FWIW, if you don't have need for a specific/ multiple versions of PHP at the same time, consider just installing the official ubuntu packages which do come with ctype support out of the box. – Letharion Jan 26 '15 at 17:01
  • Hmm, I searched the phpbrew page for that, but there it is: ctype. Thx for seeing what I failed to see earlier. I'd be grateful you would put this as the answer so I can accept it. – sam452 Jan 26 '15 at 17:07
  • Ok, answered. :) Glad I could help. – Letharion Jan 26 '15 at 17:10
0

PHPBrew must be disabling ctype by default.

Try explicitly installing the extension with phpbrew ext install ctype

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.