Home >Backend Development >PHP Problem >What should I do if php does not support png?

What should I do if php does not support png?

藏色散人
藏色散人Original
2020-08-26 10:32:182929browse

php does not support png because after OS

What should I do if php does not support png?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn