php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55105 ActiveRecord\DatabaseException
Submitted: 2011-07-01 11:44 UTC Modified: 2016-03-08 01:27 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: carl dot mcmullen at bsci dot com Assigned:
Status: No Feedback Package: PDO OCI
PHP Version: 5.3.6 OS: RedHat Enterprise 5.5
Private report: No CVE-ID: None
 [2011-07-01 11:44 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-01 11:54 UTC] aharvey@php.net
-Status: Open +Status: Feedback
 [2011-07-01 11:54 UTC] aharvey@php.net
Are you able to reproduce this by directly constructing a PDO object?
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
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.
 [2016-03-08 01:27 UTC] sixd@php.net
-Package: PDO related +Package: PDO OCI
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC