PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Suggestion: Fix time out issue - Variable confliction

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

  • Suggestion: Fix time out issue - Variable confliction

    Hi,

    I know this issue seems to rarely affect people but I just had the problem when implementing Zoom search into my WordPress template. Took me a long time to figure out but I found the fix on another thread that works well which you can find here:

    http://www.wrensoft.com/forum/archiv...hp/t-3081.html

    The issue causes the page with the search box to hang as the page loads then it times out with the error

    Fatal error: Maximum execution time of 30 seconds exceeded in .....\search\search.php on line 330


    I can't use the auto FTP upload feature because it creates the bad search.php. So that would be nice if it was fixed. But I know its rare so just letting you know in in case it slipped through the cracks.

    Thanks

  • #2
    So you've stuck "search.php" within another PHP function as described in that other thread? As mentioned, this was not really intended usage, and I wonder if there's a better alternative than this approach. But it's hard for me to know without seeing the context. I don't think the suggested method of making every variable "global" is a good idea, for security and code safety.

    Originally posted by sherbert99 View Post
    I can't use the auto FTP upload feature because it creates the bad search.php.
    Do you mean that you have a customized "search.php" script, that you do not want to have overwritten by the default script generated by Zoom on re-indexing?

    If that's the case, you should simply have your customized script in a different folder on your computer, and point to it via "Configure"->"Advanced"->"Custom script source path". Save this config, then from now on, future re-indexing and re-uploads will be using your modified "search.php" script, and not the default one, for this particular .zcfg configuration.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Sorry it's been a while I missed your reply.

      Yeah I used the "search.php" from that other thread.

      Good idea on the alternate FTP upload. And that is true it can be a security issue.

      Here is a working example of the error in case you ever want to investigate it. It will hang for a bit but just wait for it to time out.
      http://tinyurl.com/k8fpxvp



      Thanks

      Comment


      • #4
        Not really a "working" example, I'm seeing a long list of warnings like so:
        http://petstress.net/propane/search/?zoom_query=propane&submit=Search

        Warning: fseek() expects parameter 1 to be resource, null given in/home/content/18/12518418/html/search-data/propane/search.php on line 1076

        Warning: fgets() expects parameter 1 to be resource, null given in/home/content/18/12518418/html/search-data/propane/search.php on line 1077

        Warning: fread() [function.fread]: Length parameter must be greater than 0 in/home/content/18/12518418/html/search-data/propane/search.php on line 783
        As you mentioned you have inserted the search.php code into another page (with different scripting), it's not possible for us to debug as it is now modified from the supported usage. The errors above seem to be caused by this. Likely because the files are now in a different folder than the index files.

        If I go to the original search page directly, there are none of these errors.
        http://petstress.net/search-data/propane/search.php?zoom_query=propane&submit=Search
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Oh OK I thought you wanted the broken version to see the errors. That last link is what happens if I use the original (non modified) files that Zoom search generates. (When used within Wordpress) But like you showed when you go to the "original search page directly" it works fine. So I think Wordpress is maybe overtaking a variable somewhere.

          This link is how it works OK when I use the modified version of the code.
          http://tinyurl.com/kpen9u3


          I'm pretty sure if you have a test server and you just install Zoom Search within the the Wordpress TwentyThirteen theme you will see it gives that error if you try to use the search within a Wordpress theme. Wordpress 3.8.1 does it for sure, I assume any Wordpress version after that would to.


          Thanks

          Comment


          • #6
            Thanks for the additional detail.

            We'll have to investigate it further with the latest WordPress release.

            Once we get the upcoming V7.0 public release out the door, we hope to prepare a solution (either in the form of documentation / tutorial, or a plugin) that would integrate with the latest WordPress.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              OK sounds good.

              Thanks

              Comment

              Working...
              X