URL file-access is disabled - CURL?

apps

#1

Hi,

I am installing a toplist
geting the error when I try to give up a url – banner location in admin or member form – when I input a maximum banner size & width ( then I can only input it manually in the mysql);

Warning: getimagesize(): URL file-access is disabled in the server configuration in /home/.xxxx/xx/xx.xx/xx/xxx/admin.php on line 249

Warning: getimagesize(http://www.xxx.xx/xxxxx/xxx.gif): failed to open stream: no suitable wrapper could be found in /home/.xxx/xx/xx.xx/xx/xxx/admin.php on line 249

the scriptmaker let me know:
the image-size-checking won’t work on your server, so you’ll have to disable it or change servers.

Jeremy Scheff
Creator of Aardvark Topsites PHP and iTopsites

Dreamhost support let me know;

We have disabled this due to security reasons. You can try the following
as an alternative:
http://wiki.dreamhost.com/index.php/CURL

It’s about this;

line 245 if ($FORM[‘urlbanner’] == ‘’ || $FORM[‘urlbanner’] == “http://”) {
line 246 $TMPL[‘urlbanner’] = $CONFIG[‘defbanner’];
line 247 }
line 248 elseif ($CONFIG[‘max_banner_width’] && $CONFIG[‘max_banner_height’]) {
line 249 $size = getimagesize($FORM[‘urlbanner’]);
line 250 if ($size[0] > $CONFIG[‘max_banner_width’] || $size[1] > $CONFIG[‘max_banner_height’]) {
line 251 $error_urlbanner = 1;
line 252 }
line 253 if (!$size[0] && !$size[1]) { $error_urlbanner = 1; }
line 254 }

does somebody knows more about this? How to work around this? Fix?
Because I know a bit about php but nat that good & nothing about Curl

Regards

Marco


#2

[quote]Warning: getimagesize(): URL file-access is disabled in the server configuration in /home/.xxxx/xx/xx.xx/xx/xxx/admin.php on line 249

Warning: getimagesize(http://www.xxx.xx/xxxxx/xxx.gif): failed to open stream: no suitable wrapper could be found in /home/.xxx/xx/xx.xx/xx/xxx/admin.php on line 249[/quote]
You do not need to use cURL to get around your problem. Simply feed your getimagesize() function with an absolute (relative from root) path instead of a remote path. The problem is similar to the one described here.


Simon Jessey
Keystone Websites | si-blog


#3

First thank you for looking at my issue

second sorry I’m a bit forced in to php but not a expert…

absolute (relative from root) path instead of a remote path

it’s a toplist program where people give a remote path of ther banner url so there banner get checkt if the maximum sizes are not to bigg to show, to include in de toplist…
So if i’m understand your advice correct, i need to ask them to enter there absolut path of there banner ?

or am i wrong? can you write what i can change in the program as an example?

thank you verry much


#4

Ahh. I’m afraid you WILL need to use cURL for that, because the URL are accessing is on a remote server.


Simon Jessey
Keystone Websites | si-blog


#5

You can also compile php yourself, probably alot easier than rewriting that script. Just follow these instructions to compile php4