Travis959 Posted December 13, 2010 Share Posted December 13, 2010 Hey guys, The script I use to generate images, more or less, works almost flawlessly. However, I keep experiencing a problem at random in my script when it comes time to call a JPEG or PNG file from an external server. A lot of the time it will work fine, but many other times it comes back with the error: imagecreatefromjpeg() [function.imagecreatefromjpeg]: Cannot read image data Which causes the script to fail. Right now the images it say it cannot read are these: http://tiles.xbox.com/tiles/UT/EF/1mdsb2JgbA9ECgQLGwMfWSkgL2ljb24vMC84MDAwIAABAAAAAPkqMU4=.jpg http://tiles.xbox.com/tiles/Au/lM/1Wdsb2JgbA9ECgUAGwEfL1hTL2ljb24vMC84MDAwIAABAAAAAPpj6R0=.jpg http://tiles.xbox.com/tiles/6q/kv/1Gdsb2JgbA9ECgUAGwEfL1hSL2ljb24vMC84MDAwIAABAAAAAPsAqfU=.jpg http://tiles.xbox.com/tiles/tQ/UG/1Gdsb2JgbA9ECgUAGwEfV1gmL2ljb24vMC84MDAwIAABAAAAAPspBao=.jpg http://tiles.xbox.com/tiles/qp/Fx/0Wdsb2JgbA9ECgQNGwEfVitXL2ljb24vMC84MDAwIAABAAAAAP5ekbU=.jpg and as you can see, they work fine. So what's going on here? Is Microsoft somehow blocking the attempt? I can view the images fine in the browser, but sometimes it just won't work in the script. But like I said, it's not everytime. The line the errors comes up on are these: $lastxboxgames = imagecreatefromjpeg($lastxboxgames); $lastxboxgames1 = imagecreatefromjpeg($lastxboxgames1); $lastxboxgames2 = imagecreatefromjpeg($lastxboxgames2); $lastxboxgames3 = imagecreatefromjpeg($lastxboxgames3); $lastxboxgames4 = imagecreatefromjpeg($lastxboxgames4); I also have the script to echo the variables back to me when while it's running, so those urls up there came exactly from the script, so it's not that its getting the wrong URL, it just decides that the image isn't good enough. The script, generates my signature image below, and when any of the images that come from the xbox server return an error, they all do, including the avatar image in the top left which is a PNG. Any help is appreciated! Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted December 13, 2010 Share Posted December 13, 2010 I been trying these url's with my thumbnailer, and so far they been working, but maybe ms is just down at the times that are trying to get them and didn't work. Maybe you should cache the images if use the same ones a lot. Quote Link to comment Share on other sites More sharing options...
Travis959 Posted December 13, 2010 Author Share Posted December 13, 2010 Well, it happens if I try to do it say more than once or twice per hour I believe. But the images still load fine via browser, so I have no idea whats happening. I can't imagine Microsoft's server being down that much. Quote Link to comment Share on other sites More sharing options...
bobo_liu Posted March 7, 2014 Share Posted March 7, 2014 Your problem solved?I met the same problem.ths.the script from the old server to new server, appear this problem. php.ini exactly the same (php v5.3.17) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.