當前位置:首頁 » 編程語言 » phpwithopenssl

phpwithopenssl

發布時間: 2022-12-17 23:56:51

『壹』 編譯php時make ZEND_EXTRA_LIBS='-liconv'這句命令中ZEND_EXTRA_LIBS='-liconv'起什麼作用呢

如果不加make ZEND_EXTRA_LIBS='-liconv' ,在編譯php的時候,config可能沒有問題,但在make的時候可能出現undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
所以為了解決這個問題,需要使用make ZEND_EXTRA_LIBS='-liconv'

『貳』 linux已經安裝openssl,如何重新編譯php支持openssl模塊

下載php的源代碼,執行三步安裝就行了:
./configure
make && sudo make install
sudo make clean
就可以了,然後編輯php.ini文件加入模塊支持:
extensions=openssl.so
好了。大工告成~~~

『叄』 linux環境php.ini已開啟openssl但phpinfo里沒有

從你的情況看,既然phpinfo已經顯示可以支持openssl,那麼應該不是環境的問題了。感覺像是你cli和fpm配置不一致,很多人都犯過這種錯誤,配置好了fpm,但是用cli執行本地命令行腳本是出現各種異常。一般nginx+fpm這種環境,建議配置好fpm後,用測試通過的php.ini覆蓋cli的php.ini。

『肆』 php中phar禁用openssl怎麼解決

在php.ini中更改openssl的擴展載入狀態。今天我也遇到了,是在phpinfo中顯示被禁用。覺得是沒有正確載入,或者根本沒有裝上,明天在伺服器上試試。
在伺服器上測試過之後,將我的方法復述如下;用了兩個方法,1:將php安裝包裡面的ext文件復制到一個你知道的文件夾,或者直接在php.ini中直接更改extension_dir='ext目錄'。2:使用yum進行安裝yum install openssl。然後在目錄下進行/phpize,你找下這個命令的位置,一般在php文件夾下的bin目錄裡面,用絕對路徑執行。
然後在安裝目錄執行以下命令,生成openssl.so
./configure --with-php-config=/usr/local/php/bin/php-config(php-config文件的路徑)
make
make install
將openssl.so復制到PHP擴展文件夾中
修改php.ini中 extesion=openssl.so
中間可能會出現一些依賴軟體需要安裝,網路一下,yum安裝即可

『伍』 linux環境下php5.6.30安裝openssl擴展報錯,麻煩各位大神看看哪兒的問題

安裝PHP成功後,進入 PHP 的源碼

#cd /usr/local/src/php-5.6.8

進入openssl擴展模塊的目錄

#cd ext/openssl

在當前目錄下執行

# mv config0.m4   config.m4

#/usr/local/php/bin/phpize //這里為你自己的phpize路徑,如果找不到,可以用whereis phpize查找

#./configure --help |grep openssl 查看安裝openssl擴展需要的相關選項

#./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config 描紅的是安裝每個擴展的必選項

#make

#make install

『陸』 PHP GD庫錯誤

提示錯誤大意是:JPgGragh提示你:你安裝php時,沒有同時配置和編譯你的GD庫,你需要重新編輯你的PHP,以獲得對GD庫的支持
同時你函數imagetypes()和imagecreatefromstring()不存在,這有可能是你php.ini沒有打開GD庫的支持

同時附上編譯PHP(with gd)時需加的參數

PHP4-Server:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-config-file-path=/etc --with-gd --enable-gd-native-ttf --enable-gd-jis-conv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --enable-mbstring

PHP4-Max:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --mandir=/usr/share/man --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php/etc --with-openssl=/usr/local/openssl-0.9.7e --with-gd --enable-gd-native-ttf --enable-gd-jis-conv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-bz2 --with-inifile --with-hyperwave --enable-xml --enable-track-vars --enable-dba --enable-dbase --enable-filepro --enable-ftp --enable-versioning --enable-memory-limit --enable-calendar --enable-session --enable-sockets --enable-sysmsg --enable-sysvsem --enable-sysvshm --enable-tokenizer --enable-overload --enable-ctype --enable-sigchild --enable-magic-quotes --enable-roxen-zts --enable-fastcgi --enable-dbx --enable-dio --enable-shmop --enable-mbstring

