[PHP-DB] Apache 2.2 + PHP5.2 + php_oci8.dll

2006-12-22 Thread james tanhs

Sorry, I posted into the php-general newsgroup earlier.

Hi,

I saw numerous posting on this type of posting and no one seems to have a
consistent solution to it.

Lately, I am quite disapointed with the pain of going thru this
configuration and testing.
I need to access the oracle 8i server db using XP + Oracle client 8i +
Apache 2.2 + PHP5.2 and I have tried
the following without success.  What is the error ? not sumething special
but common
PHP Warning:  PHP Startup: Unable to load dynamic library
'c:\\php52\\ext\\php_oci8.dll' - The specified procedure could not be
found.\r\n in Unknown on line 0
1.  download the php_oci8.dll from
http://pecl4win.php.net/ext.php/php_oracle.dll (you name the version, tried
everythign doesn't work)
2.  assign ORACLE_HOME, NSL_LANGUAGE...nope...doesn't work.
3.  use old php4.1.xx + Apache 1.3xx on XP with Oracle client 8i...nope
doesn't work ( I use this in my NT4, it works like charm)
4.  Zendcore for oracle...no no...it doesn't support Oracle 8i connectivity.

5.  anyone know where to look for oracle 8i/9i clients for linux ? not
available at oracle website :(

Anyone can help ?

Tq


Re: [PHP-DB] Apache 2.2 + PHP5.2 + php_oci8.dll

2006-12-28 Thread james tanhs

Hi Chris,
I read the write out and found that oracle 10g client only support 9i and
above. So I assumed that it will not work with mine  server runing on
oracle8i (8.1.5) with 8 compatible set.  Hence, I didn't try to install the
10g client for any testing.  I will get it download later to have a try.

Yup, I have visited
http://www.oracle.com/technology/software/products/database/oracle10g/index.htmland
Previous database releases.  I am able to see the 10g client and 9i
server is there but not the 9i client for linux ( I just wonder why).
Thanks.


On 12/27/06, Christopher Jones [EMAIL PROTECTED] wrote:



PHP's oci8 extension on Windows is now compiled with an Oracle 10g client
and depends on new functionality in it.  The 10g Oracle Instant Client is
freely available (and trivial to install) from
http://www.oracle.com/technology/tech/oci/instantclient/index.html
PHP configured with it will connect to Oracle 8i (aka 8.1) onwards, but
not
to Oracle 8.0.

Zend Core for Oracle bundles Instant Client.  Since you had problems with
this,
I'm wondering if the correct Oracle environment was set up for PHP?

On #5, Oracle 9 on Linux is available from Oracle's database release
download
page.  Follow the Oracle9i link beneath Previous database releases on

http://www.oracle.com/technology/software/products/database/oracle10g/index.html

Chris

james tanhs wrote:
 Sorry, I posted into the php-general newsgroup earlier.

 Hi,

 I saw numerous posting on this type of posting and no one seems to have
a
 consistent solution to it.

 Lately, I am quite disapointed with the pain of going thru this
 configuration and testing.
 I need to access the oracle 8i server db using XP + Oracle client 8i +
 Apache 2.2 + PHP5.2 and I have tried
 the following without success.  What is the error ? not sumething
special
 but common
 PHP Warning:  PHP Startup: Unable to load dynamic library
 'c:\\php52\\ext\\php_oci8.dll' - The specified procedure could not be
 found.\r\n in Unknown on line 0
 1.  download the php_oci8.dll from
 http://pecl4win.php.net/ext.php/php_oracle.dll (you name the version,
tried
 everythign doesn't work)
 2.  assign ORACLE_HOME, NSL_LANGUAGE...nope...doesn't work.
 3.  use old php4.1.xx + Apache 1.3xx on XP with Oracle client 8i...nope
 doesn't work ( I use this in my NT4, it works like charm)
 4.  Zendcore for oracle...no no...it doesn't support Oracle 8i
 connectivity.

 5.  anyone know where to look for oracle 8i/9i clients for linux ? not
 available at oracle website :(

 Anyone can help ?

 Tq


--
Christopher Jones, Oracle
Email: [EMAIL PROTECTED]Tel: +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/



[PHP-DB] pdo_odbc and odbc

2006-12-29 Thread james tanhs

Hi,
I m running on :
client: XP + Apache2.2+Php5.2 ( enabled pdo, pdo_odbc, Merant)
server: oracle8i
Are there anyone having the same problem ?
Thanks.

?php

// option 1
$db = new PDO('odbc:his', 'his', 'passwd');
$db-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $db-prepare(select name from his_cust_mst where mrn = ?);
$stmt-bindValue(1, '003568', PDO::PARAM_STR);
try {
  $stmt-execute();
 while ($row = $stmt-fetch()) {
  print_r($row);
 }
} catch (PDOException $e) {
  echo Syntax Error: .$e-getMessage();
}

// option 2
$Connection = odbc_connect(his,his,passwd);
$stmt = odbc_prepare($Connection, select name from his_cust_mst where
mrn=?);
$res = odbc_execute($stmt, array('003568'));
if($res) $row = odbc_fetch_array($stmt);
print_r($row);


Errors:

Option1
Syntax Error: SQLSTATE[HY000]: General error: 3129 [MERANT][ODBC Oracle 8
driver][Oracle 8]ORA-03129: the next piece to be inserted is required
(SQLExecute[3129] at ext\pdo_odbc\odbc_stmt.c:133)

Option2
Warning: odbc_execute() [function.odbc-execute]: SQL error: [MERANT][ODBC
Oracle 8 driver][Oracle 8]ORA-01008: not all variables bound , SQL state
S1000 in SQLExecute in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\hnet\testodbc.php on line 30


?