当前位置:论坛首页 > Linux面板 > 求助

宝塔面板如何安装php-pear-DB、php-pear 拓展?

发表在 Linux面板2017-4-23 13:15 [复制链接] 5 4826

本帖最后由 去旅行 于 2017-4-23 13:20 编辑

错误提示:
  1. [Sat Apr 22 23:45:55.170158 2017] [proxy_fcgi:error] [pid 2622] [client MyIP:1399] AH01071: Got error 'PHP message: PHP Warning:  include_once(DB.php): failed to open stream: No such file or directory in /www/wwwroot/dalo/library/opendb.php on line 84\nPHP message: PHP Warning:  include_once(): Failed opening 'DB.php' for inclusion (include_path='.:/www/server/php/55/lib/php') in /www/wwwroot/dalo/library/opendb.php on line 84\nPHP message: PHP Fatal error:  Class 'DB' not found in /www/wwwroot/dalo/library/opendb.php on line 86\n', referer: http://MyIP:88/login.php
复制代码
操作系统腾讯云 CentOS 6.8 64位
环境信息
  • 宝塔面板 3.8版
  • apache 2.4.25(极速安装,下同)
  • MySQL 5.5.54
  • PHP 55
情景说明:用于装daloRADIUS,网站根目录为默认 /www/wwwroot 子目录为/dalo 打开首页登录505
使用道具 举报 只看该作者 回复
发表于 2017-7-16 00:44:57 | 显示全部楼层
看来对pear需求很少啊,搜索论坛  就只搜到了你这帖。我用的是ngx1.8+php7.0,手工安装pear了,但程序还是提示没有pear。
使用道具 举报 回复 支持 反对
发表于 2018-11-7 03:56:06 | 显示全部楼层
这个怎么装啊
使用道具 举报 回复 支持 反对
发表于 2018-11-7 04:32:42 | 显示全部楼层
# yum install php-pear
# pear install DB


我装上了
使用道具 举报 回复 支持 反对
发表于 2020-10-23 15:39:41 | 显示全部楼层
安装pear
wget http://pear.php.net/go-pear.phar
php go-pear.phar
pear install DB

宝塔面板下安装pear DB
php go-pear.phar
执行这个命令后需要更改路径到宝塔面板下(意思是吧pear DB安装到宝塔的安装目录)
1. Installation base ($prefix)                   : /www/server/php/72/pear
2. Temporary directory for processing            : /tmp/pear/install
3. Temporary directory for downloads             : /tmp/pear/install
4. Binaries directory                            : /www/server/php/72/bin
5. PHP code directory ($php_dir)                 : /www/server/php/72/lib/php
6. Documentation directory                       : /www/server/php/72/pear/docs
7. Data directory                                : /www/server/php/72/lib/php/data
8. User-modifiable configuration files directory : /www/server/php/72/pear/cfg
9. Public Web Files directory                    : /www/server/php/72/pear/www
10. System manual pages directory                 : /www/server/php/72/pear/man
11. Tests directory                               : /www/server/php/72/lib/php/test
12. Name of configuration file                    : /root/.pearrc
使用道具 举报 回复 支持 反对
发表于 2020-10-23 15:42:16 | 显示全部楼层
然后运行  pear install DB安装成功
downloading DB-1.10.0.tgz ...
Starting to download DB-1.10.0.tgz (132,485 bytes)
.............................done: 132,485 bytes
install ok: channel://pear.php.net/DB-1.10.0

然后可以在/www/server/php/72/lib/php  看到DB.PHP
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理

工作时间:09:00至24:00

快速回复 返回顶部 返回列表