Home >Backend Development >PHP Problem >How to solve the HTTP 500 error returned when php uploads images

How to solve the HTTP 500 error returned when php uploads images

王林
王林Original
2020-08-03 14:51:144176browse

Solution to the HTTP 500 error returned by php when uploading images: First check whether the php GD extension library is enabled or installed. If it is not installed, execute the [apt-get install php5-gd] command to install it; then restart apache That’s it.

How to solve the HTTP 500 error returned when php uploads images

#First check whether the PHP GD extension library is enabled or installed.

(Recommended tutorial: php graphic tutorial)

In Ubuntu server, after php -m, the gd extension is not seen, so gd needs to be installed.

sudo apt-get install php5-gd

(Video tutorial recommendation: php video tutorial)

Then after the installation is complete, restart apache2.

sudo /etc/init.d/apache2 restart

The above is the detailed content of How to solve the HTTP 500 error returned when php uploads images. 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