Bug #55105 [Fbk->NoF]: ActiveRecord\DatabaseException
| From: | php-bugs at lists dot php dot net | Date: | Mon, 18 Feb 2013 00:34:55 +0000 |
| Subject: | Bug #55105 [Fbk->NoF]: ActiveRecord\DatabaseException | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-177013@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55105&edit=1
ID: 55105
Updated by: php-bugs@lists.php.net
Reported by: carl dot mcmullen at bsci dot com
Summary: ActiveRecord\DatabaseException
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: PDO related
Operating System: RedHat Enterprise 5.5
PHP Version: 5.3.6
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2011-07-01 11:54:38] aharvey@php.net
Are you able to reproduce this by directly constructing a PDO object?
------------------------------------------------------------------------
[2011-07-01 11:44:32] carl dot mcmullen at bsci dot com
Description:
------------
---
From manual page: http://www.php.net/ref.pdo-oci
---
I built PHP 5.3.6 from Source using the following commands in a bash script. The
compile, install process ran without errors.
#!/bin/bash
export ORACLE_HOME=/oracle/product/10.2.0
export MYSQL_DIR=/usr/local/mysql-5.1.52
export PHP_HOME=/usr/local/php-5.3.6
./configure \
--prefix=$PHP_HOME \
--with-apxs2=/usr/sbin/apxs \
--with-mysql-sock=/tmp/mysql.sock \
--with-oci8=$ORACLE_HOME \
--with-mysql=$MYSQL_DIR \
--with-mysqli=$MYSQL_DIR/bin/mysql_config \
--with-pear=$PHP_HOME/lib/php \
--with-libdir=lib64 \
--with-ldap \
--with-curl \
--enable-mbstring \
--with-pdo-mysql=$MYSQL_DIR \
--with-pdo-oci=$ORACLE_HOME
make
make install
Test script:
---------------
require_once "php-activerecord/ActiveRecord.php";
date_default_timezone_set ( "America/Chicago" );
ActiveRecord\Config::initialize(function($cfg) {
$cfg->set_model_directory("models");
$cfg->set_connections(array( "oracle" =>
"oci://envsviewer:guidant3@stpsn155/latenvs" ));
$cfg->set_default_connection("oracle");
});
Expected result:
----------------
A successful connection to the Oracle DB.
Actual result:
--------------
Fatal error: Uncaught exception 'ActiveRecord\DatabaseException' with message
'exception 'PDOException' with message 'SQLSTATE[]: pdo_oci_handle_factory:
OCI_INVALID_HANDLE (/usr/local/src/php-5.3.6/ext/pdo_oci/oci_driver.c:579)' in
/var/www/html/latenvsdev/classes/php-activerecord/lib/adapters/OciAdapter.php:25
Stack trace: #0 /var/www/html/latenvsdev/classes/php-
activerecord/lib/adapters/OciAdapter.php(25): PDO-
>__construct('oci:dbname=//st...', 'envsviewer', 'guidant3', Array)
>#1
/var/www/html/latenvsdev/classes/php-activerecord/lib/Connection.php(101):
ActiveRecord\OciAdapter->__construct(Object(stdClass)) #2
/var/www/html/latenvsdev/classes/php-activerecord/lib/ConnectionManager.php(33):
ActiveRecord\Connection::instance('oci://envsviewe...') #3
/var/www/html/latenvsdev/classes/php-activerecord/lib/Table.php(103):
ActiveRecord\ConnectionManager::get_connection(NULL) #4
/var/www/html/latenvsdev/classes/php-activerecord/lib/Table.php(80):
ActiveRecord\Table->reestablish_connection(false) #5
/var/www/html/latenvsdev/cla in /var/www/html/latenvsdev/classes/php-
activerecord/lib/Connection.php on line 109
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55105&edit=1