fmcgenesis Posted February 18, 2007 Share Posted February 18, 2007 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? Quote Link to comment Share on other sites More sharing options...
desithugg Posted February 18, 2007 Share Posted February 18, 2007 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"); Quote Link to comment Share on other sites More sharing options...
fmcgenesis Posted February 18, 2007 Author Share Posted February 18, 2007 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 Quote Link to comment Share on other sites More sharing options...
joder Posted February 18, 2007 Share Posted February 18, 2007 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. Quote Link to comment Share on other sites More sharing options...
fmcgenesis Posted February 19, 2007 Author Share Posted February 19, 2007 What do I need to change in php.ini exactly? Sorry I'm new to modifying php files on the server side. Quote Link to comment Share on other sites More sharing options...
joder Posted February 19, 2007 Share Posted February 19, 2007 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. Quote Link to comment Share on other sites More sharing options...
fmcgenesis Posted February 19, 2007 Author Share Posted February 19, 2007 I don't have that, should I add it? Quote Link to comment Share on other sites More sharing options...
joder Posted February 19, 2007 Share Posted February 19, 2007 I don't have that, should I add it? Yes. Then if for some reason you don't like it, you can always remove it. Quote Link to comment Share on other sites More sharing options...
fmcgenesis Posted February 19, 2007 Author Share Posted February 19, 2007 added; include_path = ".:/usr/share/pear" no change. added; include_path = '.:/usr/share/pear' page didn't load at all. Quote Link to comment Share on other sites More sharing options...
joder Posted February 19, 2007 Share Posted February 19, 2007 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/ Quote Link to comment Share on other sites More sharing options...
joder Posted February 19, 2007 Share Posted February 19, 2007 Just an FYI, but make sure you restart the web server after changing the php.ini. Quote Link to comment Share on other sites More sharing options...
fmcgenesis Posted February 19, 2007 Author Share Posted February 19, 2007 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.... ??? Quote Link to comment Share on other sites More sharing options...
joder Posted February 19, 2007 Share Posted February 19, 2007 You can put it in php.ini, useing the SERVER directive I showed you above, or the relative path desithugg gave you. Thing is, as far as my experience has shown me, your just not putting the right path in. Quote Link to comment Share on other sites More sharing options...
joder Posted February 19, 2007 Share Posted February 19, 2007 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. Quote Link to comment Share on other sites More sharing options...
fmcgenesis Posted February 19, 2007 Author Share Posted February 19, 2007 I changed my error reporting to E_COMPILE_ERROR from E_WARNING and now I'm not getting the same warning, but of course that block is not showing anything either. You can take a look again. Quote Link to comment Share on other sites More sharing options...
joder Posted February 19, 2007 Share Posted February 19, 2007 Try this: include($_SERVER['DOCUMENT_ROOT']."/modules/vwar/extra/countdown.php"); Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted February 19, 2007 Share Posted February 19, 2007 If you are getting a permissions denied error then it nothing to do with the include_path but the permissions on the file you are trying to include. By permissions I mean the CHMOD permissions. These permissions are very important. 0644 should be fine. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.