After upgrade, PHP no longer supports PNG operations

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 20:00:45

Here's another option, from the guys from liip, here. This is a PHP package that comes pre-built for Yosemite (older versions works too) but it is just one line of code:

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5

After that, everything is ready to work as expected. The configuration that cames with that installation is well suited for Symfony 2 development, but it should work just fine with other use cases.

Finally, if you need to use the updated PHP CLI, too, but you don't want to use the PHP version that comes with the OS, then you could also add to your .bash_profile or similar this line of code:

export PATH=/usr/local/php5/bin:$PATH

I had to fix this by installing PHP 5.5 again via Homebrew. Fairly painless:

https://github.com/Homebrew/homebrew-php

Installation instructions can be found here: https://github.com/Homebrew/homebrew-php#usage

I used the command brew install php55

Don't forget to update your httpd.config - instructions will be shown at the end of the homebrew install.

Jpsy

As @jtotheh said, installing a complete PHP version with PNG and FreeType support compiled in is the way to go.

If you don't want to fiddle through that process, I have prepared complete step-by-step instructions as an answer to a similar question: https://stackoverflow.com/a/26505558/430742

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!