command line oci OCIEnvNlsCreate() failed - php

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);
?>

Related

mamp pro, php 7.3.8 and remote mssql server

i use mamp pro on mac (catalina) and try to connect to remote mssql server.
in order to work with mssql i installed on the relevant php mamp folder:
brew install msodbcsql17 mssql-tools
pecl install sqlsrv pdo_sqlsrv
than i updated the php.ini file
extension=sqlsrv.so
extension=pdo_sqlsrv.so
when i try to run (of course with the correct credentails and server name)
$db = new PDO("sqlsrv:Server=MY.SERVER;Database=MYDBNAME", "MYUSER", "MYPASS");
i get this error:
Fatal error: Uncaught PDOException: SQLSTATE[IMSSP]: This extension requires the Microsoft ODBC Driver for SQL Server to communicate with SQL Server. Access the following URL to download the ODBC Driver for SQL Server for x64: https://go.microsoft.com/fwlink/?LinkId=163712
what am i missing?
The PHP-PDO driver wants to access MS-SQL-server via the ODBC driver of SQL-server.
You need to install the odbc driver by doing
brew install msodbcsql17 mssql-tools
Afterwards, you need to enable TCP connections on sql-server, add a login, add the login to the correct role, and then you need to open port 1433, so TCP connections to SQL-server can work (unless you have both PHP and the sql-server run on the same machine).
And you might have to install UnixODBC:
brew install unixodbc
Also, you might have to add php_odbc to extensions
extension=php_odbc.dll
and php-fpm uses another ini file than php-cli/php-cgi.
On ubuntu, the PHP-fpm ini file is in
/etc/php/7.2/fpm/php.ini
while the other is in
/etc/php/7.2/cli/php.ini
Another alternative, if you can't get ODBC to work, is to use PDO_DBLIB, which uses FreeTDS instead of ODBC. That might be better anyway.
sudo pecl install pdo_dblib
However, that restricts you to php > 5.03 < 6.0.0.
Maybe you can compile it from source.
Mine works on Linux, all I had to do was:
sudo apt-get install php-fpm php-dev php-pear
sudo pecl install sqlsrv pdo_sqlsrv
(msodbcsql17 and mssql-tools I already had installed)
add the lines
extension=sqlsrv.so
extension=pdo_sqlsrv.so
into both ini files, and done.
Then I executed the connection-test-sample
php ./test.php
(i have port 2017, on docker), and it worked:
<?php
$serverName = "localhost,2017";
$connectionOptions = array(
"database" => "MY_DB_NAME",
"uid" => "sa",
"pwd" => "TOP_SECRET"
);
// Establishes the connection
$conn = sqlsrv_connect($serverName, $connectionOptions);
if ($conn === false) {
die(formatErrors(sqlsrv_errors()));
}
// Select Query
$tsql = "SELECT ##Version AS SQL_VERSION";
// Executes the query
$stmt = sqlsrv_query($conn, $tsql);
// Error handling
if ($stmt === false) {
die(formatErrors(sqlsrv_errors()));
}
?>
<h1> Results : </h1>
<?php
while ($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
echo $row['SQL_VERSION'] . PHP_EOL;
}
sqlsrv_free_stmt($stmt);
sqlsrv_close($conn);
function formatErrors($errors)
{
// Display errors
echo "Error information: <br/>";
foreach ($errors as $error) {
echo "SQLSTATE: ". $error['SQLSTATE'] . "<br/>";
echo "Code: ". $error['code'] . "<br/>";
echo "Message: ". $error['message'] . "<br/>";
}
}
?>
<h1>Results: </h1>
Microsoft SQL Server 2017 (RTM-CU16) (KB4508218) - 14.0.3223.3 (X64)
Jul 22 2019 17:43:08 Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.6 LTS)
I get a funny warning, though:
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/pdo_sqlsrv.so' -
/usr/lib64/php/modules/pdo_sqlsrv.so: undefined symbol:
php_pdo_register_driver in Unknown on line 0
If I remove
extension=pdo_sqlsrv.so
then it works, without warning.
Note:
Just fixed the crap.
If you run php --ini, it will list you all the ini-files php loads.
The correct location (on Linux) to put these two lines is
/etc/php/7.2/mods-available/pdo.ini
The above warning occurs if extension=pdo_sqlsrv.so is loaded before extension=pdo.so. Also, that way, you only need to set the extension ONCE, and it's done for both php-cli and php-fpm. The mods-available are then (already) symlinked into php-fpm and php-cli.
You might have the same problem on Mac.
To make sure there are no permission issues, create a test user that is sysadmin:
-- The available default languages:
-- SELECT * FROM sys.syslanguages AS sysl
CREATE LOGIN [WebServicesTest] WITH PASSWORD = 'TOP_SECRET'
,CHECK_EXPIRATION = off
,CHECK_POLICY = off
,DEFAULT_LANGUAGE = us_english;
EXEC master..sp_addsrvrolemember [WebServicesTest], N'sysadmin';
To test if the connection is actually working with the user, you can use AzureDataStudio.
Beware:
If your system uses OpenSSL 1.1 (e.g. Ubuntu 19.04), you need to download the insiders-build.
TDS-based providers (freeTDS/ODBC) need TCP open, even if you work on localhost.
if anyone needs the answer
turned out need to install one more thing:
brew install msodbcsql#13.1.9.2 mssql-tools#14.0.6.0

