PHP:运行错误undefined imagecreatefromjpeg和undefined exif
安装环境是CentOS6.2+PHP5.3.28,PHP已编译过。 1. 如果发现exif_imagetype调用导致fatal error 那么检查exif扩展有没有安装,扩展的动态安装方法是使用phpize(php install zend extension) cd /root/php-5.3.28/ext/@extension-name@phpize (this command
安装环境是CentOS6.2+PHP5.3.28,PHP已编译过。
1. 如果发现exif_imagetype调用导致fatal error
那么检查exif扩展有没有安装,扩展的动态安装方法是使用phpize(php install zend extension)
cd /root/php-5.3.28/ext/@extension-name@ phpize (this command will generate compile configure file 4 the module) ./configure --with-php-config=@php-config-path@ make && make install (@extension@.so will be installed under extension dir:@php-5.3.28-path@/lib/php/extensions/no-debug-non-zts-20090626/)
然后在php.ini文件中添加扩展:
extension=@extension-name@.so
2.如果是imagecreatefromjpeg导致fatal error
那么检查gd扩展有没有安装,方法同上
重启httpd服务后,检查phpinfo的信息,确认png/gif/jpeg都得到支持
如果只有PNG/GIF Support,而没有JPEG Support那一项,那意味着libjpeg没有被编译进GD2.1里面去,
首先安装jpeg:
tar zxvf jpegsrc.v8d.tar.gz cd jpeg-8d/ ./configure --prefix=/usr/local/jpeg --enable-shared make && make install
然后重新编译GD:
cd ../gd phpize ./configure --with-jpeg-dir=/usr/local/jpeg --with-php-config=@php-config-path@ make clean make && make install
如果GD已编译过,那么上面的make clean是必须的,否则不起作用。
重启httpd服务即可。
by iefreer

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.
