PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Result list error:fgets() & fseek(): supplied argument is not a valid stream resource

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Result list error:fgets() & fseek(): supplied argument is not a valid stream resource

    I have a licenced zoom standard edition v5.1 (Build 1002) and have spent quite a number of hours checking that I have configured zoom properly and installed it properly onto my server (php). I have embedded the search.php into my customised search page but when I conduct a search, the search seems to find the results (or none if it is not a match) but I get the listing as copied below for each match. I have dynamically generated pages using php.

    I have not edited either the search.php or settings.php files.

    Can anyone please give me an answer as to what is going on? I found a similar post at "http://www.wrensoft.com/forum/showthread.php?t=2017" but it didn't seem to apply to my situation.

    Thanks in anticipation

    Ric Easton

    Search results for: cacao

    1 found.

    Warning: fseek(): supplied argument is not a valid stream resource in C:\xampp\htdocs\WebSites\biodistributors\zoom\sear ch.php on line 627

    Warning: fgets(): supplied argument is not a valid stream resource in C:\xampp\htdocs\WebSites\biodistributors\zoom\sear ch.php on line 628
    1.
    Terms matched: 1 - Score: 11 - 108k - URL:

  • #2
    I have a licenced zoom standard edition v5.1 (Build 1002) and have spent quite a number of hours checking that I have configured zoom properly and installed
    You should install the latest relese to start with, V5.1 build 1017. There have been a fair number of changes since 1002. It is a free upgrade.

    It might be that you have failed to upload some the required files to the server. e.g. the zoom_pagedata.zdat file. As you get this error when a file could not be opened (either becuase of permissions or the file doesn't exist).

    Was this working the past on this server and then suddenly stopped? Or did it never work?

    Comment


    • #3
      Thanks for your suggestions.

      All the zoom data files are being generated (and uploaded when I tested on my web server).

      I have upgraded to build 1017 and noticed that the indexing was super fast by comparison - about 100 times or even more faster. (Even to the point I wondered if the indexing was happening properly - but inspecting the contents of the files I can see that the dictionary file seems to contain all the words I would expect but even though all the pages being scanned are listed in the zoom_pagedata.zdat file, a typical entry for a page is:

      http://localhost/WebSites/biodistrib...ct_news.php|No title|keywords||

      even though the pages do have titles and keyword entries in the appropriate header tags.)

      The search is working in that matches are found (or not as the case may be) but the fseek() and fgets() functions in the GetPageData() function of search.php are not receiving the proper $index value.

      The search used to work previously (both before and after I purchased the standard zoom) but I have totally rewritten the way the pages are generated (using php) and this time I am using spider mode to index them.

      I have a server installed (using xampp) on my laptop (Windows XP Home Edition SP3). The same problem occurs when I upload the files to my web hosting server (Apache)

      I suspect it could have something to do with the way I am dynamically generating the pages using php but the output is ok and displayed normally in all the browsers I have tested with.

      Thanks again for your assistance.

      Ric

      Comment


      • #4
        It might be quicker (especially as we are in the same time zone) to E-mail us the set of search files, and an example of one of your pages so we can see the HTML on the page (as generated by your script).

        Comment


        • #5
          Originally posted by ric1950 View Post
          I have upgraded to build 1017 and noticed that the indexing was super fast by comparison - about 100 times or even more faster. (Even to the point I wondered if the indexing was happening properly
          This is likely because it's indexing from the cache. You can turn off cache use from the "General" tab of the Configuration window. You might have had it disabled when you were using the old build.

          Originally posted by ric1950 View Post
          The search is working in that matches are found (or not as the case may be) but the fseek() and fgets() functions in the GetPageData() function of search.php are not receiving the proper $index value.
          I should point out that if you have made ANY changes at all to the search files (which include "settings.php", "search.php" and all the ZDAT files), then you may have broken search functionality. One common scenario we see is people modifying the "settings.php" file and mixing it with files from different sessions. Do not do this, as it will break functionality and corrupt the index. Similarly, with any of the other search files. Even if you don't modify them, do not use files from different sessions and mix them together.

          In regards to the "No title", etc. It would be easiest to confirm if you send us the files as suggested above. But it's worth checking if your <title> tags are within <head> ... </head> tags as required by the HTML standard. If they are outside of the head tags, then they are not valid tags and are ignored by Zoom.
          --Ray
          Wrensoft Web Software
          Sydney, Australia
          Zoom Search Engine

          Comment


          • #6
            All issues have been sorted out. The problem was that the search.php was ending up in a class context which meant that the search.php code was not working as it should (global declarations from within search.php were not relating to the seach.php code but to outside the class context.)
            Thanks to Ray for all his help.

            Comment

            Working...
            X