В копилку знаний: escapeshellarg() has been disabled for security
-
Делюсь опытом. Однажды при выгрузке товаров, процесс завершался с ошибкой. Полез в логи, смотреть, какая ошибка произошла именно в этот момент. Там такая строчка:
2017/06/20 11:52:17 [error] 309#309: *171454 FastCGI sent in stderr: "PHP message: PHP Unknown Error: escapeshellarg() has been disabled for security reasons in /wp-content/plugins/woocommerce-and-1centerprise-data-exchange/exchange.php on line 332" while reading response header from upstream, client: 77.72.255.198, server: www.ru, request: "GET /wc1c/exchange?type=catalog&mode=import&filename=import.xml HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm-www.sock:", host: "www.ru"
ключевое тут вот это:
PHP message: PHP Unknown Error: escapeshellarg() has been disabled for security reasons
Решается тем, что в php.ini нужно было разрешить функцию escapeshellarg
Эта функция, как я понял, создана для обработки строк с обратным апострофом
в php.ini есть строка:
disable_functions = exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source
оттуда я исключил escapeshellarg
и перезапустил вебсервер.
- The topic ‘В копилку знаний: escapeshellarg() has been disabled for security’ is closed to new replies.