PHP5-Server:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib-dir --with-bz2 --with-tiff-dir --with-libxml-dir --with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --with-ttf --enable-mbstring --with-mysql=/usr/lib/mysql --with-config-file-path=/etc --disable-ipv6 --enable-gd-native-ttf

PHP5-Standard:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --mandir=/usr/share/man --with-openssl=/usr/local/openssl-0.9.7e --with-zlib --with-bz2 --with-tiff-dir --with-libxml-dir --enable-dio --enable-ftp --with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-bz2-dir --with-ttf --enable-mbstring --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php/etc --disable-ipv6 --enable-gd-native-ttf

PHP5-Max:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --mandir=/usr/share/man --with-openssl=/usr/local/openssl-0.9.7e --with-zlib --with-bz2 --with-tiff-dir --with-libxml-dir --enable-dio --enable-ftp --with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-bz2-dir --with-ttf --with-inifile --enable-dba --enable-dbase --enable-filepro --enable-versioning --enable-memory-limit --enable-calendar --enable-sockets --enable-sysvsem --enable-sigchild --enable-magic-quotes --enable-roxen-zts --enable-fastcgi --enable-dbx --enable-shmop --enable-mbstring --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php/etc --disable-ipv6 --enable-gd-native-ttf

『柒』 php開啟fsockopen函數

1.方法一:

第一步:

php.ini文件中查找

allow_url_fopen = On

使其值為On

第二步:

php.ini文件中查找

extension=php_openssl.dll

如果前面有分號,去掉分號

第三步:

重啟web伺服器,apache或IIS

2.還有一種情況,也就是方法二:

1. vi php.ini

找到 allow_url_fopen 這個參數設置成 On,即

allow_url_fopen = On

2. 讓你的php支持 opensll擴展。

默認,是沒有openssl擴展的,只能重新編譯安裝。

yum install openssl openssl-devel

cd /usr/local/src/php-5.2.14/ext/openssl

/usr/local/php/bin/phpize

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

make && make install

看提示,把編譯成的openssl.so 拷貝到你在php.ini 中指定的 extension_dir 下

3. vi php.ini

加入

extension=openssl.so

4. 重啟web server

『捌』 在linux apache php環境下,如何配置php的openssl模塊各位,給提供一些相關的文章

找到php的配置文件 找到openssl這個單詞 把前面的;號 刪掉

『玖』 編譯php,make test的時候出錯,大家幫看看是什麼原因。

Can't bind to LDAP Server - [-1]
ldap_open() 函數打開一個到LDAP伺服器的聯接。
如果出錯,返回-1,並在LDAP結構中設置ld_errno域。
建議重下個安裝文件試試

熱點內容
取票人的密碼是什麼 發布:2024-05-20 08:21:43 瀏覽:962
天貓帳號密碼應輸入什麼 發布:2024-05-20 08:16:26 瀏覽:272
plsql異常處理 發布:2024-05-20 07:54:47 瀏覽:542
dreamweaver上傳網頁 發布:2024-05-20 07:51:24 瀏覽:462
拍攝車的分鏡頭腳本 發布:2024-05-20 07:50:15 瀏覽:137
mg名爵最高配置是哪個 發布:2024-05-20 07:45:11 瀏覽:376
輔助官網源碼 發布:2024-05-20 07:31:48 瀏覽:866
androidbutton的屬性 發布:2024-05-20 07:18:58 瀏覽:637
查找重復欄位的sql 發布:2024-05-20 07:18:17 瀏覽:303
我的世界創造房子伺服器 發布:2024-05-20 06:48:36 瀏覽:818