Issue loading SQL DLL PHP 5.6.32

I've been trying to establish a connection between a PHP script and a Microsoft Azure SQL database but keep running into this same issue. I've tried Xampp version 7.1.11 / PHP 7.1.11, 7.0.25 / PHP 7.0.25, and now I am using 5.6.32 / PHP 5.6.32.
I've installed the Microsoft Drivers for PHP for Microsoft SQL Server and am using the SQLSRV32.EXE for Version 5.6.32 which is added to the C:\xampp\php\ext folder.
When I edit the php.ini file to add extension=php_sqlsrv_56_nts.dll save and reboot apache in the php error log file I keep getting the error
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_sqlsrv_56_nts.dll' - The specified module could not be found. in Unknown on line 0
Each version of XAMPP that I've tried has done this. Can anyone lend an idea or a hand how I can get around this and complete my SQL connection using PHP to an Azure SQL database?
First, open a phpinfo() and search for the line Thread safety. If it says enabled, then you should use the Thread-Safe DLLs instead.
How to configure XAMPP to use with MSSQL?
So after further tinkering and research, I've finally solved the issue I've mentioned above. Unfortunately, the common google search provides this Microsoft Drivers for PHP for SQL Server which only contains drivers up to PHP Version 7.0.XX. For PHP Version 7.1.12 I've used the thread safe1 php_sqlsrv_71_ts_x64.dll found here Microsoft Drivers 4.3 for PHP for SQL Server. I'm not sure why it took me another three days to find this.
The connection to the Azure SQL Database now works, the steps are mentioned below.
1. Acquire the correct SQL driver from Microsoft
-If you are using PHP Version 7.0 or earlier the drivers can be found Here
-If you are using PHP Version 7.1 the drivers can be found Here
2. Install Microsoft ODBC Driver 13 for SQL Server
3. Install required .dll's to the php\ext folder. eg. C:\php\ext
4. Edit the php.ini file and ensure the extension_dir= points to the C:\php\ext folder that you placed the downloaded .dll's (drivers) in.
5. Add extension=required .dll name to the php.ini file approximately line 890. In my case this is extension=php_sqlsrv_71_ts_x64.dll
6. Save php.ini and restart Apache.
The PHP script I've used to test my connection is as follows: sqltest.php
$connectionInfo = array("UID" => "USERNAME", "pwd" => "PASSWORD", "Database" => "DBNAME", "LoginTimeout" => 30, "Encrypt" => 1, "TrustServerCertificate" => 0);
$serverName = "SERVERNAME";
$conn = sqlsrv_connect($serverName, $connectionInfo);
if (sqlsrv_errors($conn)) {
die('Failed to connect to Azure SQL: '.sqlsrv_errors());
} else {
echo "Connection to Microsoft Azure SQL Server has succeeded! <br /><br />";
}
$tsql = "SELECT * FROM [Users];";
$getResults = sqlsrv_query($conn, $tsql);
echo ("Reading data from table <br />" . PHP_EOL);
if ($getResults == FALSE)
echo(sqlsrv_errors());
while ($row = sqlsrv_fetch_array($getResults, SQLSRV_FETCH_ASSOC)) {
echo ($row['Id'] . " " . $row['Name'] . " " . $row['Username'] . " " . $row['Password'] . "<br /> " . PHP_EOL);
}
sqlsrv_free_stmt($getResults);
?>
Further information is provided by Microsoft Here
Thanks again for all of the helpful input from everyone above.

