2

Currently on OSX Yosemite

I'm trying to do

imagecreatefrompng($originalFile);

But got:

Fatal error: Call to undefined function imagecreatefrompng()

So I did a little search and found that I need to install the GD Library, which I did,

$ brew install gd 

And i Got:

Warning: gd-2.1.0_2 already installed

So I searched a little more, and uncommented in my php.ini and restarted Apache

extension=php_gd2.dll

Still not working.

So from here I'm lost, any pointers or suggestions?

EDIT:

GD in php ini

I belive I have related problem as here.

Community
  • 1
  • 1
Jorgeuos
  • 541
  • 6
  • 28
  • As you may see on your screenshot this version of `GD` lacks support for `PNG`. Rebuild it or install another version. – baf Jun 08 '15 at 18:16

1 Answers1

0

Can you output your phpinfo(); and check that the library is loaded correctly. Undefined function would suggest that it isn't. Check you are editing the correct php.ini file.

Matt The Ninja
  • 2,641
  • 4
  • 28
  • 58
  • Did you try any of the answers in your link? It seems OSX ships with a version that doesnt fully support it so you need reinstall it manually either by the sh script provided or by brew? – Matt The Ninja Jun 08 '15 at 14:24
  • I tried the accepted answer in the link I provided and it worked for me, but if I need to do it again in the future I would probably choose the other option with brew. See step by step instruction provided by Jpsy http://stackoverflow.com/a/26505558/430742 – Jorgeuos Jun 09 '15 at 07:21