Jump to content

[SOLVED] Cannot get allow_url_include to turn on


j0b0

Recommended Posts

Hi - I am very new to php and server side stuff but am trying to make my way through it.  I am getting the following error:

 

Warning: include() [function.include]: URL file-access is disabled in the server configuration

 

My version of php is 5.2.4.

 

allow_url_fopen is set to on  - good

allow_url_include is set to off  -  bad

 

I have tried editing the main php.ini file to turn it on, then restart apache, but it stays off.

I have tried turning it on locally in a php.ini file and/or .htaccess but it stays off.

 

I have searched in c-panel and there is no setting anywhere, including rebuilding apache, to turn this on.

 

I am sure its something simple, but its beyond my ability to research how to turn this on.  I am not worried about securitiy issues as this is a simple information only site to display some RSS feeds.

 

Any help would be appreciated.

 

Thanks

 

 

Link to comment
Share on other sites

Make sure the php.ini that you are changing is the one that php is using.

 

Why are you attempting to include a file using a http request? When you do this, the file is parsed by php (assuming it has a .php extension) and you only include any content that is output by that file (even if the file is located on the same server where the script is that is including it.)

 

You normally want and need to include files using a file system path.

Link to comment
Share on other sites

The php.ini I edited was on the root, in the /etc directory which I think is the main one.  Of course again I could be wrong there.  I was using an older php 4.x and did not have this issue.  Upgrading did it.  I actually don't have a choice, there is a bunch of script I am using that dynamically pulls RSS feeds using php into the html of the site, and I cannot edit that code.  I will check to make sure there is not another php.ini somewhere its grabbing.

 

Thanks

 

Chris

 

Link to comment
Share on other sites

That did it - since I am winging it, I was editing the wrong php.ini file.  Thankfully this board is chock full of past advice, as I did not know  how to actually find out what php.ini apache was using. 

 

%> php -i | grep ini | grep Path

 

did the trick.

 

Thanks all for the help!

 

Chris

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.