How to install PECL HTTP extension for XAMPP?

I want to install the PHP PECL HTTP extension in my XAMPP environment (OS is Windows). I have attempted to add multiple variations of the php_http.dll extension into my ext directory, and added extension=php_http.dll to the php.ini file. Yet when I go to start the Apache service, it throws some sort of error.
It's pretty clear I'm doing something wrong, however I have no idea what. The last relevant question I could find was 5 years out of date. Does anybody have any idea how to install this?
You can try:
For pecl.
Look in xampp\php for the pecl.bat file
Open a command console window in this folder and issue the pecl.bat command and it will give a list of commands to use.
You also have to load raphf and propro:
http://windows.php.net/downloads/pecl/releases/raphf/1.0.4/
http://windows.php.net/downloads/pecl/snaps/propro/1.0.0/
... and iconv, hash and spl.
This post shows how to install XAMPP on Windows to run PHP applications that connect to a remote Oracle Database.
*
XAMPP is an open source package that contains Apache, PHP and many PHP
'extensions'. One of these extension is PHP OCI8 which connects to
Oracle Database.
*
To install XAMPP: D: drive.
Download "XAMPP for Windows" and follow the installer wizard. I installed into my D: drive.
Start the Apache server via the XAMPP control panel.
Visit http://localhost/dashboard/phpinfo.php via your browser to see the architecture and thread safety mode of the installed PHP. Please note this is the architecture of the installed PHP and not the architecture of your machine. It’s possible to run a x86 PHP on an x64 machine.
Oracle OCI8 is pre-installed in XAMPP but if you need a newer version you can download an updated OCI8 PECL package from pecl.php.net.
Pick an OCI8 release and select the DLL according to the architecture and thread safety mode. For example, if PHP is x86 and thread safety enabled, download "7.2 Thread Safe (TS) x86". Then replace "D:\xampp\php\ext\php_oci8_12c.dll" with the new "php_oci8_12c.dll" from the OCI8 PECL package.
Edit "D:\xampp\php\php.ini" and uncomment the line "extension=oci8_12c". Make sure "extension_dir" is set to the directory containing the PHP extension DLLs. For example,
extension=oci8_12c
extension_dir="D:\xampp\php\ext"
Download the Oracle Instant Client Basic package from OTN.
Select the correct architecture to align with PHP's. For Windows x86 download "instantclient-basic-nt-12.2.0.1.0.zip" from the Windows 32-bit page.
Extract the file in a directory such as "D:\Oracle". A subdirectory "D:\Oracle\instantclient_12_2" will be created.
Add this subdirectory to the PATH environment variable. You can update PATH in Control Panel -> System -> Advanced System Settings -> Advanced -> Environment Variables -> System Variables -> PATH. In my example I set it to "D:\Oracle\instantclient_12_2".
Restart the Apache server and check the phpinfo.php page again. It shows the OCI8 extension is loaded successfully.
If you also run PHP from a terminal window, make sure to close and reopen the terminal to get the updated PATH value.
To run your first OCI8 application, create a new file in the XAMPP document root "D:\xampp\htdocs\test.php". It should contain:
<?php
 
