Php getimagesize stopped working...?

devGOD

Well-Known Member
Oct 18, 2003
122
0
166
Atlanta, GA
Was there a cpanel update done last night that would effect php? all of a sudden all my sites that use the function getimagesize have stopped working. i even ran a test script

Warning: getimagesize(http://www.site.com/files/tfile.jpg) [function.getimagesize]: failed to open stream: Cannot assign requested address in /home/site/public_html/files/test4.php on line 2
width:
height:
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Was there a cpanel update done last night that would effect php? all of a sudden all my sites that use the function getimagesize have stopped working. i even ran a test script

Warning: getimagesize(http://www.site.com/files/tfile.jpg) [function.getimagesize]: failed to open stream: Cannot assign requested address in /home/site/public_html/files/test4.php on line 2
width:
height:
What happens when you use a local file rather than a URL?
 

devGOD

Well-Known Member
Oct 18, 2003
122
0
166
Atlanta, GA
What happens when you use a local file rather than a URL?
i got it to work again after changing it to the absolute server path /home/... its odd that it just stopped excepting http:// url request and all the files are on the server too. according to php.net the getimagesize() can be used with http:// image urls
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
i got it to work again after changing it to the absolute server path /home/... its odd that it just stopped excepting http:// url request and all the files are on the server too. according to php.net the getimagesize() can be used with http:// image urls
Keep in mind that server administrators can disable the ability to use http:// with PHP functions that can use files. If you are not user root on the server, you may want to contact your hosting provider about this.
 

devGOD

Well-Known Member
Oct 18, 2003
122
0
166
Atlanta, GA
Keep in mind that server administrators can disable the ability to use http:// with PHP functions that can use files. If you are not user root on the server, you may want to contact your hosting provider about this.
its a personal dedicated server. so thats why i assumed it had to be an auto updated cause php.ini and httpd.conf haven't been edited in months so not sure why the sudden restriction
 

ivaserver

Well-Known Member
Aug 9, 2002
111
0
166
I am having the same problem on one of my servers.

How can this be corrected please?