1

I'm trying to save an old, failing web-server setup consisting of Fedora, PHP, PEAR, and Oracle.

With some difficulty (I'm very new to all four), I've been able to set up something similar on a newer system. I used Fedora 19, PHP 5.5.4 (with Apache 2.4.6), and Oracle 11g.

That just leaves PEAR.

Now, from what I understand, PEAR is some PHP code, like a library, which PHP Web Applications can use to save time from having to code them again - database connection, for example.

But I don't know what to do with it, or even how to get it. Copy paste from my old system? Download using the CLI using yum? Are there packages I need to be aware of, or is it just a one download-one install thing?

For instance, a basic PHP webpage with the following code:

<?php
phpinfo();
?>

works fine on the new server setup, so I'm assured that everything else is working. But when I try to load the PHP files from the other server, it returns an Internal Server Error. I checked the error_log files under /etc/httpd/logs, and most of the errors appear as below:

PHP Fatal error: require_once(): Failed opening required 'MDB2.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/hrweb/includes/functions.php on line 4

EDIT:

According to the PEAR Website, PEAR is included upon the installation of PHP, though not all modules / packages are there. Typing in the command pear in the CLI does confirm it is installed, though it does not help the issue.

I got the MDB2 package via pear install MDB2, though apparently, MDB2_Driver_oci8 is required. Whenever I try to download that, I get the following:

"MDB2_Driver_oci8" version "1.4.1" does not have REST XML available

In addition to this, I also tried to download OLE, which gets me the following:

No releases available for package "pear.php.net/OLE"

This was also previously the error of trying to download MDB2_Driver_oci8.

Thanks.

4

1 回答 1

1

您必须安装(惊喜!)MDB2 包才能获得MDB2.php

$ pear install mdb2

和您选择的适配器:

$ pear install mdb2_driver_mysql-beta

然后确保 PEAR php 目录在您的包含路径中 - 请参阅PEAR 手册


“MDB2_Driver_oci8”版本“1.4.1”没有可用的 REST XML

尝试安装测试版:

$ pear install mdb2_driver_oci8-beta

没有可用于包“pear.php.net/OLE”的版本

您正在尝试安装稳定版本,但 OLE 还没有任何稳定版本:http: //pear.php.net/package/OLE/download

在 OLE-alpha或之后附加:-beta

$ pear install OLE-beta
于 2013-11-07T07:41:31.997 回答