RE: [PHP-WIN] connections to oracle...

From: Date: Tue, 29 Apr 2003 14:18:27 +0000
Subject: RE: [PHP-WIN] connections to oracle...
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-19717@lists.php.net to get a copy of this message
These functions are probably not loaded by default. you can solve this by preceding any calls with; if(!extension_loaded('oracle')) { if(strtoupper(substr($PHP_OS,0,3)) == "WIN") dl('php_oracle.dll'); else dl('php_oracle.so'); } or something like this. good luck, Warren Vail warren@vailtech.net -----Original Message----- From: Kit DeKat [mailto:kitdekat@earthlink.net] Sent: Tuesday, April 29, 2003 7:07 AM To: php-windows@lists.php.net Subject: [PHP-WIN] connections to oracle... ive been trying to incorporate PHP into the webpages throughout my company, but 90% of these pages are using Perl make Oracle connections and handling all the SQL calls. When i try to use the ora_* and oci* functions in PHP, the errors messages tell me that said function is undefined. Fatal error: Call to undefined function: ocilogon() in D:\var\www\html\tgrounds\dbtest.php on line... PHP code is as follows: <?php putenv('ORACLE_SID=kdk_db'); putenv('ORACLE_HOME=x:\oracle8i'); putenv('TNS_ADMIN=x:\oracle8i\network\admin'); $foo = exec("echo %ORACLE_SID%"); echo $foo; // prints 'kdk_db' $conn = OCILogon("scott","tiger","") or // <--- stops here die("Couldn't logon to database"); // $dbcon = ora_login("scott","tiger"); if( ora_open($dbcon) ){ echo "opened successfully"; ora_close($dbcon); } else { echo "cant open dbconn: ". ora_error(); } ?> Best regards, Kit DeKat mailto:kitdekat@earthlink.net Systems Programmer -----BEGIN PERL GEEK CODE BLOCK----- Version: 0.01 P++>+++@$c---P6-R >++M+$O+>+++(++)$MA >+E+PU >+BD >++C >*$ D++S++>+++@X>++WP?MO?PP!n?CO?PO--o?G A--Ee+++Ev w+m! ------END PERL GEEK CODE BLOCK------ -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.windows (#19717) next »