[英]Cant use already installed MDB2
I installed Pear with the following command: 我使用以下命令安装了Pear:
sudo apt-get install php-pear
Now Pear list
gives the following output: 现在,
Pear list
提供以下输出:
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.7 stable
Console_Getopt 1.3.0 stable
PEAR 1.9.4 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.1 stable
Next I installed MDB2 with the following command: pear install MDB2
接下来,我使用以下命令
pear install MDB2
: pear install MDB2
downloading MDB2-2.4.1.tgz ...
Starting to download MDB2-2.4.1.tgz (119,790 bytes)
..........................done: 119,790 bytes
install ok: channel://pear.php.net/MDB2-2.4.1
MDB2: Optional feature fbsql available (Frontbase SQL driver for MDB2)
MDB2: Optional feature ibase available (Interbase/Firebird driver for MDB2)
MDB2: Optional feature mysql available (MySQL driver for MDB2)
MDB2: Optional feature mysqli available (MySQLi driver for MDB2)
MDB2: Optional feature mssql available (MS SQL Server driver for MDB2)
MDB2: Optional feature oci8 available (Oracle driver for MDB2)
MDB2: Optional feature pgsql available (PostgreSQL driver for MDB2)
MDB2: Optional feature querysim available (Querysim driver for MDB2)
MDB2: Optional feature sqlite available (SQLite2 driver for MDB2)
MDB2: To install optional features use "pear install pear/MDB2#featurename"
Then I included MDB2.php in one of my program using require_once('MDB2.php')
, but I got these errors during runtime: 然后,我使用
require_once('MDB2.php')
在其中一个程序中包含了MDB2.php,但是在运行时出现以下错误:
Warning: require_once(MDB2.php) [function.require-once]: failed to open stream: No such file or directory in /opt/lampp/htdocs/xampp/php/php_crash/phptomysql/connect.php on line 80
Fatal error: require_once() [function.require]: Failed opening required 'MDB2.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/xampp/php/php_crash/phptomysql/connect.php on line 80
It is clearly indicating that MDB2.php is missin
g. 清楚地表明
MDB2.php is missin
。 I have not included any file name MDB2.php
in my current directory. 我在当前目录中未包含任何文件名
MDB2.php
。 I am assuming it is some sort of global available anywhere. 我假设这是某种全球可用的方式。
How to solve this? 如何解决呢? I also tried this:
sudo pear install MDB2_Driver_$mysql
我也尝试了这个:
sudo pear install MDB2_Driver_$mysql
I got his message for the above command: 我收到了上面命令的消息:
No releases available for package "pear.php.net/MDB2_Driver_"
install failed
You need to setup the include_path properly. 您需要正确设置include_path。 See the documentation .
请参阅文档 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.