URL file-access is disabled?

Status
Not open for further replies.

lionheart8

New Member
Messages
177
Reaction score
0
Points
0
Hi,
I have some problems with content/pages/scripts included causing such error messages in Drupal CMS shown below.

  • 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 contacted the CMS forum and these are some od the responses:

Did you perhaps upgrade your

pobster - August 8, 2007 - 15:01
Did you perhaps upgrade your php lately? Check that your php.ini looks like this;
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On
If not, it's either folder or file permissions...
Another http://support.open-realty.org/showthread.php?t=7073 points in the same direction, where they suggest requesting the web host to enable that function.

I have not made any changes to file/folder permissions.
The included pages/scripts can be accessed (ie. not via the php include function) directly with no problem.

Because of the problem, I have had to disable the corresponding scripts to avoid ugly error messages.

Any help would be appreciated. :biggrin:
 
Last edited:

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
URL file access is disabled as it can lead to security exploits.

There is not much we can do about this other than enabling it which would lead to security problems. As far as i'm aware the default Drupal install works fine on our server (though I may be mistaken). If its an addon / MOD for Drupal then perhaps you could find an alternative to it?

If anyone else has a workaround then perhaps we could discuss it.
 

lionheart8

New Member
Messages
177
Reaction score
0
Points
0
Ok ... Thanks for responding.

I found a work around ... that is working for me after considering

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On

... and the fact, that the required scripts are local.

Previously I was using the whole url ie:

<?
include "http://www.wholesiteurl.com/pathtoscript/index.html";
?>
I decided to do away with http:// & used the relative path - & all previously affected files worked. :cool:

<?
include "pathtoscript/index.html";
?>
 
Last edited:
Status
Not open for further replies.
Top