PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Excellant Program! 1 small error?

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

  • Excellant Program! 1 small error?

    First as a new user I would like to say Great Job! Not only on the program but the software works well also.

    I do have one small problem.
    I get an error something like something() is not an array..line 81
    I turned off error reporting in Search.php to get around this and doesn't seem to cause any problems other than when I turn Highlighting on, it shows variables instead of the search word.. ie. $1$2$3 with the $2 being highlighted.
    This shows up without any editing of any of the files.

    Any ideas.
    Thanks

  • #2
    Can you tell us the exact error message and the search words that prompted the error.

    Can you give use the URL to your search function so that we can see the error.

    What version of Zoom are you using? Can you try the latest build if you aren't using it already.

    If you have been editing the script or other files, can you revert to using the default script and untouched data files.

    If you are using a 3rd party FTP program to upload the files, make sure you using binary mode. Using ASCII mode can corrupt the files.

    -----
    David

    Comment


    • #3
      The warning is
      Warning: Variable passed to each() is not an array or object in /somewhere/rockbottomranch.com/html/test/Search.php on line 81

      Heres a url to a stock(nothing changed) copy.
      http://rockbottomranch.com/test/Search.php

      All files are in same directory, uploaded in Binary with CuteFTP
      You can search for tree or pine or nursery.

      Notice the highlighted variable.

      Heres line 78 - 83 in search.php

      if (get_magic_quotes_gpc() == 1) {
      while (list($key, $value) = each($_GET))
      $_GET["$key"] = stripslashes($value);
      while (list($key, $value) = each($_POST))
      $_POST["$key"] = stripslashes($value);
      }


      The one I have set up works fine but I would like to turn on highlight. This code shouldn,t have anything to do with highlight, I don't think???

      Ah yes, and the version: 4.2 Build 1006.
      Just got it yesterday so it should be a newer version.

      Thanks
      Chuck

      Comment


      • #4
        We will have a deeper look at why this is happening but here is a quick fix.

        _POST is not actually used and it is safe to delete the following two lines.

        while (list($key, $value) = each($_POST))
        $_POST["$key"] = stripslashes($value);

        This should fix the warning message.

        No one else has reported this problem. I am guessing that you are seeing this message becuase the PHP installation on your server has 'Magic quotes' turned on. Which is unusual. So other solution would be turn off 'Magic quotes' if you have control over the server.

        The highlighting problem might also be related to the PHP 'Magic quotes' setting. But I still suspect you are using a modified version of our script. I can't see your script of course, but I can see that it doesn't have the same name as our script?

        ------
        David

        Comment


        • #5
          Hi David,
          I think you are probably right about the server. I've had problems there also with unsupported function calls in small scripts I've written for php, but they work on my home server. I'll be moving hosts in a few days so I'll see what it does then. The different file name is caused by me saving it to a floppy then changing machines to upload I think.By the time I move and upload, the name gets changed. At first it was in all caps so I renamed it back to small caps. Now it caps the first letter so I left it the way it was to test it for this demo and see if it made any difference.

          Thanks for your help and I'll let you know what it does when I move servers.
          Chuck

          Comment


          • #6
            We will have a closer look at the Magic quotes issue in any case. In theory the script should work even if this PHP option in turned on.

            ----
            David

            Comment


            • #7
              This problem should now be fixed in the latest build (4.2.1007) released today. You can download this from here:
              http://www.wrensoft.com/zoom/whatsnew.html

              We have tested this to work fine with magic quotes enabled. Let us know if you continue to have any problems.
              --Ray
              Wrensoft Web Software
              Sydney, Australia
              Zoom Search Engine

              Comment

              Working...
              X