error-Warning: main(

  • ozcamman

    ozcamman - 2004-10-16

    I    get these error messages..
    Any help please..
    Warning: main( failed to open stream: No such file or directory in

    Fatal error: main(): Failed opening required '' (include_path='.;..;../..;../../..') in

    below is the code
    $snoopy = new Snoopy();
    print $snoopy->results;

    • Gene Wood

      Gene Wood - 2004-10-16

      It sounds like you haven't put into your php include path.

      Where is located on your server? What directory?

      Also, what is your Include Path? You can determine your include path by creating a small php file like this

      echo phpinfo();

      Browse to the page you've created and look for include_path

      • ozcamman

        ozcamman - 2004-10-18

        the file is in my php includes dir
        and the includes dir is referenced correctly in php.ini
        One thing Im not sure on is the file name..?
        The file I dloaded is called Snoopy.Class..yet the include call is for
        Can you explain this..? Please
        Thanks.. again for your help..

      • srinivas

        srinivas - 2007-03-02

        .:/usr/lib/php:/usr/local/lib/php is my path where should i place this thank you

    • Lennart

      Lennart - 2004-10-17

      I am running a compiled copy of Snoopy.class as part of Magpie on Windows XP under PHP5.
      Here is the invocation:
      function _fetch_remote_file ($url, $headers = "" ) {
          // Snoopy is an HTTP client in PHP
          $client = new Snoopy();

      Here is the error: Fatal error: Class 'Snoopy' not found in C:\apachefriends\xampp\htdocs\xampp\yaba\ on line 261

      Here is the include path:  
      include_path .;c:\apachefriends\xampp\php\pear\

      However, the Class code is loaded because the class binary code is displayed in the browser

      I SCU$   nxc```fpcd`   

      Any ideas of what is wrong? (I have exactly the same error on both Linux and Windows XP)


    • Brent Rigsby

      Brent Rigsby - 2004-11-05

      I was havint the same problem

      You have 2 options

      Change Snoopy.class.php to


      Change include(""); to include("Snoopy.class.php");

    • Anonymous - 2005-03-29

      I have same trouble.
      I'm serving my web at host-agency and the file of "Snoopy.class.php" is included from sub-folder under /home, root.

      Warning: main(/home/ failed to open stream: No such file or directory in /home/ on line 3

      Warning: main(): Failed opening '/home/' for inclusion (include_path='.:/usr/local/php/lib/php') in /home/bada/salon/netlib.php on line 3

      I guess this trouble caused from "php setup" of the host server. right?
      Then my agency can change the setup to solve it?
      If impossible, what should i do?

      Thanks a lot.


Log in to post a comment.