0

I have very strange problem which I can't fix for over a week now. It's about this warning

PHP Warning: Adding option (Name: allow_url_include Value: 0) (17, 1) failed! in Unknown on line 0

I don't have the allow_url_include option set in any of the files or in .htaccess.

On my local version, I don't have such problem

PHP Version 5.3.1

On production machine I got the above error, and version of PHP there is also 5.3.1.

I try to set the option in different ways, but nothing removes the warning

php_flag allow_url_include "yes"

php_flag allow_url_include "1"

php_flag allow_url_include "no"

php_flag allow_url_include "0"

And above 4 examples, but without quotes.

Everything works and I don't see any problems, but I have also

php_flag log_errors "yes"

So in combination with that and the warning from above it turns kinda bad, since it fills my log errors file with those warnings when someone open the site and for me it's hard to lookup in the file for other problems.

Any help is appreciated...

3
  • 1
    Can you tell us why you wish to enable allow_url_include? Enabling it can result in a huge security hole. Commented Mar 22, 2011 at 22:11
  • 1
    I want to disabled it, not to enable it. But no matter what I try, it shows that error. For both ways (yes/no) it returns same error (yes, even if it's set to yes, it shows "PHP Warning: Adding option (Name: allow_url_include Value: 0) (17, 1) failed! in Unknown on line 0" Commented Mar 22, 2011 at 22:19
  • The problem was syntax error in main server php.ini Commented May 26, 2011 at 18:49

2 Answers 2

3

allow_url_fopen is a boolean flag.

Per the PHP manual page on changing runtime configuration, the expected syntax seems to be:

php_flag allow_url_include off

No quotes. It only takes on or off, not yes or no or 1 or 0.

Sign up to request clarification or add additional context in comments.

5 Comments

It is amazing how much of a mess the php_flag/php_value system is!
Seriously. You'd think that they'd either improve the error or improve the list of true/false values to match what the INI file itself and ini_set accept.
Sorry, but setting "php_flag allow_url_include off" doesn't work neither. Still see the same error.
Can you please edit your original question with your full, complete, not-edited-in-any-way-whatsoever .htaccess file?
the problem was with WP's .htaccess file. There was php_flag allow_url_include, but even so I didn't understand why it's added to main log. Anyway... fixed now.
0

The problem was syntax error in main server php.ini

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.