webmin上传图片报错,如何安装gd库?
  • 如果webmin/virtualmin上传图片,出现如下错误,说明gd库可能没有启动。webmin上传图片报错,如何安装gd库?:

    [error] [client 127.0.0.1] PHP Warning:  imagecreatefromstring() [<a href='function.imagecreatefromstring'>function.imagecreatefromstring</a>]: Data is not in a recognized format in /www/host/www.654z.com/hbcms/include/pear/Image/Tools.php on line 558, referer: http://www.654z.com/hbcms/user/add_resource.php
     

    首先确认有gd.so文件

    [root@www.654z.com ~]# ls /usr/lib/php/modules/
    curl.so   gd.so    json.so      mysqli.so  odbc.so       pdo_odbc.so   pdo.so         pgsql.so    snmp.so    zip.so
    dbase.so  imap.so  mbstring.so  mysql.so   pdo_mysql.so  pdo_pgsql.so  pdo_sqlite.so  phpcups.so  xmlrpc.so

    然后vi /etc/php.ini 确定有下面一行,如果没有,添加

    extension=gd.so

    重启apache

    service httpd restart

  •  

  • 点这里复制本页地址发送给您QQ/MSN上的好友
  • 300*300广告