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?

藏色散人
Release: 2023-03-05 08:58:01
Original
2931 people have browsed it

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
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template