Results 1 to 4 of 4

Thread: "Failed to open stream No such file or directory" error in PHP

  1. #1
    Join Date
    May 2009
    Posts
    18

    "Failed to open stream No such file or directory" error in PHP

    I am getting "Failed to open stream No such file or directory" in PHP can some one help me fix this error ?

  2. #2
    Join Date
    Dec 2008
    Posts
    99

    Re: "Failed to open stream No such file or directory" error in PHP

    This error occurs when you attempt to access any function be it a file or folder that does not exist.

    Delete the line containing the problem if it is not essential to the script.
    If we need to test the existence of the file you can use the function file_exists () like this:

    Code:
    <? php 
    if (file_exists ( 'filename.ext')) 
    ( 
    / / code which requires the file here 
    ) 
    >

  3. #3
    Join Date
    Dec 2008
    Posts
    86

    Re: "Failed to open stream No such file or directory" error in PHP

    It is saying that the file/ folder it is trying to open is not exist. Have you checked to make sure the path is correct?

  4. #4
    Join Date
    Dec 2008
    Posts
    98

    Re: "Failed to open stream No such file or directory" error in PHP

    Make sure to set permission to 777, File doesn't exist, spelled wrong, lower/upper case. For a folder you can use the is_dir () like this:
    Code:
    <? php 
    if (is_dir ( 'File')) 
    ( 
    / / code that need the file 
    ) 
    >

Similar Threads

  1. Replies: 3
    Last Post: 31-12-2013, 10:36 AM
  2. chroot error- "No such file or directory"
    By aMADEUS aLLEN in forum Operating Systems
    Replies: 4
    Last Post: 15-01-2011, 07:11 PM
  3. Getting "Converter Failed to Save the File" error message
    By eileeng in forum Windows Software
    Replies: 1
    Last Post: 24-09-2010, 09:53 AM
  4. Error message "crt0.o no such file or directory"
    By Francesca in forum Operating Systems
    Replies: 1
    Last Post: 19-02-2009, 12:34 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,914,303.46281 seconds with 16 queries