Open MySQL slow query log with PHP

midanolove

New Member
I'm having trouble opening MySQL's slow query log with PHP. I'm writing a debugger and trying to tap into the log file but it's giving me a permission denied message.Code:\[code\]$log = file_get_contents('/var/log/mysql/mysql-slow.log');\[/code\]Response (error):\[code\]Warning: file_get_contents(...): failed to open stream: Permission denied ...\[/code\]I can \[code\]cat\[/code\] the file just fine from a terminal. I've chmoded the log file to 0777 with the same result. Is this operation not allowed while MySQL is running? Are there ways around this?PHP5.2.10, Ubuntu 9.10, MySQL 5.1.37
 
Back
Top