作者:佚名 时间:2024-07-02 09:27:49 阅读:(3)
今天在使用composer安装一个Laravel项目的扩展的时候,提示:proc_get_status() has been disabled for security reasons,接下来云梦编程为大家介绍一下解决方法,有需要的小伙伴可以参考一下:
[root@localhost wizard]# composer install --prefer-dist --ignore-platform-reqs [ErrorException] proc_get_status() has been disabled for security reasons PHP Fatal error: Uncaught ErrorException: proc_get_status() has been disabled for security reasons in phar:///usr/local/bin/composer/vendor/symfony/process/Process.php:1279 Stack trace: #0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'proc_get_status...', 'phar:///usr/loc...', 1279, Array) #1 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(1279): proc_get_status(Resource id #324) #2 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(700): Symfony\Component\Process\Process->updateStatus(false) #3 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(752): Symfony\Component\Process\Process->isRunning() #4 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(167): Symfony\Component\Process\Process->stop(0) #5 [internal function]: Symfony\Component\Process\Process->__destruct() #6 {main} thrown in phar:///usr/local/bin/composer/vendor/symfony/process/Process.php on line 1279 Fatal error: Uncaught ErrorException: proc_get_status() has been disabled for security reasons in phar:///usr/local/bin/composer/vendor/symfony/process/Process.php:1279 Stack trace: #0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'proc_get_status...', 'phar:///usr/loc...', 1279, Array) #1 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(1279): proc_get_status(Resource id #324) #2 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(700): Symfony\Component\Process\Process->updateStatus(false) #3 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(752): Symfony\Component\Process\Process->isRunning() #4 phar:///usr/local/bin/composer/vendor/symfony/process/Process.php(167): Symfony\Component\Process\Process->stop(0) #5 [internal function]: Symfony\Component\Process\Process->__destruct() #6 {main} thrown in phar:///usr/local/bin/composer/vendor/symfony/process/Process.php on line 1279
默认安装的PHP一些函数是没有默认开启的,我们需要的函数是proc_get_status
vim /usr/local/php/etc/php.ini
找到“disable_functions”,对应的时候是没有开启的一些函数,找到我们需要的“proc_get_status”,删掉,然后重启php的服务
service php-fpm restart
以上就是云梦编程为大家介绍的关于proc_get_status() has been disabled for security reasons的解决方法,了解更多相关文章请关注云梦编程网!