Home » Forum
  • If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Wordpress: Fatal Error

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

  • Wordpress: Fatal Error

    Hi,
    Trying to get my wordpress site to show my search-page properly. When I go to http://walleyebaits.net/search-page/ I get the following error: Fatal error: Call to undefined function virtual() in /home/gil49r/walleyebaits.net/wp-content/themes/ridizain/mysearch.php on line 28

    I think Iíve followed all the steps:

    1) Placed a Zoom folder for the index files in walleyebaits.net root directory
    2) copied my page.php, gave it new template name: mysearch.php.
    3) removed the Loop in mysearch.php and inserted
    <?php
    virtual("http://walleyebaits.net/zoom/search.php");
    ?>
    4) Added new wordpress page: ďSearch PageĒ and selected the mysearch template under Attributes.
    5) The permalink url for the search page is http://walleyebaits.net/search-page/ , but going there gives me the error message..

    BTW, http://walleyebaits.net/zoom/search.php works as it should...

    End result I'm shooting for is a search box on every page that will take folks to .../search-page/, but first things first.

    Not total newbie, I had zoom working fine a couple years ago, but rebuilt site and lost all previous zoom settings.

    Thanks much!

    phil

  • #2
    Have you tried using our WordPress plugin option instead?

    "Call to undefined function virtual()" - Maybe the PHP module for the virtual function is not enabled on your server. You can try to change virtual() to include() or require() instead.

    Comment


    • #3
      Originally posted by Richard View Post
      Have you tried using our WordPress plugin option instead?

      "Call to undefined function virtual()" - Maybe the PHP module for the virtual function is not enabled on your server. You can try to change virtual() to include() or require() instead.
      Hi Richard,

      Thanks for the response. Yes, Iíd tried both include() and require() and got 3 error messages for each. First two stated wrapper disabled or could not be found in server configuration. Third stated Failed opening 'http://walleyebaits.net/zoom/search.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear')

      So, I assume neither works with my hostís server.

      I did try the plugin first, but abandoned it after getting this error on Zoomís setting page in WP: Warning: fopen(http://walleyebaits.net/wp-content/plugins/zoomsearch/zoomsearch.css): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/gil49r/walleyebaits.net/wp-content/plugins/zoomsearch_wpplugin/zoomsearch.php on line 197

      Comment


      • #4
        When using require() or include(), did you also change the path from a URL to a local file path? From the PHP documentation page for include:

        Files are included based on the file path given or, if none is given, the include_path specified. If the file isn't found in the include_path, include will finally check in the calling script's own directory and the current working directory before failing...

        If a path is defined — whether absolute (starting with a drive letter or \ on Windows, or / on Unix/Linux systems) or relative to the current directory (starting with . or ..) — the include_path will be ignored altogether. For example, if a filename begins with ../, the parser will look in the parent directory to find the requested file.
        For the plugin issue, the error is saying that it cannot locate the zoomsearch.css file that should be in the zoomsearch_wpplugin folder. Did you extract all the files when you installed the plugin? Can you verify that it does indeed exists and that the WordPress account has correct permissions to access the directory/file.

        Comment


        • #5
          Originally posted by Richard View Post
          When using require() or include(), did you also change the path from a URL to a local file path? From the PHP documentation page for include:

          For the plugin issue, the error is saying that it cannot locate the zoomsearch.css file that should be in the zoomsearch_wpplugin folder. Did you extract all the files when you installed the plugin? Can you verify that it does indeed exists and that the WordPress account has correct permissions to access the directory/file.
          I'm going to have to parse the bit about file path to understand what it means specifically. I don't know much php.

          Regarding the plugin, the css file is in the folder with zoomsearch.php. I don't have real deep knowledge of permissions, but know those files have the same permissions as any of my other plugin files, 644.

          thnx

          Comment


          • #6
            Originally posted by philbu View Post
            Yes, Iíd tried both include() and require() and got 3 error messages for each. First two stated wrapper disabled or could not be found in server configuration. Third stated Failed opening 'http://walleyebaits.net/zoom/search.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear')

            So, I assume neither works with my hostís server.
            I believe your calls are incorrect. You can't pass a URL to require() or include(). They're expecting a local file path, e.g.

            require("zoom/search.php");

            But this has to be relative to the location of the script containing this line. If it is an absolute path, it has to be an absolute local path to the file system on your server.

            Originally posted by philbu View Post
            I did try the plugin first, but abandoned it after getting this error on Zoomís setting page in WP: Warning: fopen(http://walleyebaits.net/wp-content/plugins/zoomsearch/zoomsearch.css): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/gil49r/walleyebaits.net/wp-content/plugins/zoomsearch_wpplugin/zoomsearch.php on line 197
            Likewise here, this implies you are specifying a URL somewhere when you should be giving a file path.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              Originally posted by Ray View Post
              I believe your calls are incorrect. You can't pass a URL to require() or include(). They're expecting a local file path, e.g.

              require("zoom/search.php");

              But this has to be relative to the location of the script containing this line. If it is an absolute path, it has to be an absolute local path to the file system on your server.

              Likewise here, this implies you are specifying a URL somewhere when you should be giving a file path.
              Hi Ray,

              I seem to have gotten the plugin to work now, so that's a good thing.

              However, there is still the error message on the plugin settings page, right above the CSS Styling box:

              Warning: fopen(http://walleyebaits.net/wp-content/plugins/zoomsearch/zoomsearch.css): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/gil49r/walleyebaits.net/wp-content/plugins/zoomsearch_wpplugin/zoomsearch.php on line 197

              You suggested this error implied I'm specifying a url somewhere. Where would that be?

              thnx

              Comment


              • #8
                turns out it was looking for the css file in a folder called zoomsearch in the plugins folder. well, that folder is actually called zoomsearch_wpplugin. so, i fixed that on line 197 and the error message is gone. i'm lost as to why that happened, no doubt my fault screwing around. appreciate the help, would still rather achieve search without using a plugin, but i'll revisit another time. i do like the product : )

                Comment


                • #9
                  change:
                  Code:
                  <?php virtual("http://walleyebaits.net/zoom/search.php"); ?>
                  to:
                  Code:
                  <?php require_once("http://walleyebaits.net/zoom/search.php"); ?>
                  Sr. Analyst

                  Comment

                  Working...
                  X