|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-22 15:52 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
Description: ------------ I am running the following configuration: IIS6 (not by choice =) Windows 2003 Server PHP Version 5.1.4 Oracle 9i (On a different server) All works well under Apache2, however the following error occures under IIS6; "PHP has encountered an Access Violation at 018994A9". I have tracked down the problem to a resource ID to an Oracle connection that is passed into the constructor of a class as a global (see code below). I can pass in any other variable as a global in the constructor, but not a Oracle resource. Reproduce code: --------------- ---------------File 1 - dbConnect.inc.php---------------- $oci_c1 = oci_connect(OCI_USER, OCI_PASS, OCI_TNS); if (!$oci_c1) { ... more code ... exit; } ---------------File 2 - Document.class.php -------------- require_once('dbConnect.inc.php'); class Document { public function __construct() { global $oci_c1, $_SITE; .... more code .... } } Expected result: ---------------- It is expected that the resourceID ($oci_c1) becomes avaliable to the class as it does when run under Apache. If you change the first line of the class to read: class Document { public function __construct() { global $_SITE; .... more code .... } } All works fine, and you have access to the $_SITE var. Actual result: -------------- "PHP has encountered an Access Violation at 018994A9".