溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

php安裝curl問題

發布時間:2020-06-16 16:41:34 來源:網絡 閱讀:1556 作者:miss54322 欄目:web開發

    這兩天在服務器為php安裝curl拓展是遇到一個問題。很是糾結了一下...

    系統是centos 6.4 64位系統,php版本5.3.3,因需要安裝curl拓展,但是使用5.3.3的源碼包安裝curl拓展時make報錯:/php-5.3.3/ext/curl/interface.c:319: 警告:初始化丟棄了指針目標類型的限定
/php-5.3.3/ext/curl/interface.c: 在函數‘curl_write’中:
/php-5.3.3/ext/curl/interface.c:930: 錯誤:‘zend_fcall_info’沒有名為‘object_ptr’的成員
/php-5.3.3/ext/curl/interface.c: 在函數‘curl_progress’中:
/php-5.3.3/ext/curl/interface.c:1006: 錯誤:‘zend_fcall_info’沒有名為‘object_ptr’的成員
/php-5.3.3/ext/curl/interface.c: 在函數‘curl_read’中:
/php-5.3.3/ext/curl/interface.c:1080: 錯誤:‘zend_fcall_info’沒有名為‘object_ptr’的成員
/php-5.3.3/ext/curl/interface.c: 在函數‘curl_write_header’中:
/php-5.3.3/ext/curl/interface.c:1157: 錯誤:‘zend_fcall_info’沒有名為‘object_ptr’的成員
make: *** [interface.lo] 錯誤 1
--------------------------------------------

后使用php5.2.17版本源碼包安裝了curl拓展。

#cd  php-5.2.17/ext/curl

#/usr/local/php/bin/phpize

#./configure  --with-curl=/usr/local/curl/   --with-php-config=/usr/local/php/bin/php-config

#make 

#make test

#make install 

然后在php.ini文件添加:

【curl】

extension = "curl.so"


---------------------------------------------------
但是使用php -v查看是發現如下報錯:
PHP Warning:  PHP Startup: curl: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
PHP Warning:  PHP Startup: curl: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
PHP 5.3.3 (cli) (built: Jul 12 2013 20:35:47) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

錯誤信息是說php版本和模塊版本不兼容,然后就一直在查找資料怎樣match。嘗試多種方法無解后,無意看到國外一個網站上寫的"yum install xxx",在自己服務器嘗試yum install php-curl后,再次使用php -v已經沒有上述錯誤了。

之后重啟nginx和php,curl拓展已經可以正常使用。

    有時候遇到錯誤,一個思路走不通的話,可以換個思路,往往就是很簡單的一條命令就解決了問題。

    


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女