xcandiottix Posted April 17, 2010 Share Posted April 17, 2010 This is my first rodeo with a windows based sever. I copied over some code from one of my linux hosted sites to get some base code going and I get the following warnings when trying to resize a photo before displaying: Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in D:\Hosting\5935799\html\browse.php on line 171 Warning: getimagesize(http://www..com/upload/picture.jpg) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in D:\Hosting\5935799\html\browse.php on line 171 Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in D:\Hosting\5935799\html\browse.php on line 195 Warning: getimagesize(http://www..com/upload/picture2.jpg) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in D:\Hosting\5935799\html\browse.php on line 195 It seems to be a problem with the server configuration but I'm not really sure where to begin to get this one running. Does anyone have an experience in this? Thanks much, K.Candiotti Link to comment https://forums.phpfreaks.com/topic/198879-url-file-access-is-disabled-in-the-server-configuration/ Share on other sites More sharing options...
DavidAM Posted April 17, 2010 Share Posted April 17, 2010 I have never tried to do this, but I know there are php.ini settings to allow (or not allow) opening a url as if it is a file. See http://us3.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen. Apparently, with Windows there are some limitations. If the file you are trying to access is on your system, use a file path instead of a url (it is probably more efficient and therefore faster). If it is not on your system, you may be stuck. Link to comment https://forums.phpfreaks.com/topic/198879-url-file-access-is-disabled-in-the-server-configuration/#findComment-1043940 Share on other sites More sharing options...
trq Posted April 18, 2010 Share Posted April 18, 2010 It seems to be a problem with the server configuration Not really. You should be using filesystem paths in your code, not urls (unless of course these images are on another server). Link to comment https://forums.phpfreaks.com/topic/198879-url-file-access-is-disabled-in-the-server-configuration/#findComment-1043979 Share on other sites More sharing options...
xcandiottix Posted April 18, 2010 Author Share Posted April 18, 2010 they are through a godaddy server, so I'd imagine I might have to raise a question with their support eh? Link to comment https://forums.phpfreaks.com/topic/198879-url-file-access-is-disabled-in-the-server-configuration/#findComment-1044038 Share on other sites More sharing options...
trq Posted April 18, 2010 Share Posted April 18, 2010 If you want to use getimagesize() on files on a remote server you will need url wrappers enabled on the server calling getimagesize(). Link to comment https://forums.phpfreaks.com/topic/198879-url-file-access-is-disabled-in-the-server-configuration/#findComment-1044039 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.