Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By lionheart8 on
For sometime, I have noticed I get errors on pages with included scripts like the error message below shows:
* warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/xprt007/public_html/drupal5/includes/common.inc(1342) : eval()'d code on line 2.
* warning: include(mysite/drupal5/diverse/smstool.html) [function.include]: failed to open stream: no suitable wrapper could be found in /home/xprt007/public_html/drupal5/includes/common.inc(1342) : eval()'d code on line 2.
* warning: include() [function.include]: Failed opening 'mysite/drupal5/diverse/smstool.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xprt007/public_html/drupal5/includes/common.inc(1342) : eval()'d code on line 2.
* warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/xprt007/public_html/drupal5/includes/common.inc(1342) : eval()'d code on line 2.
* warning: include(mysite/drupal5/diverse/smstool.html) [function.include]: failed to open stream: no suitable wrapper could be found in /home/xprt007/public_html/drupal5/includes/common.inc(1342) : eval()'d code on line 2.
* warning: include() [function.include]: Failed opening 'mysite/drupal5/diverse/smstool.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xprt007/public_html/drupal5/includes/common.inc(1342) : eval()'d code on line 2.
I dont remember changing anything and all the included scripts
<?
include "mysite/drupal5/diverse/smstool.html";
?>
where working before.
The scripts, whether Javascript or other like the one above, work with no problem if I go to the page directly.
Because of this I have had to disable them to avoid the very conspicuous error messages.
What could be wrong?
Thanks in advance.
Comments
warnings are not errors
Please see: http://support.open-realty.org/showthread.php?t=7073
Did you perhaps upgrade your
Did you perhaps upgrade your php lately? Check that your php.ini looks like this;
If not, it's either folder or file permissions...
Pobster
--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------
Thanks for responding... I
Thanks for responding...
I contacted the host after reading your posts and they confirmed that function has been deliberately disabled for security reasons (this is a small private free host).
After thinking about
... I decided to gamble & get rid of "http://", since I was using the whole url, so that only the relative paths remained. All affected scripts worked with no problem.
Thanks & regards
Thanks for responding... I
Thanks for responding...
I contacted the host after reading your posts and they confirmed that function has been deliberately disabled for security reasons (this is a small private free host).
After thinking about
... I decided to gamble & get rid of "http://", since I was using the whole url, so that only the relative paths remained. All affected scripts worked with no problem.
Thanks & regards
Thanks for responding... I
Thanks for responding...
I contacted the host after reading your posts and they confirmed that function has been deliberately disabled for security reasons (this is a small private free host).
After thinking about
... I decided to gamble & get rid of "http://", since I was using the whole url, so that only the relative paths remained. All affected scripts worked with no problem.
Thanks & regards
After upgrading to PHP5, I
After upgrading to PHP5, I had a similar problem. My php.ini file did state allow_url_fopen = On
But I still couldn't include a http as a file.
After much research I found the solution here:
http://www.forum.psoft.net/archive/index.php/t-19173.html
In short you also need to include this line in PHP5's php.ini file:
allow_url_include = 1
OR this in your .htaccess file:
php_flag allow_url_include 1
I'm including this here in case anyone else has the same problems I did and this may make it easier for them to find a solution.