php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41676 PDO Startup Error
Submitted: 2007-06-13 07:08 UTC Modified: 2008-08-22 18:15 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: alison dot holloway at oracle dot com Assigned: jmertic (profile)
Status: Closed Package: Windows Installer
PHP Version: 5.2.3 OS: Windows XP SP2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alison dot holloway at oracle dot com
New email:
PHP Version: OS:

 

 [2007-06-13 07:08 UTC] alison dot holloway at oracle dot com
Description:
------------
Startup errors when using PDO_OCI8 extension.

Reproduce code:
---------------
Install PHP 4.2.3

Select the following extensions to include in the install:

OCI8
PDO
PDO_OCI8

Turn on display_startup_errors in php.ini.

The following errors are displayed on Apache start up:

PHP Startup: Invalid library (maybe not a PHP library) 'php_pdo_oci8.dll'
PHP Startup: Invalid library (maybe not a PHP library) 'php_pdo_oci8.dll'

phpinfo() says the following PDO libraries are loaded

PDO
PDO support	enabled
PDO drivers 	oci

PDO_OCI
PDO Driver for OCI 8 and later	enabled

Run a small Oracle 10g PDO script. This is the script I used against and Oracle Database XE (10.2) database:

<?php

print_r(PDO::getAvailableDrivers());

  $dbh = new PDO('oci:dbname=//localhost/XE', 'hr', 'hr');
  $s = $dbh->prepare("select city from locations");
  $s->execute();
  while ($r = $s->fetch(PDO::FETCH_ASSOC)) {
    echo $r['CITY'] . "<br>";
  }
  $dbh = null;    // release the connection
?>

This script works, so PDO is actually installed and okay.

Here is the startup error in the Apache error log:

[Wed Jun 13 10:06:48 2007] [notice] Apache/2.0.59 (Win32) PHP/5.2.3 configured -- resuming normal operations
[Wed Jun 13 10:06:48 2007] [notice] Server built: Jul 27 2006 15:55:03
[Wed Jun 13 10:06:48 2007] [notice] Parent: Created child process 3516
PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'php_pdo_oci8.dll'  in Unknown on line 0
[Wed Jun 13 10:07:01 2007] [notice] Child 3516: Child process is running
[Wed Jun 13 10:07:01 2007] [notice] Child 3516: Acquired the start mutex.
[Wed Jun 13 10:07:01 2007] [notice] Child 3516: Starting 250 worker threads.

The files in my C:\Program Files\PHP\ext folder are:

php_oci8.dll
php_pdo.dll
php_pdo_oci8.dll
php_pdo_oci.dll

The entries in my php.ini are:

[PHP_OCI8]
extension=php_oci8.dll
[PHP_PDO]
extension=php_pdo.dll
[PHP_PDO_OCI]
extension=php_pdo_oci.dll
[PHP_PDO_OCI8]
extension=php_pdo_oci8.dll

Expected result:
----------------
No startup errors.

Actual result:
--------------
The following errors are displayed on Apache start up:

PHP Startup: Invalid library (maybe not a PHP library) 'php_pdo_oci8.dll'
PHP Startup: Invalid library (maybe not a PHP library) 'php_pdo_oci8.dll'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-13 07:10 UTC] alison dot holloway at oracle dot com
Of course, I meant "Install PHP 5.2.3" as the first line to reproduce this.
 [2007-06-25 18:56 UTC] tony2001@php.net
Edin, what is php_pdo_oci8.dll and why do we have two dlls for PDO_OCI?
 [2007-06-26 01:50 UTC] alison dot holloway at oracle dot com
On Windows platforms, the php_pdo_oci8.dll library was built against the Oracle8i and 9i library. php_pdo_oci.dll was built against the Oracle 10g library. So, php_pdo_oci8.dll may be used with Oracle 8i or 9i clients, and php_pdo_oci.dll should be used to connect to Oracle 10g clients.

If both libraries are installed, this would likely cause problems connecting to Oracle.
 [2007-06-26 11:09 UTC] tony2001@php.net
So what do you propose, Alison?
 [2007-06-28 04:44 UTC] alison dot holloway at oracle dot com
My suggestion is to change the installer so that the following occurs.

Under PDO extensions, have two options for the Oracle PDO drivers:

1. Oracle8i/Oracle9i Client
   This installs php_pdo_oci8.dll

2. Oracle10g Client and above
   This installs php_pdo_oci.dll

The PDO library is based on the Oracle Client, not the Oracle Database, so I think it's important to state that in the install notes in the right hand pane when selecting the option. 

Each option should be mutually exclusive. So you can't install both. This will cause problems.

The current two installs seem to do the same thing, install the php_pdo_oci8.dll and php_pdo_oci.dll files. It doesn't make sense.

As for the errors that are currently happening, I haven't done any further investigation, but I'd suggest getting the install right now, then fixing the dll loading issues.
 [2007-06-28 13:16 UTC] jmertic@php.net
Checked into CVS the change for the textual description in the installer for pdo_oci8 and pdo_oci as described below. The Wix UI doesn't have a good way to make features mutually exclusive, so I've put notes in the right pane when selecting the extension to pick the right one.

 [2007-06-28 20:12 UTC] sniper@php.net
Assuming this is fixed now.
 [2007-06-29 06:12 UTC] alison dot holloway at oracle dot com
Apart from the text change, has the .dll change been made so that both .dlls aren't installed for the different options?

I will retest when the next release is made available.
 [2007-07-02 05:57 UTC] alison dot holloway at oracle dot com
I checked the latest PHP build (200707020030), and now the PDO driver for Oracle 10g and above client installs, and does not throw errors on startup. My test connection to Oracle works as well.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 22:01:29 2024 UTC