Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

URL file-access is disabled in the server configuration

Participant ,
Dec 01, 2009 Dec 01, 2009

Copy link to clipboard

Copied

My hosting company has made a server config change and my xslt pages have stopped working with the following error.

It says url file access is disabled but my phpinfo() still shows allow_url_fopen = on

What else might be the problem?

Warning: require_once() [

function.require-once]: URL file-access is disabled in the server configuration in

/homepages/0/xxx/htdocs/xxxx/inc/horoscope_xml.php on line

3

Warning: require_once(

http://www.xxxx.co.uk/includes/MM_XSLTransform/MM_XSLTransform.class.php) [

function.require-once]: failed to open stream: no suitable wrapper could be found in

/homepages/0/xxxx/htdocs/xxxxx/inc/horoscope_xml.php on line

3

Fatal error: require_once() [

function.require]: Failed opening required 'http://www.xxxxx.co.uk/includes/MM_XSLTransform/MM_XSLTransform.class.php' (include_path='.:/usr/lib/php5') in

/homepages/0/xxxx/htdocs/xxxxx/inc/horoscope_xml.php on line

3

TOPICS
Server side applications

Views

3.1K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 01, 2009 Dec 01, 2009

Copy link to clipboard

Copied

Improved security in PHP 5 split the allow_url_fopen directive into allow_url_fopen and allow_url_include. The first one, allow_url_fopen allows you to open remote files, but prevents you from including files from a URL. Normally, allow_url_fopen is on and allow_url_include is off.

Assuming that the class is on your local server, use a file path, rather than a URL to include it. If the class is not on your local server, you cannot include it.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 01, 2009 Dec 01, 2009

Copy link to clipboard

Copied

I don't understand your use of the word 'class' in your reply - I am using php not asp.net.

The page in question is using XSLT to reformat a remote xml feed.

The servers php is 5.2.11, as it has been for sometime, so I know that it previously worked with allow_url_fopen = on and allow_url_include = off.

I have copied the files to another server at the same web host and it works fine.

The webhost co is adament that both servers are the same but clearly this is not the case.

Is it possible for phpinfo() to show allow_url_fopen = on yet be actually off on the server?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 01, 2009 Dec 01, 2009

Copy link to clipboard

Copied

LATEST

bikeman01 wrote:

I don't understand your use of the word 'class' in your reply - I am using php not asp.net.

The name of the file that you are trying to access is MM_XSLTransform.class.php. It is a PHP class created by Dreamweaver for the XSL Transformation server behavior.

The servers php is 5.2.11, as it has been for sometime, so I know that it previously worked with allow_url_fopen = on and allow_url_include = off

Judging from the error message, you are trying to include the file using a URL, rather than a file path:

Fatal error: require_once() [

function.require]: Failed opening required 'http://www.xxxxx.co.uk/includes/MM_XSLTransform/MM_XSLTransform.class.php' (include_path='.:/usr/lib/php5') in

/homepages/0/xxxx/htdocs/xxxxx/inc/horoscope_xml.php on line

3

Change the URL to a file path:

require_once('/homepages/0/xxxx/htdocs/includes/MM_XSLTransform/MM_XSLTransform.class.php');

Is it possible for phpinfo() to show allow_url_fopen = on yet be actually off on the server?

No.

[Edited to correct name of server behavior]

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines