首頁  >  文章  >  後端開發  >  php如何安裝openssl擴充功能?

php如何安裝openssl擴充功能?

coldplay.xixi
coldplay.xixi原創
2020-07-10 15:49:364875瀏覽

php安裝openssl擴充功能的方法:先找到php推展目錄的openssl檔;然後將【config0.m4】修改為【config.m4】,並在phpize進行設定;接著進行編譯安裝,並且配置【php.ini】,加入拓展;最後重啟php服務。

php如何安裝openssl擴充功能?

php安裝openssl擴充功能的方法:

1.首先找到php推展的目錄我的是在' /usr/local/php-7.1.5/ext'下

php如何安裝openssl擴充功能?

#2.進入openssl目錄,將裡面的一個config0.m4修改為config.m4執行指令為「mv config0.m4 config.m4

php如何安裝openssl擴充功能?

3.進入phpize '/usr/ local/php/bin/phpize '

php如何安裝openssl擴充功能?

4.進行設定

./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config

php如何安裝openssl擴充功能?

5.進行編譯安裝,成功後來會提示在某個目錄產生.so檔案

make  

sudo make install  

php如何安裝openssl擴充功能?

6.設定php.ini,新增拓展

php如何安裝openssl擴充功能?

7.重啟php服務

/etc/init.d/php-fpm restart

php如何安裝openssl擴充功能?

8 .查看安裝成功與否,phpinfo中查找openssl模組

php如何安裝openssl擴充功能?

#相關學習推薦:PHP程式設計從入門到精通

以上是php如何安裝openssl擴充功能?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn