php5.4.13版本bug報錯

技術小甜發表於2017-11-15

安裝出現 error: ‘struct gdIOCtx’ has no member named ‘data’  

vi <gd_dir>/include/gd_io.h

typedef struct gdIOCtx

{

  int (*getC) (struct gdIOCtx *);

  int (*getBuf) (struct gdIOCtx *, void *, int);


  void (*putC) (struct gdIOCtx *, int);

  int (*putBuf) (struct gdIOCtx *, const void *, int);


  /* seek must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! */

  int (*seek) (struct gdIOCtx *, const int);


  long (*tell) (struct gdIOCtx *);


  void (*gd_free) (struct gdIOCtx *);

}

括號內增加  void (*data); 


php動態增加模組

cd {php安裝檔案路徑}/root/repo/php-5.4.11/ext/gettext

 

/usr/local/php/bin/phpize

 

./configur –with-php-config=/usr/local/php/bin/php-config

 

make && make install 

重起apache

 

apachectl stop

 

apachectl start

 


cd /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/


ls |grep gettext


gettext.so


vi /usr/local/php/lib/php.ini


在載入模組的地加上一行extension=gettext.so 

本文轉自謝無賴51CTO部落格,原文連結: http://blog.51cto.com/xieping/1436739,如需轉載請自行聯絡原作者


相關文章