无法在远程服务器上运行作曲家命令



在远程服务器(VPS)上安装Symfony供应商有问题,因为在服务器管理安装composer库后,当我运行它时,我有PHP致命错误:

PHP Fatal error:  Uncaught ErrorException: proc_close() has been disabled for security reasons in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:957
Stack trace:
#0 [internal function]: ComposerUtilErrorHandler::handle(2, 'proc_close() ha...', 'phar:///usr/loc...', 957, Array)
#1 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(957): proc_close(Resource id #252)
#2 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(753): SymfonyComponentConsoleApplication->getSttyColumns()
#3 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(714): SymfonyComponentConsoleApplication->getTerminalDimensions()
#4 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(648): SymfonyComponentConsoleApplication->getTerminalWidth()
#5 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(127): SymfonyComponentConsoleApplication->renderException(Object(ErrorException), Object(SymfonyComponentConsoleOutputStreamOutput))
#6 p in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 957

PHP 7.3.15memory_limit => 1024M

disable_functions => exec,system,passthru,shell_exec,proc_close,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname => exec,system,passthru,shell_exec,proc_close,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname

也许有人有什么想法?

如果您部署在共享云服务中,由于您的实例可用资源有限,该流程将无法工作。我建议您在开发实例上更新或安装编写器,并将压缩后的文件传输到主机

有多种方法:

  1. 联系您的主机源以允许您。
  2. 从本地推送/部署供应商,不需要运行任何composer命令。

相关内容

  • 没有找到相关文章

最新更新