By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,631 Members | 892 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,631 IT Pros & Developers. It's quick & easy.

Help with path issue?

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

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

types of errors:

Warning: main() [function.include]: Failed opening
'./Snoopy.class.php' for inclusion
(include_path='.;C:\php5\pear') in
d:\home\ABC.COM\blog\wp-content\plugins\dahnielson_mimetex.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

Oct 21 '06 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Hi,

You might try using:

require_one(dirname(__FILE__) . '\\Snoopy.class.php');
>From dahnielson_mimetex.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.php on my hosted web server in a
directory called d:\home\ABC.COM\blog\wp-content\plugins\

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

types of errors:

Warning: main() [function.include]: Failed opening
'./Snoopy.class.php' for inclusion
(include_path='.;C:\php5\pear') in
d:\home\ABC.COM\blog\wp-content\plugins\dahnielson_mimetex.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
Oct 21 '06 #2

P: n/a
Maybe it's not an IIS issue.... Don't know! What's your environment?

pe*******@gmail.com wrote:
Hi,

You might try using:

require_one(dirname(__FILE__) . '\\Snoopy.class.php');
From dahnielson_mimetex.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.php on my hosted web server in a
directory called d:\home\ABC.COM\blog\wp-content\plugins\

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

types of errors:

Warning: main() [function.include]: Failed opening
'./Snoopy.class.php' for inclusion
(include_path='.;C:\php5\pear') in
d:\home\ABC.COM\blog\wp-content\plugins\dahnielson_mimetex.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
Oct 21 '06 #3

P: n/a
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.php on my hosted web server in a
directory called d:\home\ABC.COM\blog\wp-content\plugins\

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

types of errors:

Warning: main() [function.include]: Failed opening
'./Snoopy.class.php' for inclusion
(include_path='.;C:\php5\pear') in
d:\home\ABC.COM\blog\wp-content\plugins\dahnielson_mimetex.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
Oct 21 '06 #4

P: n/a
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(dirname(__FILE__) . '\\Snoopy.class.php');
>From dahnielson_mimetex.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

Oct 21 '06 #5

P: n/a
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(dirname(__FILE__) . '\\Snoopy.class.php');

From dahnielson_mimetex.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.
js*******@attglobal.net
==================
Oct 22 '06 #6

P: n/a
@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.php");

Oct 22 '06 #7

P: n/a
You might try using:
>
require_one(dirname(__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_mimetex.php on line
37

Oct 22 '06 #8

P: n/a
require_once($_SERVER['DOCUMENT_ROOT'] . '/relative/path/to/file.ext');

I used this and it worked perfect. Thanks.

Oct 22 '06 #9

P: n/a
@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 @
http://www.anlak.com/?page_id=66

On Oct 21, 10:37 pm, "brett" <acco...@cygen.comwrote:
You might try using:
require_one(dirname(__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_mimetex.php on line
37
Oct 22 '06 #10

P: n/a
"brett" <ac*****@cygen.comwrote:
>You might try using:

require_one(dirname(__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_mimetex.php on line
37
Of course it does. That's because it is misspelled. It should be
require_once, not require_one.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Oct 24 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.