I am using a library that used ImagePng()
to generate png files. However I got Fatal error: Call to undefined function ImagePng()
. I have enabled GD
extension according to phpinfo
.
I can run the script with CLI, but cannot with a webserver(apache).
Is ImagePng
the same one as imagepng
?
The two phps are different, the one run in CLI is 5.5.23, and the one run in web server is 5.5.20 (built in with Yosemite).
I just found that php function names are NOT case sensitive! WTF!
Can you tell me what extension should I enable to use imagepng
? I have already enabled GD2
.
update
imagepng
and ImagePng
are the same because php's function/class names are case-insensitive.
The problem here is that the built in PHP's GD extension of MacOS X doesn't support PNG and FreeType. Problem solved according to here.