jwwceo Posted March 10, 2008 Share Posted March 10, 2008 Hello, I am trying to make a widget that bloggers can put in their sidebar with one line of code: the code is this: <?php include 'http://www.mysite.com/widget.php'; ?> I am testing this on my server, and I get the following error: Any ideas??? Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/liquid/public_html/blog/wp-content/themes/so-simple-100/sidebar.php on line 67 Warning: include(http://www.liquidcotton.com/widget.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/liquid/public_html/blog/wp-content/themes/so-simple-100/sidebar.php on line 67 Warning: include() [function.include]: Failed opening 'http://www.liquidcotton.com/widget.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/liquid/public_html/blog/wp-content/themes/so-simple-100/sidebar.php on line 67 Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted March 10, 2008 Share Posted March 10, 2008 the problem is: URL file-access is disabled in the server configuration you may need to update php.ini to turn on this: allow_url_include Quote Link to comment Share on other sites More sharing options...
jwwceo Posted March 10, 2008 Author Share Posted March 10, 2008 The only setting I can see is : allow_url_fopen and it is set to ON. Can anything else be causing this?? James Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted March 10, 2008 Share Posted March 10, 2008 hm, maybe another PHP ini somewhere or maybe Apache config, which I don't know too much about. Quote Link to comment Share on other sites More sharing options...
trq Posted March 10, 2008 Share Posted March 10, 2008 The only setting I can see is : allow_url_fopen and it is set to ON. Can anything else be causing this?? James Then you will need to add allow_url_include yourself and set it to yes. It is off by default. Be aware though that this setting is also off in most host environments and that most users will not have the ability to change this setting. There is little you can do in this regard. Quote Link to comment Share on other sites More sharing options...
discomatt Posted March 10, 2008 Share Posted March 10, 2008 Why not use fopen? Including the file from a remote server will return a parsed PHP page... no code will be executed... unless the script is set up to echo <?php ?> Quote Link to comment Share on other sites More sharing options...
jwwceo Posted March 11, 2008 Author Share Posted March 11, 2008 I am not familiar with fopen?? how would this work???? James Quote Link to comment Share on other sites More sharing options...
discomatt Posted March 11, 2008 Share Posted March 11, 2008 http://php.net/manual/en/function.fopen.php Plenty of examples in there 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.