首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PHP5.4在CentOS 5上- GD不起作用

PHP5.4在CentOS 5上- GD不起作用
EN

Server Fault用户
提问于 2012-08-22 12:23:37
回答 2查看 3.7K关注 0票数 0

我安装了PHP 5.4:

代码语言:javascript
复制
rpm -qa | grep php
php-common-5.4.6-1.el5.remi
php-5.4.6-1.el5.remi
php-cli-5.4.6-1.el5.remi

下面是我的php-m输出:

代码语言:javascript
复制
php -m
PHP Warning:  PHP Startup: curl: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: fileinfo: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: json: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/extensions/no-debug-non-zts-20060613/phar.so' - /usr/local/lib/extensions/no-debug-non-zts-20060613/phar.so: undefined symbol: zend_resolve_path in Unknown on line 0
PHP Warning:  PHP Startup: zip: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
[PHP Modules]
ctype
curl
date
dom
filter
ftp
gd
hash
iconv
json
libxml
mcrypt
mysql
mysqli
openssl
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
soap
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

php.ini:

代码语言:javascript
复制
[gd]
; Tell the jpeg decode to ignore warnings and try to create
; a gd image. The warning will then be displayed as notices
; disabled by default
; http://php.net/gd.jpeg-ignore-warning
;gd.jpeg_ignore_warning = 0
extension=gd.so

我在/usr/local/lib/extensions/no-debug-non-zts-20060613/有gd.so,有777个烫发。

我重启了阿帕奇。Php正在工作,gd不起作用。

谢谢您的意见!

代码语言:javascript
复制
Available Packages
php-gd.i386                        5.1.6-39.el5_8                        updates
[root@ser ~]# yum install php-gd.i386
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirror.symnds.com
 * extras: mirror.cogentco.com
 * updates: mirror.ash.fastserv.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-gd.i386 0:5.1.6-39.el5_8 set to be updated
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-gd
--> Finished Dependency Resolution
php-gd-5.1.6-39.el5_8.i386 from updates has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-39.el5_8 is needed by package php-gd-5.1.6-39.el5_8.i386 (updates)
Error: Missing Dependency: php-common = 5.1.6-39.el5_8 is needed by package php-gd-5.1.6-39.el5_8.i386 (updates)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
EN

回答 2

Server Fault用户

回答已采纳

发布于 2012-08-22 12:44:29

在repos中寻找一个php-gd RPM。我相信这就是你想要的。

更新:您可以使用yum list "php-gd"搜索可用的RPM。

如果您找到一个可用的,那么您可以用yum install php-gd安装它。

票数 1
EN

Server Fault用户

发布于 2012-08-22 15:24:47

看起来您正在使用Remi存储库。您必须从CentOS Base禁用packages,将下面的行添加到[updates]块上的/etc/yum.repos.d/CentOS-Base.repo中:

代码语言:javascript
复制
[updates]
...   
exclude=php*
票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/420008

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档