php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1336 Wh
Submitted: 1999-04-20 20:23 UTC Modified: 1999-05-29 11:38 UTC
From: mpoduje at smartmedia dot com dot ar Assigned:
Status: Closed Package: Oracle related
PHP Version: 3.0.7 OS: Linux Slackware 3.6 (Kernel 2.2
Private report: No CVE-ID: None
 [1999-04-20 20:23 UTC] mpoduje at smartmedia dot com dot ar
-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>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-29 11:38 UTC] thies at cvs dot php dot net
several people have had better success by defining ORACLE_HOME and ORACLE_SID in the env before they start apache, PutEnv doesn't seem to work here (but it's NOT a putenv problem!)


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Jan 25 14:01:24 2021 UTC