Problems encountered by lnmp one-click installation package using thinkphp5

Problem 1: Report 500 error

Reason: lnmp has anti-cross-site settings

Details address: https://lnmp.org/faq/lnmp-vhost-add-howto.html

问题2:scandir() has been disabled for security reasons

Reason: LNMP 0.9 disables some dangerous PHP functions

PHP functions disabled in LNMP0.9 include: passthru, exec, system, chroot, scandir, chgrp, chown, shell_exec, proc_open, proc_get_status, ini_alter, ini_alter, ini_restore, dl, pfsockopen ,openlog, syslog, readlink, symlink, popepassthru, stream_socket_server , fsocket, fsockopen

Solution:
Edit the PHP configuration file in the lnmp environment:

  1. vim /usr/local/php/etc/php.ini enters editing state

  2. Enter /, enter search mode, find disable_functions

  3. Look for the disable_functions string and delete the following scandir

Restart PHP to take effect

lnmp php-fpm restart

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325653509&siteId=291194637