Help with path issue?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • brett

    #1

    Help with path issue?

    I have a file named Snoopy.class.ph p on my hosted web server in a
    directory called d:\home\ABC.COM \blog\wp-content\plugins \

    A file named dahnielson_mime tex.php references it. However, when
    dahnielson_mime tex.php tries to reference the Snoopy file, I get these

    types of errors:

    Warning: main() [function.includ e]: Failed opening
    './Snoopy.class.ph p' for inclusion
    (include_path=' .;C:\php5\pear' ) in
    d:\home\ABC.COM \blog\wp-content\plugins \dahnielson_mim etex.php
    on line 34

    The person that wrote the Snoopy file tried to help me but it isn't
    going so well. You can see his suggestions here
    http://www.anlak.com/?page_id=66.

    Does any one have ideas on how I can fix this?

    Thanks,
    Brett

  • petersprc@gmail.com

    #2
    Re: Help with path issue?

    Hi,

    You might try using:

    require_one(dir name(__FILE__) . '\\Snoopy.class .php');
    >From dahnielson_mime tex.php. Issue may be related to the current
    working directory using the PHP ISAPI module? Not sure.

    brett wrote:
    I have a file named Snoopy.class.ph p on my hosted web server in a
    directory called d:\home\ABC.COM \blog\wp-content\plugins \
    >
    A file named dahnielson_mime tex.php references it. However, when
    dahnielson_mime tex.php tries to reference the Snoopy file, I get these
    >
    types of errors:
    >
    Warning: main() [function.includ e]: Failed opening
    './Snoopy.class.ph p' for inclusion
    (include_path=' .;C:\php5\pear' ) in
    d:\home\ABC.COM \blog\wp-content\plugins \dahnielson_mim etex.php
    on line 34
    >
    The person that wrote the Snoopy file tried to help me but it isn't
    going so well. You can see his suggestions here
    http://www.anlak.com/?page_id=66.
    >
    Does any one have ideas on how I can fix this?
    >
    Thanks,
    Brett

    Comment

    • petersprc@gmail.com

      #3
      Re: Help with path issue?

      Maybe it's not an IIS issue.... Don't know! What's your environment?

      petersprc@gmail .com wrote:
      Hi,
      >
      You might try using:
      >
      require_one(dir name(__FILE__) . '\\Snoopy.class .php');
      >
      From dahnielson_mime tex.php. Issue may be related to the current
      working directory using the PHP ISAPI module? Not sure.
      >
      brett wrote:
      I have a file named Snoopy.class.ph p on my hosted web server in a
      directory called d:\home\ABC.COM \blog\wp-content\plugins \

      A file named dahnielson_mime tex.php references it. However, when
      dahnielson_mime tex.php tries to reference the Snoopy file, I get these

      types of errors:

      Warning: main() [function.includ e]: Failed opening
      './Snoopy.class.ph p' for inclusion
      (include_path=' .;C:\php5\pear' ) in
      d:\home\ABC.COM \blog\wp-content\plugins \dahnielson_mim etex.php
      on line 34

      The person that wrote the Snoopy file tried to help me but it isn't
      going so well. You can see his suggestions here
      http://www.anlak.com/?page_id=66.

      Does any one have ideas on how I can fix this?

      Thanks,
      Brett

      Comment

      • petersprc@gmail.com

        #4
        Re: Help with path issue?

        Do you have open_basedir or safe_mode on the host? Maybe that's messing
        w/something.

        brett wrote:
        I have a file named Snoopy.class.ph p on my hosted web server in a
        directory called d:\home\ABC.COM \blog\wp-content\plugins \
        >
        A file named dahnielson_mime tex.php references it. However, when
        dahnielson_mime tex.php tries to reference the Snoopy file, I get these
        >
        types of errors:
        >
        Warning: main() [function.includ e]: Failed opening
        './Snoopy.class.ph p' for inclusion
        (include_path=' .;C:\php5\pear' ) in
        d:\home\ABC.COM \blog\wp-content\plugins \dahnielson_mim etex.php
        on line 34
        >
        The person that wrote the Snoopy file tried to help me but it isn't
        going so well. You can see his suggestions here
        http://www.anlak.com/?page_id=66.
        >
        Does any one have ideas on how I can fix this?
        >
        Thanks,
        Brett

        Comment

        • brett

          #5
          Re: Help with path issue?

          Maybe it's not an IIS issue.... Don't know! What's your environment?

          I'm new to PHP. What in particular do you mean by environment? I'm on
          a hosted machine so I'll probabably have to call and get those answers.
          Unless there is another way to do it.
          You might try using:

          require_one(dir name(__FILE__) . '\\Snoopy.class .php');
          >From dahnielson_mime tex.php. Issue may be related to the current
          working directory using the PHP ISAPI module? Not sure.
          What code do I substitute for the above?

          Thanks,
          Brett

          Comment

          • Jerry Stuckle

            #6
            Re: Help with path issue?

            brett wrote:
            >>Maybe it's not an IIS issue.... Don't know! What's your environment?
            >
            >
            I'm new to PHP. What in particular do you mean by environment? I'm on
            a hosted machine so I'll probabably have to call and get those answers.
            Unless there is another way to do it.
            >
            >
            >>>You might try using:
            >>>
            >> require_one(dir name(__FILE__) . '\\Snoopy.class .php');
            >>>
            >>>>From dahnielson_mime tex.php. Issue may be related to the current
            >>>working directory using the PHP ISAPI module? Not sure.
            >
            >
            What code do I substitute for the above?
            >
            Thanks,
            Brett
            >
            Brett,

            This is entirely system dependent. You need to point to the file where
            you loaded it.

            require_once(.. .) (not require_one as you have it above) uses a relative
            or absolute pathname.

            I usually use a path relative to my server root directory. That way I
            can move it and not need to change any code, i.e.

            require_once($_ SERVER['DOCUMENT_ROOT'] . '/relative/path/to/file.ext');


            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            • josh.23.french

              #7
              Re: Help with path issue?

              @Brett:
              It looks like the files are in the same directory - if that's the case,
              then just use the following code:

              require_once("./Snoopy.class.ph p");

              Comment

              • brett

                #8
                Re: Help with path issue?

                You might try using:
                >
                require_one(dir name(__FILE__) . '\\Snoopy.class .php');
                If I replace the include line with the above, I get this:

                Fatal error: Call to undefined function require_one() in
                d:\home\ABC.COM \blog\wp-content\plugins \dahnielson_mim etex.php on line
                37

                Comment

                • brett

                  #9
                  Re: Help with path issue?

                  require_once($_ SERVER['DOCUMENT_ROOT'] . '/relative/path/to/file.ext');

                  I used this and it worked perfect. Thanks.

                  Comment

                  • josh.23.french

                    #10
                    Re: Help with path issue?

                    @Brett:

                    Have you tried deactivating and removing the plugin and starting over?
                    Did you create the wp-content/cache directory?

                    I just installed this plugin on my local copy of wordpress 2.0.3 and it
                    worked perfectly after i created the cache directory.

                    I used the modified version of the plugin @


                    On Oct 21, 10:37 pm, "brett" <acco...@cygen. comwrote:
                    You might try using:
                    >
                    require_one(dir name(__FILE__) . '\\Snoopy.class .php');If I replace the include line with the above, I get this:
                    >
                    Fatal error: Call to undefined function require_one() in
                    d:\home\ABC.COM \blog\wp-content\plugins \dahnielson_mim etex.php on line
                    37

                    Comment

                    • Tim Roberts

                      #11
                      Re: Help with path issue?

                      "brett" <account@cygen. comwrote:
                      >You might try using:
                      >>
                      > require_one(dir name(__FILE__) . '\\Snoopy.class .php');
                      >
                      >If I replace the include line with the above, I get this:
                      >
                      >Fatal error: Call to undefined function require_one() in
                      >d:\home\ABC.CO M\blog\wp-content\plugins \dahnielson_mim etex.php on line
                      >37
                      Of course it does. That's because it is misspelled. It should be
                      require_once, not require_one.
                      --
                      Tim Roberts, timr@probo.com
                      Providenza & Boekelheide, Inc.

                      Comment

                      Working...