Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After upgrading my Mac to Mavericks I've had a few small issues with machine, most of which I've resolved, however when I try to run PHP scripts at the command line I'm not getting these warnings...

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/yaml.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/yaml.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/apc.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/apc.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/intl.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/intl.so, 9): image not found in Unknown on line 0

The directory /usr/lib/php/extensions/no-debug-non-zts-20100525/ exists, but there is only xdebug.so & mcryt.so files in there.

I tried installing the yaml extension using pecl but it says it's already installed.

If I run sudo php -a rather than php -a then the other errors go away. What permissions do I need to set on what folder to get this working for non-admin accounts?

share|improve this question
    
Hi Toby. Are the extensions loaded when you sudo up the command? ie Show up in sudo php -m –  Anthony Sterling Nov 4 '13 at 11:50
    
Hi @AnthonySterling, the list of modules appears to be the same for both sudo, & non-sudo calls... gist.github.com/ToGri/0ce1d4b9ec437171eaab –  TobyG Nov 5 '13 at 16:15

2 Answers 2

Run this command:

diff /etc/php5/apache2/php.ini /etc/php5/cli/php.ini

or

find /etc/* -name php.ini
diff /etc/.../apache2/php.ini /etc/.../cli/php.ini

Maybe there is some difference that gives you the answer.

share|improve this answer
    
Nope. Just the one file used for both... $ diff /etc/php5/apache2/php.ini /etc/php5/cli/php.ini diff: /etc/php5/apache2/php.ini: No such file or directory diff: /etc/php5/cli/php.ini: No such file or directory $ find /etc/* -name php.ini /etc/php.ini –  TobyG Nov 7 '13 at 15:22

What's going on is that the error is conflicting with PHP versions. You must have had extensions leftover from a previous install of PHP.

What you can do is remove the ext-intl.so file from your older version of php. What I did was copy over the contents (chances are it's only extension='/usr/local/Cellar/php55/phpx/) to my php.ini file, comment those options out, and then remove the ext-intl.so files, fixing this issue.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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