The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Php getimagesize stopped working...?

Discussion in 'General Discussion' started by devGOD, May 3, 2009.

  1. devGOD

    devGOD Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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:
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    What happens when you use a local file rather than a URL?
     
  3. devGOD

    devGOD Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    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
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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.
     
  5. devGOD

    devGOD Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    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
     
  6. ivaserver

    ivaserver Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    I am having the same problem on one of my servers.

    How can this be corrected please?
     
Loading...

Share This Page