error_reporting(E_ALL);
ini_set('display_errors', 'On');
 
$username = "hr";                  // Use your username
$password = "welcome";             // and your password
$database = "localhost/orclpdb";   // and the connect string to connect to your database
 
$query = "select * from dual";
 
$c = oci_connect($username, $password, $database);
if (!$c) {
    $m = oci_error();
    trigger_error('Could not connect to database: '. $m['message'], E_USER_ERROR);
}
 
$s = oci_parse($c, $query);
if (!$s) {
    $m = oci_error($c);
    trigger_error('Could not parse statement: '. $m['message'], E_USER_ERROR);
}
$r = oci_execute($s);
if (!$r) {
    $m = oci_error($s);
    trigger_error('Could not execute statement: '. $m['message'], E_USER_ERROR);
}
 
echo "<table border='1'>\n";
$ncols = oci_num_fields($s);
echo "<tr>\n";
for ($i = 1; $i <= $ncols; ++$i) {
    $colname = oci_field_name($s, $i);
    echo "  <th><b>".htmlspecialchars($colname,ENT_QUOTES|ENT_SUBSTITUTE)."</b></th>\n";
}
echo "</tr>\n";
 
while (($row = oci_fetch_array($s, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {
    echo "<tr>\n";
    foreach ($row as $item) {
        echo "<td>";
        echo $item!==null?htmlspecialchars($item, ENT_QUOTES|ENT_SUBSTITUTE):" ";
        echo "</td>\n";
    }
    echo "</tr>\n";
}
echo "</table>\n";
 
?>
You need to edit this file and set your database username, password and connect string. If you are using Oracle Database XE, then the connect string should be "localhost/XE".
The SQL query can also be changed. Currently it queries the special DUAL table, which every user has.
Load the test program in a browser using http://localhost/test.php. The output will be the single value "X" in the column called "DUMMY".
---- NOTE
Maybe this can help, but this issue is very complex in XAMPP. I have heard several reports about this problem in xampp, I advise testing VPS free for further study.
if you have any questions, post in the comments.
If something is incompatible or wrong, be sure to comment! thanks

oci_connect connection failed

I am having serious problem connecting to external ORA DB 11g from local Zend server CE.
OCI8 is enabled and running version 1.4.6 (due to phpinfo()).
I have tried many connection options (listed below) with the same error returned:
oci_connect(): ORA-28547: connection to server failed, probable Oracle Net admin error
After googling for whole day I am only able to say that this error means that PHP was able to comunicate with the server but was unable to connect to a concrete service/database and that the error shouldn't come from PHP itself...
I have set environment variable TNS_ADMIN to c:\oracle_instantclient_11_2 where the file tnsnames.ora is located containing this connection description:
MYDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = X.X.X.X)(PORT = 1521))
)
(CONNECT_DATA = (SID = MYDB)(SERVER = DEDICATED))
)
Using this description like
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=X.X.X.X)(PORT=1521)))(CONNECT_DATA=(SID=MYDB)(SERVER=DEDICATED)))
I am able to connect to the server and the service/database with sqlplus console, so the connection is very right. I am also using the very same HOST, PORT and SID to connect to the server with Sqldeveloper tool. The problem is when connecting to the server within a PHP...
What have I tried so far:
oci_connect("user", "password", "X.X.X.X:1521", "AL32UTF8", 0);
oci_connect("user", "password", "MYDB", "AL32UTF8", 0);
oci_connect("user", "password", "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=X.X.X.X)(PORT=1521)))(CONNECT_DATA=(SID=MYDB)(SERVER=DEDICATED)))", "AL32UTF8", 0);
All of these oci_connect calls above return the same error mentioned.
I had also tried the ezconnect way for 11g as stated here - [//]host_name[:port][/service_name][:server_type][/instance_name]:
oci_connect("user", "password", "X.X.X.X:1521/MYDB", "AL32UTF8", 0);
but the problem is I do not know the service name, only the service ID (SID), thus the error returned is this:
oci_connect(): ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
that says there is no service running with the service name provided (or that the ORA listener does not know of such service).
PHP version: 5.3.14
Appache v.: 2.2.22 (32bit) Zend
Zend server CE: 5.3.6
PHP info for OCI8:
OCI8 Support enabled
Version 1.4.6
Revision $Revision: 313688 $
Active Persistent Connections 0
Active Connections 0
Oracle Instant Client Version Unknown
Temporary Lob support enabled
Collections support enabled
Directive Local Value Master Value
oci8.connection_class no value no value
oci8.default_prefetch 100 100
oci8.events Off Off
oci8.max_persistent -1 -1
oci8.old_oci_close_semantics Off Off
oci8.persistent_timeout -1 -1
oci8.ping_interval 60 60
oci8.privileged_connect Off Off
oci8.statement_cache_size 20 20
Maybe the problem is that there is unknown version of Oracle instant client though it's path is set within both the TNS_ADMIN and PATH environment variables...
My question is: does anybody know of what have I done wrong? Am I missing something? I have googled for a whole day yesterday so probably (with 99% chance) any google links You would like to provide me with I have already seen and tried...
Though this question could be considered as an exact duplicate of this one - it has not been yet answered and I guess nobody will return back to that old question even if I post a comment I am having the connection problems too. Also keep in mind that in that similar question a different error is returned and asked about.
Due to several misconfigurations and 3 days lost while looking for a solution I moved to develop on Linux server and all of the problems are gone.
What I have found:
both php_oci8.dll and php_oci8_11g.dll are depending on the Oracle Instant Client libraries
these libraries does not contain oci_ functions (like oci_connect), only ociX functions (like ociLogon) which is strange...
though I am pretty sure I have downloaded Oracle Instant Client Basic and all of the extensions, I was not able to connect to another Oracle server due to unknown charset and the error was saying I am using only Lite instant client...
I tried both 64bit and 32bit instant client version at no avail
my Apache is 64bit, windows is 64bit, PHP is 32bit, remote Oracle server is 64bit, remote Linux server is 64bit...
tried many environment settings (ORA_HOME, TNS_ADMIN, adjusted PATH to look to instant client installation) at no avail
tried uninstalling local Oracle XE server due to possible environment settings interference at no avail
almost lost my head - at no avail...
So finaly on Linux server I have no problems connecting to remote Oracle server. Somewhere (while surfing over thousands of PHP-Oracle related pages) I have found an information that "one shouldn't develop PHP application connecting to Oracle server under windows" and should stick to UNIX system instead...
So anybody experiencing similar or same problems - be so kind and do not waste Your time, install a VirtualBox, run Linux on it and move forward!
to connect php to Oracle 11g version 11.2 you need to do following;
Step-1:
login to you db with sys as sysdba and execute following scripts.
**
execute dbms_connection_pool.start_pool();
execute dbms_connection_pool.restore_defaults();
**
Step-2:
in you PHP script
**
$conn = oci_connect("username", "password", "//hostname/servicename");
if (!$conn) {
$m = oci_error();
echo $m['message'], "\n";
exit;
}
else {
print "Connected to Oracle!";
}
// Close the Oracle connection
oci_close($conn);
**
Note: i). Make sure PHP_OCI8 and PHP_OCI8_11g exertions are enabled
ii). Oracle 11 is case sensitive.
Best Regards
Yasir Hashmi
I have had the same issue and tried to connect from my local machine to a remote server.
after 2 weeks of tring I finally got it to work.
the solution is very simple but not documented in the PHP documentation
so let us take the sample PHP provided:
$conn = oci_connect('hr', 'welcome', 'localhost/XE');
what they did not mention is that it points to the default port on the server.
if yours is set up to a different one you need to specify that.
see the new example below:
$conn = oci_connect('hr', 'welcome', 'localhost:1234/XE');
try that with your specified port.
Hope this helps
Just adding my two cents, as I Banged my head against the wall with this one... If all else fails, try this, Once you have downloaded the instant client, http://www.oracle.com/technetwork/topics/winsoft-085727.html, copy it's extracted contents to the apache/bin folder. It'll likely ask you to over-write the oci.dll. Do so, then restart apache/php. With luck this will fix the problem...
Good luck.
My solution on fedora 17:
1. yum install httpd httpd-devel.
2. yum install php php-mysql php-pear php-devel
3. Install oracle instantclient:
rpm -Uvh oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
rpm -Uvh oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm
4. pecl install oci8
This gives:
**
downloading oci8-1.4.7.tgz ...
Starting to download oci8-1.4.7.tgz (Unknown size)
.....done: 168,584 bytes
10 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Please provide the path to the ORACLE_HOME directory.
Use 'instantclient,/path/to/instant/client/lib' if you're compiling
with Oracle Instant Client [autodetect] :'
**
Just press enter.
5. Enable the OCI8 extension by creating a file, oci8.ini for example, with the following line at /etc/php.d/:
extension=oci8.so
6. service httpd restart
For the record (PHP 8.0.12), you can also try:
In the Apache bin folder, copy inside the next files
📁 apache24
....📁 bin
....... 📃oraociei12.dll
....... 📃oci.dll
....... 📃oraons.dll
You can find those files in the Instant client folder and in the bin folder.
Then restart Apache and that is.
The instant client, apache version and PHP version must be or 32bits or 64bits.
You can also try to connect using ez-connection (if you want to avoid using the tnsnames).

