CentOS7 安装 lnmp 记录 (2)
安装 pdo_firebird 扩展
解决方法:
首先,确保抛警告的模块都已经安装。
- 进入源文件路径目录: cd /usr/local/src/php-7.2.11/ext
2. 进入bcmath目录(安装其它模块,换成其它模块名称即可): cd bcmath
-
然后执行输入: /usr/local/php/bin/phpize
-
然后再执行: ./configure --with-php-config=/usr/local/php/bin/php-config
-
执行命令: make && make install
-
加入 php.ini extension=pdo_firebird.so
-
重启 php-fpm
杀死进程 killall -9 php-fpm
重启 /usr/local/php/sbin/php-fpm
执行 ./configure --with-php-config=/usr/local/php/bin/php-config 报异常
configure: error: libfbclient, libgds or libib_util not found! Check config.log for more information.
解决方式 : yum install firebird-devel
PDO::__construct(): The server requested authentication method unknown to the client [cachin g_sha2_password]
升级 mysql8 和 php7.3.5
用户组的问题 安装fastadmin
提示没有权限
file_put_contents(/usr/local/openresty/nginx/html/fastadmin/runtime/cache/4e/819c837d54a6ed09abc77a8560a66f.php): failed to open stream: Permission denied
groups add www
useradd nginx
passwd nginx // 设置密码
追加到某个组 usermod -a G www ngxin
修改 php 的配置文件php-fpm.d/www.conf
user = nginx
group = www
// www
chown -R nginx:www fastadmin //参数说明:chown -R 用户:用户组 目录名
Call to undefined function think\captcha\imagettftext()
先安装freetype
1:下载: wget "http://download.savannah.gnu.org/releases/freetype/freetype-2.4.0.tar.bz2"
2: 解压: tar jxvf freetype-2.4.0.tar.bz2
3:进入 freetype-2.4.0
4:./configure --prefix=/usr/local/freetype && make && make install
5,进入之前解压的php文件夹里面 /application/local/php/ext/gd里面
6,运行 phpize 然后:make clean再 运行./configure
./configure --with-php-config=/usr/local/php/bin/php-config --with-freetype-dir=/usr/local/freetype
make && make install
卸载 make uninstall freetype
重新下载最新的
2.10.0
编辑 gd
configure: error: freetype-config not found.
解决方法: yum install freetype-devel
源码安装 php7.3 ,gd 的 freetype 装不上 ,导致验证码出不来,然后重新删除 php 安装目录
1:停止 php-fpm killall -9 php-fpm
2: rm -rf /usr/local/php
3:重新用 yum 安装 php7.2
参照 网站来安装
报 seesion 没有权限 、/var/lib/php/session
因为 这个目录是 root , php-fpm 是 cmdb 用户
本作品采用《CC 协议》,转载必须注明作者和本文链接