Here is the error in my Apache error log. My site is a Drupal site. Note the misspelling: "htdoscs" instead of htdocs, which is keeping me from including a file.

PHP Warning: include_once(c:/program files/Apache2.2/htdoscs/includes/bootstrap.inc) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in C:\Program Files\Apache2.2\htdocs\sirsifile_read.php on line 195
PHP Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening 'c:/program files/Apache2.2/htdoscs/includes/bootstrap.inc' for inclusion (include_path='.;C:\php5\pear') in C:\Program Files\Apache2.2\htdocs\sirsifile_read.php on line 195
PHP Fatal error: Call to undefined function drupal_bootstrap() in C:\Program Files\Apache2.2\htdocs\sirsifile_read.php on line 196

For the include_once function, I did not give an absolute path. The root in my apache directory is "htdocs" -- as it should be -- not "htdoscs." I have looked in my php.ini file, my settings.php file (Drupal configuration file), my htaccess file and cannot find the misspelling.

From what file does "include_once" derive the path that it uses? How can I sort out this error?

Thanks

spivey

    Can you show us the exact code where include_once() is used?

    Also, do a phpinfo() and show us the (local) values for include_path, doc_root, and _SERVER["DOCUMENT_ROOT"].

    In fact, while you're on that phpinfo() page, do a search for htdoscs and see if you can find any directive with that misspelling.

      include_once('includes/bootstrap.inc');
      drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

      I'm trying to include the bootstrap.inc file, which has lots of Drupal-specific functions.

      There is no "htdoscs" in the phpinfo.

      Local values for:

      include_path: .;C:\php5\pear

      doc_root: C:/Program Files/Apache2.2/htdocs

      _SERVER["DOCUMENT_ROOT"]: C:/Program Files/Apache2.2/htdocs

      I copy/pasted the values from phpinfo results.

      Could it be in the pear?

      thanks

      spivey

        I ran a windows explorer search for "htdoscs", and the only other instance was in a .bash_history document that was part of my cyqwin program.

        This is the line.

        ln -s c:/Program Files/Apache2.2/htdoscs/wpplsandbox c:/Program Files/Apache2.2/htdocs/wpplsandbox/sites/bookconnections

        Did I create this symlink that is now causing me problems?

        The one difference between the above link and the link in my error message, however, is that "Program Files" is not capitalized in the error message.

          Well, of course with Windows, a capitalization difference means next to nothing. Also, since it's Windows, the lack of a tool like grep(1) (at least, a native Windows install won't have any such) might make it a little harder. Tried using the search interface for any file that contains "htdoscs" under the web root?

          Now, as far as the symlink itself. Why create one with a misspelling? Does unlinking and relinking it with the correct spelling fix the issue?

            My search for "htdoscs" was of everything in the root.

            Now, as far as the symlink itself. Why create one with a misspelling? Does unlinking and relinking it with the correct spelling fix the issue?

            I am someone who probably ought not be messing around with tools like Cygwin. :o

            The misspelling was undoubtedly my own. But for the life of me I don't know how to remove the link to see if that is the problem. Hehe. ⭕o

            How can you remove any and all symbolic links?

            spivey

              9 days later

              Well, unlink(1) is the Nixen-like command to remove a link, but rm(1) works fine, too. AAMOF, they're identical on my system. In either case, I'm assuming you've adequate permissions, of course.

              In windows, that's "del" IIRC. 🙂 As for "any and all", that's a job for find(1) in Unix. Being less than a total Unix Guru(tm) myself, I'd likely pipe it to xargs(1) and thence rm(1), but again IIRC, find(1) takes a "-delete" option. In Windows, I guess I'd search for "*.lnk" and CTL-A, delete key, etc. Lots of ways to skin a cat.

                I was working on building a multi-site Drupal installation and since I run a windows machine, I found instructions that said I needed to create symbolic links and that cygwin would enable me to do that.

                  Well why not use the built-in tools that come with Windows (however unwieldy they may be) to create the links? For example, "fsutil" allows you to create what Microsoft calls "hardlinks" and "reparsepoints."

                  There are also some cool GUIs such as Junction Link Magic. You might try using Junction Link Magic to search for this "htdoscs" link.

                    I'd never heard of those tools. Hm, Junction Link Magic. I'm on it. Thanks!

                      Write a Reply...