Home >Backend Development >PHP Problem >What should I do if php does not support png?
php does not support png because after OS
Recommended: "PHP Video Tutorial"
Solution to the problem that PHP does not support PNG processing under OS X Yosemite
After upgrading to Yosemite, the PHP that comes with OS X does not contain a library for PNG image processing, so functions such as imagecreatefrompng cannot be used. The solution is to reinstall a PHP environment containing the png library.
This article introduces the use of brew to install the php5.6 version. The command is as follows:
brew tap homebrew/dupes brew tap homebrew/versions brew tap homebrew/homebrew-php brew install php56
Then modify the Apache configuration file /etc/apache/http.conf and load the newly installed php
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
The above is the detailed content of What should I do if php does not support png?. For more information, please follow other related articles on the PHP Chinese website!