1、安装问题
不管是PHP8.1 还是PHP8.2选择极速安装都不成功,只能选择编译安装
2、启动问题
安装后无法启动,提示 无zip 扩展
解决方法
报错提示是zip扩展报错 请执行以下命令禁用zip扩展后再尝试启动php-8.0看是否正常
sed -i “/zip.so/d” /www/server/php/80/etc/php.ini
sed -i “/zip.so/d” /www/server/php/81/etc/php.ini
注:80、81要看你安装的是哪个版本
总结,还是要学习如何安装zip 插件
尝试编译安装 zip
下载zip
[root@iZ23qxllllwZ ext]# wget http://pecl.php.net/get/zip
–2023-11-04 17:32:28– http://pecl.php.net/get/zip
Resolving pecl.php.net (pecl.php.net)… 104.236.228.160
Connecting to pecl.php.net (pecl.php.net)|104.236.228.160|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 363869 (355K) [application/octet-stream]
Saving to: ‘zip.1’
100%[===========================================================================================>] 363,869 89.7KB/s in 4.0s
2023-11-04 17:32:34 (89.7 KB/s) – ‘zip.1’ saved [363869/363869]
[root@iZ23qxllllwZ ext]# ls
bcmath dba fileinfo iconv mysqli pcre pdo_pgsql reflection sockets sysvshm zend_test
bz2 dl_test filter imap mysqlnd pdo pdo_sqlite session sodium tidy zip
calendar dom ftp intl oci8 pdo_dblib pgsql shmop spl tokenizer zip.1
com_dotnet enchant gd json odbc pdo_firebird phar simplexml sqlite3 xml zlib
ctype exif gettext ldap opcache pdo_mysql posix skeleton standard xmlreader
curl ext_skel.php gmp libxml openssl pdo_oci pspell snmp sysvmsg xmlwriter
date ffi hash mbstring pcntl pdo_odbc readline soap sysvsem xsl
解压
[root@iZ23qxllllwZ ext]# tar -zxvf zip.1
尝试执行 phpize
执行 phpize 来生成 configure文件
(phpize是用来关联php扩展模块的,通过phpize可以建立php的外挂模块,在特定的目录生成相应的configure文件,php官方的说明: http://php.net/manual/en/install.pecl.phpize.php)
[root@iZ23qxllllwZ zip]# phpize
Configuring for:
PHP Api Version: 20210902
Zend Module Api No: 20210902
Zend Extension Api No: 420210902