Twilio pear模块不会安装在Cent OS 6.5上

I've come across multiple instances of the Twilio pear module failing to install on Cent OS 6.5

This is the error we are getting and we are able to install other pear modules:

pear install twilio/Services_Twilio

Notice: Array to string conversion in PEAR/REST/13.php on line 80 PHP Notice: Array to string conversion in /usr/share/pear/PEAR/REST/13.php on line 80

Warning: Invalid argument supplied for foreach() in PEAR/REST/13.php on line 84 PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/REST/13.php on line 84 PHP Fatal error: Cannot use string offset as an array in /usr/share/pear/PEAR/REST/10.php on line 263

Anyone have any ideas on how to fix this? I believe it is something Twilio needs to fix since I can replicate this issue on every Cent OS 6.5 server I've tried.

Have you tried:

After running pear upgrade pear

  • run pear version and verify that you are indeed using the new version.
  • Set the timezone in your php.ini.
  • Run the installation with many -v parameters, e.g. pear install -vvvvvvvvvvvvvvvvv twilio/Services_Twilio

to get more output

Encountered the same issue and requested assistance from Twilio support, although on a Debian based system. They suggested the following workaround and indicated that they were aware of an issue.

pear channel-delete twilio.github.com/pear
pear channel-discover twilio-pear.herokuapp.com/pear
pear install twilio/Services_Twilio