Menu

error-Warning: main(Snoopy.inc.php):

Help
ozcamman
2004-10-16
2013-05-30
  • ozcamman

    ozcamman - 2004-10-16

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

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

    below is the code
    <?php
    require("Snoopy.inc.php"); 
    $snoopy = new Snoopy();
    $snoopy->fetch("http://www.thedogs.co.uk/");
    print $snoopy->results;
    ?>
    cheers..

     
    • Gene Wood

      Gene Wood - 2004-10-16

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

      Where is Snoopy.inc.php 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

      <?php
      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 Snoopy.inc.php..?
        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\rss_fetch.inc 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)

      Lennart

       
    • Brent Rigsby

      Brent Rigsby - 2004-11-05

      I was havint the same problem

      You have 2 options

      Change Snoopy.class.php to Snoopy.class.inc

      OR

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

       
    • Anonymous

      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/xxx...xxx/Snoopy.class.php): failed to open stream: No such file or directory in /home/xxx...xxx/netlib.php on line 3

      Warning: main(): Failed opening '/home/xxx...xxx/Snoopy.class.php' 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.