I need to add an outside path to my apache configuration. (httpd)
so, I made a symlink to this path in my httpd root folder, the path is: /var/log/httpd/ (I want to display logs directly in my projects)
And I can acces all the path by my browser entering: http://127.0.0.1/httpd/
but php throws me an error, when I try to access it from a php file:
code:
function logInfo() {
$log_path = $_SERVER['DOCUMENT_ROOT'] . "/httpd/local.cmp-error_log";
$php_log = file_get_contents($log_path);
print_r ($php_log);
}
error:
[Sun Jul 17 23:45:19.960292 2016] [:error] [pid 19451] [client 127.0.0.1:34718] PHP Warning: file_get_contents(/home/txx/http/www/httpd/local.cmp-error_log): failed to open stream: Operation not permitted in /home/txx/http/www/base_home/config/sys.php on line 8
Wheres the error here?