Page 1 of 1

"The PHP allow_url_fopen setting is disabled" Error

Posted: Wed Feb 15, 2012 8:28 am
by bubu636
Hello,

I currently have 1.7.3 and want to upgrade to 2.5.1. I tried to upgrade from Extension Manager> Upgrade> Purge Cache> Find Upgrade , but I got this error message instead.

"The PHP allow_url_fopen setting is disabled. This setting must be enabled for the updater to work."
I read that this has something to do with shared hosting so I found my php.ini file but I don't know what to edit here-:) Please advice.

Thank you very much!


# ######
#
# Including file: /data/templates/web/user/domain.com/cgi-bin/php.default.ini
#
# ######

upload_tmp_dir = /data/tmp
asp_tags = On
register_globals = On
safe_mode = Off
upload_max_filesize = 25M
post_max_size = 25M
output_buffering = 1024
mime_magic.magicfile = /usr/share/misc/file/magic.mime
memory_limit = 32M
include_path = .:/usr/services/vux/lib/php
disable_functions = shell_exec,passthru,exec,system,pcntl_exec
allow_url_include = 0
allow_url_fopen = 0
extension_dir = /usr/services/vux/php5/lib/php/extensions
zend_extension = /usr/services/vux/php5/lib/php/extensions/ioncube_loader_lin_5.2_real.so
zend_extension = /usr/services/vux/php5/lib/php/extensions/ZendOptimizer_real.so

realpath_cache_size = 64K
realpath_cache_ttl = 600


#
# Suhosin Configuration
#

# Disable suhosin for now
#extension = suhosin.so
#suhosin.simulation = On
#suhosin.executor.disable_eval = On
#suhosin.executor.eval.blacklist = popen

session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 3600

# ######
#
# User-based Defaults
#
# ######

session.save_path=/data/7/0/72/20/398672/user/405813/cgi-bin/.php/sessions

Re: "The PHP allow_url_fopen setting is disabled" Error

Posted: Wed Feb 15, 2012 9:09 am
by toivo

Code: Select all

allow_url_fopen = 0
Change the value from 0 to 1 to allow the fopen function.

Re: "The PHP allow_url_fopen setting is disabled" Error

Posted: Wed Feb 15, 2012 5:19 pm
by leolam
and when you are at it change as follows also (changed values in bold)
asp_tags = Off
register_globals = Off
safe_mode = Off
upload_max_filesize = 64M
post_max_size = 64M
output_buffering = 1024
mime_magic.magicfile = /usr/share/misc/file/magic.mime
memory_limit = 96M
include_path = .:/usr/services/vux/lib/php
disable_functions = dl, show_source, shell_exec, passthru, popen, proc_open
Register Globals set to 'On' is a high security risk as are the wrong 'disabled functions'. The increased values for memory etc is just creating a better performance since they are too low for current Joomla 2.5 imho

Never, Ever (!) change 'allow_url_include = 0' This is any hosts most nightmare. Keep this disabled! ('0') (or better....remove it all together from your php.ini!)

Leo 8)

Re: "The PHP allow_url_fopen setting is disabled" Error

Posted: Wed Feb 15, 2012 8:47 pm
by bubu636
Thank you for the advice.

I changed the file as both suggested I did see update this time in extension manager but I got 500: Internal server error. Maybe I have to change the file permission for php.ini? When I uploaded the file, it strips all the text....I will talk to the host first and get back to you-:)

Re: "The PHP allow_url_fopen setting is disabled" Error

Posted: Tue Feb 21, 2012 8:49 am
by bubu636
I called Network Solutions. Their rep told me that I shouldn't saved all the code in the file. He made me erase all the lines but the next 2 lines.
memory_limit = 64M
output_buffering = 2048
I am kind of nervous that I had to remove all the original codes you gave me to modify.
What should I do?

Re: "The PHP allow_url_fopen setting is disabled" Error

Posted: Tue Feb 21, 2012 9:00 am
by leolam
Is ok no problem

Re: "The PHP allow_url_fopen setting is disabled" Error

Posted: Thu Feb 23, 2012 4:40 am
by bubu636
Hello,

I tried to upgrade from 1.7 to 2.5 with my host's recommended settings in php.ini, I still can't get this error below.

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7037837 bytes) in /data/7/0/72/20/398672/user/405813/htdocs/law/libraries/joomla/filesystem/archive/zip.php on line 372

(php.ini)
memory_limit = 96M
output_buffering = 2048
allow_url_fopen = 1

Re: "The PHP allow_url_fopen setting is disabled" Error

Posted: Sat Aug 04, 2012 10:42 pm
by webdesignerlink
I know this thread hasn't been updated in awhile, but I felt like posting a solution/success is always a good thing for anyone who finds this thread, and especially since this thread did not completely solve my issue (although very close!)

My client's website is on Network Solutions shared hosting. I called them like mentioned above, but they didn't even know what a php.ini file was (seriously???). They don't have access to it anywhere in their hosting control panel, nor is it in the domain's directory. So after digging through their documentation, I discovered they have their own php.ini file and to override anything you have to create your own php.ini file in the root directory's (not the domain name, the root) cgi-bin. I put what was mentioned above in the file:

allow_url_fopen = 1
memory_limit = 64M
output_buffering = 2048

And it worked! I followed the Joomla upgrade instructions of "Purge the cache" then "Find Updates" and they showed up. I then clicked to upgrade Joomla to 2.5.6 (from 1.7) and it worked! I then just deleted the php.ini file I created to do this, mostly since they warn in their documentation they don't want anyone creating anything that will compromise security of other people on the server. I don't understand how all that works so I don't know if this does or not, but for the few minutes it took me to do this, it saved me a long time upgrading joomla manually!

Here's the Network Solutions link I mentioned above:
http://www.networksolutions.com/support ... sting-faq/

Hope this helps someone!

Re: "The PHP allow_url_fopen setting is disabled" Error

Posted: Wed Aug 22, 2012 11:08 pm
by StephenJoomla
This last post helped me a lot after 4 days 6 hours of freaking trying.... :pop

Re: "The PHP allow_url_fopen setting is disabled" Error

Posted: Mon Oct 01, 2012 10:13 am
by Zyber76
Wow! I can't even find php.ini or cgi-bin dir.
I've been searching through all my dirs but nothing!

Re: "The PHP allow_url_fopen setting is disabled" Error

Posted: Fri Nov 16, 2012 5:59 pm
by CorinnaM
Googled the error message, found this thread, created a php.ini file, didn't work, contacted host, they will fix it for me - at least that's what they say! LOL

Thanks for this thread. Saved me a lot of time!