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.
#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!