Topic: URL file-access is disabled in the server configuration in

Warning: getimagesize() [function.getimagesize.php]: URL file-access is disabled in the server configuration in
pun_attachment/pun_attach.php on line 30


Suddenly I am getting this warning for pun_attachment extension

Where to I enable URL file-access?
Was working fine until couple of days ago....

Operating system: FreeBSD
PHP: 5.2.8

Last edited by KeyDog (2009-01-01 11:36:45)

Re: URL file-access is disabled in the server configuration in

Try adding

ini_set('allow_url_fopen', 'On');

at the beginning of the script.

Re: URL file-access is disabled in the server configuration in

thanks, but that hasn't worked for me yet.
put that code in pun_attach.php right before

    if (!defined('FORUM')) die();

reading in other php forums...  is there some file "php.ini" - a global setting I can modify... ?

or do I need to modify another file... or put it in another place in pun_attach.php

EDIT: if I drop this code it works ... is it important? big_smile

        }
        else
        {
            list($width, $height, , ) = getimagesize($forum_config['attach_icon_folder'].$names[$i]);

            if (($width > 20) || ($height > 20))
                $pun_attach_errors['big_images'][] = '<li class="warn"><span>'.$forum_config['attach_icon_folder'].$names[$i].'</span></li>';

Last edited by KeyDog (2009-01-01 16:34:04)

Re: URL file-access is disabled in the server configuration in

Without that code, there is no image size restriction on whatever images are in that icon directory, it would appear from that snippet.

Last edited by MattF (2009-01-01 17:15:26)

Re: URL file-access is disabled in the server configuration in

suppose I can live with that smile there's option to drop icons anyway in admin area of pun_attachement.

users should never be none the wiser....

of course if anyone knows why getimagesize is giving trouble - all the better....

thx

Re: URL file-access is disabled in the server configuration in

KeyDog wrote:

of course if anyone knows why getimagesize is giving trouble - all the better....

Your host has locked PHP down. Contact them if the above workaround doesn't work, (which I doubt it will).

Edit: Is this on your own server or a hosted server?

Last edited by MattF (2009-01-01 17:24:50)

Re: URL file-access is disabled in the server configuration in

If you have access to php.ini, set "allow_url_fopen" to "On" (both without quotes).

Re: URL file-access is disabled in the server configuration in

hosted server i'm afraid.
will contact them to find out how to get access / if it's possible (php.ini)

Re: URL file-access is disabled in the server configuration in

This is still a problem by the way of this attachment extension.
I just tried installing fresh version of the latest pun_attachment and get a dozen lines of warning code with that error when I click in Admin, Settings, Attachments.... LINE 26!


PHP 5.2.9
MySql improved 5.1.30