|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-05-29 11:38 UTC] thies at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
-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>