FreeBSD 12 下

apache 2.4
ee /usr/local/etc/apache24/httpd.conf
<Directory />

AllowOverride None 改为 AllowOverride All

</Directory>
重启 apachectl restart

如果 .htaccess
php_flag display_errors on
报500错误了,查看apache的error_log找到了如下的错误信息:
.htaccess: Invalid command ‘php_flag’, perhaps misspelled or defined by a module not included in the server configuration
是suPHP的问题,写另外一个文件”.user.ini”
error_reporting = E_ALL
display_errors = On
更改过”.user.ini”要重启php-fpm生效
#/usr/local/etc/rc.d/php-fpm restart

https://www.php.net/manual/zh/configuration.file.per-user.php

One Comment

  • David

    更改”.user.ini”是过几分钟生效,不是立即,php-fpm间隔扫描

Leave a Reply