I'm getting PHP Warning: oci_connect(): OCIEnvNlsCreate() failed. when i'm trying to execute php.exe "c:\xampp\htdocs\test.php" from command line....
But if i browse it by (localhost/test || ip/test) browser it works....
Same code and instandclint (INSTANTCLIENT_11_2) version on another same machine works... i'm sure i'm doing something wrong.
basically i want to run a php file from command prompt (schedule run) which will do something and upload the data to oracle server. manually it is working but not from scheduling...
Any help would be great thanks in advance. (right now i'm running that schedule from my demo PC, which working to upload data to LIVE pc where it is not) weird!!!
thanks
Farness
**oci8**
OCI8 Support enabled
Version 1.4.5
Revision $Revision: 305257 $
Active Persistent Connections 0
Active Connections 0
Oracle Instant Client Version 11.1
Temporary Lob support enabled
Collections support enabled
test file
<?php
$i=0;
// include('OraCon.php');
$c = oci_connect('user', 'pass','localhost/BDDBERP.LOCALHOST');
$s = oci_parse($c, "select DEST, DESTCODE from DESTCOUNTRY ORDER BY DEST");
oci_execute($s);
while (($row = oci_fetch_array($s, OCI_BOTH))) {
echo $row['DEST'] . ", ".$row['DESTCODE'].";";
$i++;
}
oci_free_statement($s);
oci_close($c);
?>