Bug #1336: Wh
| From: | mpoduje at smartmedia dot com dot ar | Date: | Wed, 21 Apr 1999 00:23:46 +0000 |
| Subject: | Bug #1336: Wh | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-5163@lists.php.net to get a copy of this message | ||
From: mpoduje@smartmedia.com.ar
Operating system: Linux Slackware 3.6 (Kernel 2.2.x)
PHP version: 3.0.7
PHP Bug Type: Oracle related
Bug description: Wh
-When i try to connect to Oracle 8.0.5 EE from the apache webserver, i recieve an ORA 01034 (
Oracle Not Available), but the oracle is Up..
- My php3.ini is a default file
script:
<HTML>
<HEAD>
</HEAD>
<BODY>
Hola
<br>
<?php
PutEnv("ORACLE_HOME=/usr/local/oracle/app/oracle/product/8.0.5");
PutEnv("ORACLE_NLS=/usr/local/oracle/app/oracle/product/8.0.5/ocommon/nls/admin/data");
PutEnv("ORACLE_SID=alfa");
$conn = ora_logon('system', 'manager');
$curs = ora_open($conn);
ora_commitoff($conn);
$query = sprintf("select * from emp");
/* Long version */
/*
ora_parse($curs, $query);
ora_exec($curs);
ora_fetch($curs);
*/
/* Short Version */
ora_do($conn, $query);
$ncols = ora_numcols($curs);
$nrows = ora_numrows($curs);
printf("Result size is $ncols cols by $nrows rows.<br>");
for ($i=0; $i<$ncols; $i++) {
printf("col[%s] = %s type[%d] = %s<br>",
$i, ora_columnname($curs, $i),
$i, ora_columntype($curs, $i));
}
for ($j=0; $j<$nrows; $j++) {
for ($i=0; $i<$ncols; $i++) {
$col = ora_getcolumn($curs, $i);
printf("val[%d, %d] = %s ", $j, $i, ora_getcolumn($curs, $i);
}
printf("<br>");
}
?>
</BODY>
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net