标题就将要做的事情都说清楚了。我已经苦苦挣扎一整天,试图让这个工作起来。我正在创建基于PHP的登录系统,需要进行一些调试。对我最有用的是能够在PHP程序的特定点将调试信息写入文件的能力。根据文档,error_log()
应该能够实现这一点,但尽管我尝试了所有方法,我仍然完全没有成功。我尝试的所有内容的完整列表如下:
Added the following to
/etc/php/7.0/apache2/php.ini
error_reporting = E_ALL display_errors = On log_errors = On
Additionally, tried setting
error_log
to locations within/usr/
,/var/www/http/
, and/home/
Used
ini_set()
anderror_reporting()
to set all of those variables, includingerror_log
from within a PHP fileManually creating the files that are supposed to be written to, and setting their owning user and group to
www-data
and their permissions to 777Last but not least, reinstalling
libapache2-mod-php7.0
andphp7.0
, to no availBasically everything short of using my laptop to break the 3rd story window of my office building immediately prior to jumping to my prospective death
我在谷歌上找不到其他尝试的方法,所以我想问问专家们,于是我来了。如果有人能提供任何建议,将不胜感激。
ps aux
命令时,PHP 显示为在 www-data 用户下运行,但是我们稍后将尝试创建一个文件来检查用户和组。 - Albert Capp