php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77083 Fatal error: Access to stat is denied because its trying to access restricted
Submitted: 2018-10-30 05:56 UTC Modified: 2018-10-30 05:57 UTC
From: vallabh53 at gmail dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5.6.38 OS: Linux
Private report: No CVE-ID: None
 [2018-10-30 05:56 UTC] vallabh53 at gmail dot com
Description:
------------
---
From manual page: https://php.net/function.stat
---
The command stat($file_path) returns the following error. 

Fatal error: Access to stat is denied because its trying to access restricted folders and the PHP Version is 5.6.31. Where as the same script works in the other server with lower versions of php.

Test script:
---------------
<?php
$filedata = stat('/vhosts/day107_18110/robots.txt');

Expected result:
----------------
It should return file information

Actual result:
--------------
Getting below fatal error:
Fatal error: Access to stat is denied because its trying to access restricted folders 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-30 05:57 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2018-10-30 05:57 UTC] requinix@php.net
Contact your hosting provider.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 10:01:35 2025 UTC