Вопрос

I'm using laravel and thus require the command line to run artisan commands.

When doing so, php gives me the following errors:

"Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/json.so' - dlopen(/usr/local/zend/lib/php_extensions/json.so, 9): no suitable image found.  Did find:
    /usr/local/zend/lib/php_extensions/json.so: mach-o, but wrong architecture in Unknown on line 0"

When checking "which php" it points to the right version (of zend server) as I've added that to my path variable.

which php
/usr/local/zend/bin/php

Any idea what can be done to solve this?

Это было полезно?

Решение

Ok, what I did was the following:

edit /usr/local/zend/etc/conf.d/json.ini and comment out the line that loads the json.so file

PHP doesn't throw errors at that point.

JSON support still seems enabled as far as I can see.

php -i | grep "json support"
json support => enabled
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top