php - 通过 .htaccess 设置日志目的地
问题描述
我想通过 .htaccess 设置错误日志目标
目录
michael@michael:/var/www/html$ ls -la
total 1492
drwxr-xr-x 2 root root 4096 дек 9 14:08 .
drwxr-xr-x 3 root root 4096 сен 13 15:23 ..
-rw-r--r-- 1 root root 153 дек 9 14:08 2.php
-rw-r--r-- 1 root root 235 дек 9 14:08 .htaccess
.htaccess
DirectoryIndex index.php
# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
# enable PHP error logging
php_flag log_errors on
php_value error_log /var/tmp/PHP_errors.log
2.php
<p>Test</p>
<?php
phpinfo();
$message = "Trololo";
$destination = "/var/tmp/my-errors.log";
error_log ( $message, 3, $destination );
?>
结果:当我输入 URL http://localhost/2.php 时,在显示的 php 设置中:
error_log no value
我可以做些什么来调查这个问题?
解决方案
推荐阅读
- database - 如果需要独立查询数据,是否应该对 NoSQL (dynamodb) 表进行非规范化?
- mongodb - MongoDB 使用 Meteor 应用程序运行缓慢。查询慢,查询太多,同一用户有多个连接
- azure-active-directory - userPrincipalName 不能用于查询 Graph
- html - 将鼠标悬停在一个 div 上使另一个消失
- javascript - 当材质为 MeshPhongMaterial 时,无法在使用 Three.js 绘制的圆环中着色
- sql - 从 Oracle 循环输出变量结果
- visual-studio-mac - Xamarin.UITest 2.2.4 启动会话在第一次测试中失败
- jquery - 每个使用 jQuery 移动文本块
- movesense - movesense 设备上 Accel/Mag/Gyro 的轴定位
- javascript - 如何阻止或删除第三方 cookie