Jump to content

include_path='.:/usr/share/pear'


fmcgenesis

Recommended Posts

I'm back.

 

Got almost everything working on the server but there's one little thing I can't figure out.

 

I'm getting the following error on my site at http://fmcclan.com/ (Note: I have been turning that block on and off so you may not see the error)

 

Warning: include(http://www.fmcclan.com/modules/vwar/extra/countdown.php) [function.include.html]: failed to open stream: Permission denied in /var/www/html/fmc/blocks/block-vWarCount.php on line 26

Warning: include() [function.include.html]: Failed opening 'http://www.fmcclan.com/modules/vwar/extra/countdown.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/fmc/blocks/block-vWarCount.php on line 26

 

What's pear and what's wrong here?

Link to comment
Share on other sites

I'm back.

 

Got almost everything working on the server but there's one little thing I can't figure out.

 

I'm getting the following error on my site at http://fmcclan.com/ (Note: I have been turning that block on and off so you may not see the error)

 

Warning: include(http://www.fmcclan.com/modules/vwar/extra/countdown.php) [function.include.html]: failed to open stream: Permission denied in /var/www/html/fmc/blocks/block-vWarCount.php on line 26

Warning: include() [function.include.html]: Failed opening 'http://www.fmcclan.com/modules/vwar/extra/countdown.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/fmc/blocks/block-vWarCount.php on line 26

 

What's pear and what's wrong here?

 

this is wrong

include("http://www.fmcclan.com/modules/vwar/extra/countdown.php");

this is right

include("../modules/vwar/extra/countdown.php");
or if your already in the main directory use the fallowing
include("modules/vwar/extra/countdown.php");

Link to comment
Share on other sites

Tried both of your suggestions

 

Warning: include(vwar/extra/countdown.php) [function.include.html]: failed to open stream: No such file or directory in /var/www/html/fmc/blocks/block-vWarCount.php on line 26

Warning: include() [function.include.html]: Failed opening 'vwar/extra/countdown.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/fmc/blocks/block-vWarCount.php on line 26

Link to comment
Share on other sites

Tried both of your suggestions

 

Warning: include(vwar/extra/countdown.php) [function.include.html]: failed to open stream: No such file or directory in /var/www/html/fmc/blocks/block-vWarCount.php on line 26

Warning: include() [function.include.html]: Failed opening 'vwar/extra/countdown.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/fmc/blocks/block-vWarCount.php on line 26

 

php can't see it because your include_path only looks in /usr/share/pear. Either modify your php.ini or do this

include($_SERVER['DOCUMENT_ROOT']."/PATH");

PATH being the path to the file under the document root.

Link to comment
Share on other sites

What do I need to change in php.ini exactly?

 

Sorry I'm new to modifying php files on the server side.

 

The line that starts with

include_path =

 

In your case it should now read

include_path = ".:/usr/share/pear"

 

In the above you would add a colon after pear and put in the full path to the directory of the included files.

Link to comment
Share on other sites

added;

 

include_path = ".:/usr/share/pear"

 

no change.

 

Of course not. After /usr/share/pear you add a colon and the full path to your include files. As in

include_path = ".:/usr/share/pear:/var/www/html/fmc/blocks/"

If your include files are in /var/www/html/fmc/blocks/

Link to comment
Share on other sites

Yes I did restart the service, always do.

 

I haven't tried the suggestion about yet because I don't understand why I need to modify php.ini for content on my webpage. I was hosted on a shared hosting in normal conditions one wouldn't have access to php.ini - on my shared hosting this worked fine but on my server it's not.

 

Perhaps I think I don't want to make static changes to php.ini because it should work without it... any suggestions?

 

EDIT: Just tried your suggestion with no change....  ???

Link to comment
Share on other sites

On the server, find the directory where the include files are located, do a "pwd" and paste it here.

 

 

P.S. You might want to fix the front page of your site. I am coming from my companies network and am getting the following message

----

"You have attempted to access this site with an invalid IP.

 

If you think this is a mistake you can contact the site webmaster at genesis(at)fmcclan(dot)com.

 

Be SURE to include the following information in any email!

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1

Remote Address: REMOVED by joder

Client IP: none

Forwarded For: REMOVED by joder

----

which is wrong since my company owns the IP address block in question.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.