【问题标题】:Shared Hosting proc_get_status has been disabled for security reasons出于安全原因,共享主机 proc_get_status 已被禁用
【发布时间】:2020-01-27 05:10:26
【问题描述】:

我正在尝试将我的 laravel 应用上传到 Cpanel。我把一切都设置好了。但是,它给了我以下错误。

请告诉我如何解决这个问题?

proc_get_status() 出于安全原因已被禁用

【问题讨论】:

标签: laravel shared-hosting


【解决方案1】:

php.ini 在 Cpanel 中禁用的功能中删除 proc_get_status

disable_functions = exec,execl,system,passthru,shell_exec,set_time_limit,escapeshellarg,escapeshellcmd,proc_close,ini_alter,proc_open,dl,popen,show_source,posix_getpwuid,getpwuid,posix_geteuid,posix_getegid,posix_getgrgid,open_basedir,safe_mode_include_dir,pcntl_exec,pcntl_fork,putenv,proc_get_status,proc_nice,proc_terminate,pclose,virtual,openlog,popen,pclose,virtual,openlog,escapeshellcmd,escapeshellarg,dl,show_source,symlink,eval,mail

然后覆盖 Apache Web 服务器中的配置 .htaccess

<IfModule mod_suphp.c>
  suPHP_ConfigPath /home/path/to/public_html
</IfModule>

【讨论】:

  • 感谢您的回答。当我上传其他 Laravel 应用程序时,它运行良好。我在 cpanel 中也找不到 php.ini 文件。
  • 这个答案没有解决在大多数共享主机上,您无法编辑 disable_functions 属性的事实
  • 在 DirectAdmin 中转到 Select PHP version --> options 并编辑 disabled_functions 输入(在我的虚拟主机上从上数第三个)。如上所述删除proc_get-status。不需要覆盖.htaccess 文件。
猜你喜欢
  • 2014-03-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-12-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-06-30
相关资源
最近更新 更多