I used imagecreatefrompng
function to generate captcha. It works fine in localhost and not in web server
this is my code
$captcha_base_img = base_url("assets/images/captcha_back.png");
$image = imagecreatefrompng($captcha_base_img);
//returns an image identifier representing a black image of the specified size(w,h)
php info
gd GD Support enabled GD Version bundled (2.1.0 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.3.11 GIF Read Support enabled GIF Create Support enabled JPEG Support enabled libJPEG Version 6b PNG Support enabled libPNG Version 1.2.49 WBMP Support enabled XBM Support enabled
what would be the reason?
$image returns false;
it is a png image
error log :
Warning --> imagecreatefrompng(http://url/captcha_back.png) [function.imagecreatefrompng]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found