I have had a problem trying to establish a connection to a MSSQL database I created in Microsoft SQL Server Manager 2008 R2 using php 5.5.19 in XAMPP.
In the php.ino configuration file under extensions, there is commented out a ';extension=php_mssql.dll'. I removed the comment and ran apache in the xampp control panel.
Naturally an error occurred stating ''PHP Startup: Unable to load dynamic library '..\ext\php_mssql.dll cannot be found'. I looked in the ext directory and sure enough it wasn't there. I added the mssql.dll file from
www.dll-files.com/dllindex/dll-files.shtml?php_mssql
,but then I got an Entry Point not found error stating 'The procedure entry point php_body_write could not be located in the dll php5ts.dll'.
After further research, I discovered that mssql_connect was not working since PHP version 5.3: http://php.net/manual/en/intro.mssql.php
I instead tried to use the 'sqlsrv_connect'' function, but I had to install the new drivers from https://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
After reading the readme, I saw that I needed the libraries php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll to work with xampp's php5ts.dll in the php folder.
I added the libraries in the php\ext folder and added corresponding extensions to the new dll's and restarted Apache.
I then got an system error 'The program can't start because MCVCP110.dll is missing from your computer. Try reinstalling the program to fix this problem.' Obviously reinstalling isn't an option as I will lose my new dll's so I verified that MCVCP110.dll is in the php folder, which it was.
Please help, I really need to find a way to load the libraries with the 'sqlsrv_connect' function properly so I can connect to a MSSQL database.
Related
I am just trying to set up a Oracle instant client 19 database connection using PHP and XAMPP.
I have followed several Youtube videos, other stack posts and it still does not show the oci8 module on phpinfo.php. I also recieve the error Call to undefined function oci_connect()
What I have done:
Installed XAMPP with PHP enabled.
Downloaded Version 19.9.0.0.0 Basic x64 from - https://www.oracle.com/uk/database/technologies/instant-client/winx64-64-downloads.html and extracted to C:\ named instantclient_19_9
Set up my environment path = C:\instantclient_19_9
Restarted PC
Downloaded oci.dll from - http://pecl.php.net/package/oci8/2.0.8/windows
Selected 5.5 Safe thread x64
Extracted into C:/xampp/php/ext
Went into php.ini and removed semi-colon from extension=oci8_19
Restarted Apache
Looking in XAMPP/php/ext, there is php_oci8.dll and php_oci8_19.dll extensions there.
Went onto phpinfo.php and nothing is displaying for oci8
Not sure what else I need to do, at this point, all walkthroughs show their phpinfo pages and they all show the oci extension. I tried uninstalling XAMPP and removing all files then trying again but each time it doesn't work so I must be missing something. I have done this for SQLITE and MYSQL and they worked just fine, just oracle.
For extra measures, I have also tried an answer someone suggested in a post and it also hasn't worked:
Add oci.dll, oraociei19.dll, and oraons.dll from C:\instantclient_19_9 to xampp/apache/bin folder. Replace the existing ones.
Restart the Apache
I have an application based on Sybase database. The application is running on a Windows Server 2003. I tried to fetch the database from the php and it is showing a number of dll files are missing including the php sybase extension. I checked the php extension dir and found that the file exists on the path where it is showing the errors.
Here i would like to mention that i installed xampp 1.8.0 on the windows server and enabled the sybase extension form the php.ini.
I used the following code to connect as mentioned on the php doc
<?php
$link = sybase_connect('SYBASE', '', '')
or die("Could not connect !");
echo "Connected successfully";
sybase_close($link);
?>
== Update ==
It was showing that the following dll files were missing and i downloaded and added them manually.
libcs.dll
libintl.dll
iconv.dll
Now i am getting the following error,
The procedure entry point iconv_open could not be located in the dynamic link library iconv.dll
This error is present from the beginning of enabling the Sybase PHP extension.
PHP Startup: unable to load dynamic library 'C:\xampp\php\ext\php_sybase_ct.dll' - the specified procedure could not be found
When I've seen unable to load dynamic library 'C:\xampp\php\ext\php_sybase_ct.dll' the issue has come down to a) having an old/outdated set of libs or b) using an application that references the 'old' Sybase lib names (with ASE 15, Sybase changed the names of their libs and some apps haven't picked up on this).
For the first issue the obvious (?) resolution would be to download the appropriate set of Sybase libs (which is going to depend on your application code/version as well as the ASE version). [Not enough info in your post to know if this explains your scenario.]
For the second issue there's a relatively easy solution (the following is based on a PHP app that has a Sybase-specific sub-directory containing the Sybase client-side libs):
in a Windows cmd window ..
source the *.bat file for your application [load your app's env]
cd to the Sybase sub-directory named ...\OCS*\scripts
run copylibs.bat
try starting your PHP app again and ...
if the issue is fixed then the php_sybase_ct.dll error message should go away
i have installed WAMP 3 and it has bee working without any issues for the past few months... Since yesterday there is a problem
When i open the phpmyadmin i get the below error
phpMyAdmin - Error
The mbstring extension is missing. Please check your PHP configuration.
and when i access any codeigniter page i get this error
Fatal error: Call to undefined function mysqli_init()
It worked perfectly until yesterday. I didnt install any new software's or upgrade anything
What i have done so far:
-through WAMP the mysqli and mbstring extensions are enabled. Its also uncommnted
-the extension path has been set correctly
-the ext folder has all the necessary DLL files
Can someone please tell me what might be causing this? im unable to work on my localhost
In order to access an remote Oracle database from php, I had to activate the extension php_oci8_12c. But when I do, it does not appear in the phpinfo().
On the other hand, I get in the php logs the error message:
[13-Jan-2017 08:39:48 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp64/bin/php/php7.0.10/ext/php_oci8_12c.dll' - %1 is not a Valid win32 application
I use php 5.6.25 and wampserver 3.0.6 (64 bit). How can I resolve this?
Well, I faced this error too and managed to fix it.
Before downloading every kind Oracle Client Version just take a look at your http://localhost/?phpinfo settings at Configure Command section.
This will tell, which version of Oracle was used to build your WAMP server.
The image above show this two lines:
"--with-pdo-oci=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared"
"--with-oci8-12c=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared"
Obviously tell us that InstantClient used is 64 bits.
There are two versions of InstantClient 12.1 x64: 12.1.0.2.0 and 12.1.0.1.0
I tested with 12.1.0.2.0 version and failed.
After that, I tested with old one, 12.1.0.1.0 version and worked.
Download from Instant Client for Microsoft Windows (x64) and extract the files below to "c:\oracle":
instantclient-basic-windows.x64-12.1.0.2.0.zip
instantclient-sqlplus-windows.x64-12.1.0.2.0.zip
instantclient-sdk-windows.x64-12.1.0.2.0.zip
This will create the following folder "C:\Oracle\instantclient_12_1".
Using "Windows Command Prompt" (WIN+R CMD) go to folder above and execute SQLPLUS:
sqlplus [user]/[pass]#[host]:[port]/[service]
You must be able to connect.
Finally, add the "C:\Oracle\instantclient_12_1" folder to the PATH enviroment variable, placing it on the leftmost place.
Close your WAMP server.
Yes close it, because the Enviroment Variable is only read at launch time.
So restarting the services may fail, leading you to a wrong result.
After restart, your PHPINFO would show the OCI8 and PDO_OCI loaded.
I hope it helps!
I read some steps about this one but I can't really get it. I'm using wamp server for this with PHP 5.3.5. I tried to use the php_oci8.dll by checking the PHP>PHP extensions>php_oci8 but I get an error saying
PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.5/ext/php_oci8.dll - The specified module could not be found
When I go to the path the php_oci8.dll is there. How can I fix this? Can anybody give me a steps on how can I configure it so that I can connect to a remote server?
Try to download the latest version of the dll here php_oci8-1.4.1-5.2-vc6-x86.zip
I already figured it out! Here's my solution:
Install Oracle XE in your PC this will give you the latest oci.dll (not php_oci8.dll)
Create a link between your user and the user you will need in connecting to your database.
Restart your PC then try running your code if it's not working copy the oci.dll of your
Oracle XE (C:\Oracle\OUIHome\bin\oci.dll) then paste it in 9i replacing the old one (make sure to have a backup). then restart your PC.
Works fine on me. Thanks for those who help me in solving this one.