OCIEnvNlsCreate() failed. When i try to connect my oracle database in php

phpinfo
_ENV["ORACLE_HOME"] C:\oracle\instantclient_11_2\
_ENV["OS"] Windows_NT
_ENV["Path"] C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\oracle\instantclient_11_2;\;
oci8
OCI8 Support enabled
Version 1.2.5
Revision $Revision: 1.269.2.16.2.43 $
Active Persistent Connections 0
Active Connections 0
Temporary Lob support enabled
Collections support enabled
php code
<?php
$conn = OCILogon('mppd1','mppd1', "121.256.476.86:1521/mydatabase");
$query = 'select * from users';
$stid = OCIParse($conn, $query);
//OCIExecute($stid, OCI_DEFAULT);
while ($succ = OCIFetchInto($stid, $row)) {
foreach ($row as $item) {
echo $item." ";
}
echo "<br>\n";
}
OCILogoff($conn);
?>
i am getting this error
Severity: Warning
Message: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries
I solved it copying all the content of C:\instantclient_11_2 (please check what´s yours) inside system and system32 folders in Windows , then I delete the path of C:\instantclient_11_2 in the PATH enviroment variable.
I am using XAMPP and Windows 8 and it´s the first time I see this issue. I always configured properly oci 8 with xampp and windows in a few minutes. I hope this would help you.
You need to copy all content of the instant client to apache/bin
im using xampp and working for me.
copy all files of the instant client enter image description here to apache/bin
I was facing the same error on uwamp 3 in connecting to oracle 11gR2.
I deleted the oracle instantclient from path variable and copied all files from instantclient to uwamp\bin\apache\bin
and it worked.
My setup:
System: Windows 7
Instantclient: instantclient-basiclite-win32-11.1.0.7.0
Web Server: Uwamp3
https://forums.oracle.com/forums/message.jspa?messageID=1742926#1745145
There are several potential solutions on that page ranging from re-installing xampp to checking permissions to using native php oci_connect(). Have you tried any of these things?
Probably you should download InstantClient and replace contents of /instantclient folder of Oracle client with the .dll-s of InstantClient.

Categories