Re: connections to oracle...
| From: | Stephen | Date: | Tue, 29 Apr 2003 14:46:43 +0000 |
| Subject: | Re: connections to oracle... | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19718@lists.php.net to get a copy of this message | ||
A more permant solution is to edit the php.ini file and look in the
[Extensions] section for the oracle.dll file. That way the oracle functions
will always be included rather than having to re-load them each time a
script is run... (this is a windows solution only as far as i know... I
think on non windows you have to re-compile php with oracle support)
----- Original Message -----
From: "Warren Vail" <warren@vailtech.net>
To: "Kit DeKat" <kitdekat@earthlink.net>; <php-windows@lists.php.net>
Sent: Tuesday, April 29, 2003 3:18 PM
Subject: RE: [PHP-WIN] connections to oracle...
> 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
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>