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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vallabh53 at gmail dot com
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC