I have a xampp running with PHP 5.6. Normally I use mysql server, but for a script that already exists i need a MS SQL server.
I searched on the net and installed SQL server 2012.
But now I need the drivers for PHP. Unfornunately I can only find a version that supports 5.4, 5.5..
(http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx)
Is there a way to let this work with 5.6?
Microsoft recently released a new version (3.2) of the SQL Drivers for PHP which includes compatibility with PHP 5.6.
You can download the drivers here: https://www.microsoft.com/en-us/download/details.aspx?id=20098
I searched the net for a while.. After posting this question for 10m, I finally found a unofficial driver..
Hope this works, I will check this out..
You can find it on: http://robsphp.blogspot.be/2012/06/unofficial-microsoft-sql-server-driver.html
I believe it's time to revisit this answer a bit better.
Since you've been pretty clear with your setup. The short answer is placed as steps below
Download ver 3.2 of the SQLSRV drivers from here.
https://www.microsoft.com/download/details.aspx?id=20098
Do extract them to your "xampp installation path"\php\ext
Kindly ensure you see and keep the files : php_sqlsrv_56_ts.dll and php_pdo_sqlsrv_56_ts.dll
Please delete the redundant files below:
PHP Drivers License Terms.rtf,
php_pdo_sqlsrv_54_nts.dll,
php_pdo_sqlsrv_54_ts.dll,
php_pdo_sqlsrv_55_nts.dll,
php_pdo_sqlsrv_55_ts.dll,
php_pdo_sqlsrv_56_nts.dll,
php_sqlsrv_54_nts.dll,
php_sqlsrv_54_ts.dll,
php_sqlsrv_55_nts.dll,
php_sqlsrv_55_ts.dll,
php_sqlsrv_56_nts.dll,
release.txt,
SQLSRV_Readme.htm,
SQLSRV_ThirdPartyNotices.rtf,
Place these lines in your php.ini at your "xampp installation path"\php\php.ini
extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_ts.dll
Restart your XAMPP server and place a '<'?php phpinfo(); ?'>' in an index.php file at \htdocs\'folder'
Navigate to it using http://localhost/'folder where phpinfofile is placed'/index.php
If you see something like this image below. It's done, Congratulations]1
PS : The long answer is here.
https://msdn.microsoft.com/en-us/library/cc296170.aspx
At this time:
My solution was:
1- Download ver 3.2 of the SQLSRV drivers from here. https://www.microsoft.com/download/details.aspx?id=20098
2 Extract the files to your "xampp" folder into the \php\ext
3- Add this lines to php.ini
extension=php_pdo_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_nts.dll
extension=php_sqlsrv_56_ts.dll
extension=php_sqlsrv_56_nts.dll
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 IIS install (the one that comes with windows server 2016) with a working PHP 7.2 install.
I downloaded the php_mongodb.dll from here http://pecl.php.net/package/mongodb/1.5.2/windows (I grabbed the 7.2 x64 'thread safe' version -- matter?)
I copied the dll into the php extensions folder: C:\Program Files\PHP\v7.2\ext
I then added extension=php_mongodb.dll to the php.ini file located at C:\Program Files\PHP\v7.2\
I then restarted IIS (well, the entire system)
I can then run a phpinfo() and the results do not included the word "mongo".
I also try running print_r(get_loaded_extensions()); and the results do not include the word 'mongo'.
I further try running some of the options here:
http://php.net/manual/en/mongo.tutorial.connecting.php and recieve server errors in the browser.
... so, how can I get a php->mongodb connection?
(alternately, what I'm ultimately trying to do is connect a javascript SPA to a mongodb back end... are there other options than going through a php intermediary? -- it's an internal app, so security isn't the fearsome beast it would normally be)
Turns out the exact version of the dll you download matters. I needed the x86 non-thread-safe version for some reason.
Still can't get a connection, but at least it's in the list of loaded extensions.
try out all the possible files. atleast one may work i downloaded like 15 or 16 for my wamp 64 bit none worked.then i tried 7 versions in iis and finallly one worked. php version,build,archetecture all matters.
I am facing some issue while starting Apache server via XAMPP. I have installed XAMPP Version 5.6.3.
When I start the Apache server from xampp control panel, an error message is displayed as shown below:
On clicking 'OK' button, another dialog box is displayed as shown:
The thing is I wanted to use OCI instead of mysql. so I have commented out the mysql extensions and uncommented the OCI extension in php.ini file.
The php_oci8_12c.dll file is the only file available in the extensions (ext) folder of php in xampp. Hence I included the line in the php.ini as shown in the above image.
Since then I am getting this error.
I have installed instant client 12.1 as well but no luck. I also tried copying the OCI.dll from instantclient_12_1 and pasting it in c:/xampp/php and c:/xampp/apache/bin. The error still persists.
Need help..
UPDATE: I removed other oracle paths in PATH of environment variables, keeping only the instantclient path. Now I am getting this error..
Well, I've installed XAMPP 1.8.2, PHP 5.4 and Apache 2.0, and I use php_oci8_11g.dll and works fine.
You are trying use php_oci8_12g.dll, I recommend you read this link http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-12c-2088811.html with especifications for run oci12g.
I solved the issue after stuck 2-3 days .
Before follow steps Some things to remmember .
1- I am using win 8.1 64 bit .
2- Using Xampp 5.6.31 32 bit .
3- Using instaclient 12.2.0.1 64 bit (Because my win 8.1 is 64 Bit ) .
Now steps are below -
Step 1 - Download xampp 5.6.31 32 bit and install it .
Step 2 - Download and install oracle 11g R2
Step 3 - Download and install OTN (oracle instaclient 12.2.0.1 )
Extract all files in any drive in my case i have extract in C:\oracle\instaclient12.2.0.1
Add (C:\oracle\instaclient12.2.0.1 ) it to the path variables of the system. and also add new variable under variable of system with name TNS_ADMIN and put same path (C:\oracle\instaclient12.2.0.1 ) in its value .
Its time to set PHP.INI here uncomment following (see image below)
PHP.ini setup
Copy 3 files from C:\oracle\instaclient12.2.0.1 oci.dll,oraociei12.dll and oraons.dll to xampp apache\bin . by this step Unable to load dynamic library issue has been resolved .
Unable to load dynamic library issue solution
Now restart Apache on xampp and check info.php on browser . OCI8 module will appear there enable .
Enjoy !!!.
I solved the issue. The problem was that I was trying to use a 64 bit DLL(php_oci8_12g.dll) in a 32 bit PHP. I downloaded a 32 bit instantClient and it works now! :-)
instantclient-basic-nt-12.1.0.2.0.zip
I had a problem related to OCI8 and XAMPP for days in a row, the problem was shown as:
Fatal error: Call to undefined function oci_connect()
I was able to correct it using the php that comes by default with XAMPP. I'm using windows 10 64 bits as well, but used xampp-win32-7.3.2-0-VC15 (php 7.3.2). To summarize, I was able to get a correct configuration by doing everything with 32 bits versions (except the o.s). The full story and how I've done it:
If you go to your xampp/php directory through cmd, in my case it was "C:\xampp\php", and start the php by the simple command "php" it will probably show what dlls are not being found in the etc folder or which of those are not Win 32 compatible. If you get this problem, you will not be able to see the OCI8 page when opening a phpinfo() page:
If that's the case, with win 32 compatibility problems or not finding the dlls that you are certain are there, you should unistall XAMPP and reinstall it using a x32 version. The phpinfo page will show x86 Architecture. Remember to remove in the path variables any source that miss locate your php in use, the point here is to use the one given by default in XAMPP. If you need by any reason to use another php installation, remember to use x86 architecture.
If you need an updated OCI8 dll you can download it on https://pecl.php.net/package/oci8 , but remember to check the Thread Safety compatibility, you can find it on your phpinfo page as well. In my case it was enough to use the one provided by XAMPP.
After this, you have to enable the extension:
extension=oci8_12c
in the php.ini configuration file. It was enough for me to enable only this one, although some people suggests to also enable extension=pdo_oci. My suggestion is to try this only if you failed to install with the path here shown. It's also good to check if you are set in the correct path regarding the extensions, in my case:
extension_dir="C:\xampp\php\ext"
After this, you have to download the Oracle Instant Client. Since you are using x86 architecture (you must use this one), you need to find a 32-bit version of the OIC, but is also important to check which one is compatible with the extension you uncommented. In my case, of oci8_12c, it was instantclient-basic-nt-12.2.
The final step is to unzip it to a folder, like "C:\instantclient_12_2" and add it to the path variables of the system.
Reload apache and check if the OCI8 is shown correcly.
I have a xampp running with PHP 5.6. Normally I use mysql server, but for a script that already exists i need a MS SQL server.
I searched on the net and installed SQL server 2012.
But now I need the drivers for PHP. Unfornunately I can only find a version that supports 5.4, 5.5..
(http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx)
Is there a way to let this work with 5.6?
Microsoft recently released a new version (3.2) of the SQL Drivers for PHP which includes compatibility with PHP 5.6.
You can download the drivers here: https://www.microsoft.com/en-us/download/details.aspx?id=20098
I searched the net for a while.. After posting this question for 10m, I finally found a unofficial driver..
Hope this works, I will check this out..
You can find it on: http://robsphp.blogspot.be/2012/06/unofficial-microsoft-sql-server-driver.html
I believe it's time to revisit this answer a bit better.
Since you've been pretty clear with your setup. The short answer is placed as steps below
Download ver 3.2 of the SQLSRV drivers from here.
https://www.microsoft.com/download/details.aspx?id=20098
Do extract them to your "xampp installation path"\php\ext
Kindly ensure you see and keep the files : php_sqlsrv_56_ts.dll and php_pdo_sqlsrv_56_ts.dll
Please delete the redundant files below:
PHP Drivers License Terms.rtf,
php_pdo_sqlsrv_54_nts.dll,
php_pdo_sqlsrv_54_ts.dll,
php_pdo_sqlsrv_55_nts.dll,
php_pdo_sqlsrv_55_ts.dll,
php_pdo_sqlsrv_56_nts.dll,
php_sqlsrv_54_nts.dll,
php_sqlsrv_54_ts.dll,
php_sqlsrv_55_nts.dll,
php_sqlsrv_55_ts.dll,
php_sqlsrv_56_nts.dll,
release.txt,
SQLSRV_Readme.htm,
SQLSRV_ThirdPartyNotices.rtf,
Place these lines in your php.ini at your "xampp installation path"\php\php.ini
extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_ts.dll
Restart your XAMPP server and place a '<'?php phpinfo(); ?'>' in an index.php file at \htdocs\'folder'
Navigate to it using http://localhost/'folder where phpinfofile is placed'/index.php
If you see something like this image below. It's done, Congratulations]1
PS : The long answer is here.
https://msdn.microsoft.com/en-us/library/cc296170.aspx
At this time:
My solution was:
1- Download ver 3.2 of the SQLSRV drivers from here. https://www.microsoft.com/download/details.aspx?id=20098
2 Extract the files to your "xampp" folder into the \php\ext
3- Add this lines to php.ini
extension=php_pdo_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_nts.dll
extension=php_sqlsrv_56_ts.dll
extension=php_sqlsrv_56_nts.dll
I'm trying to use SQL Server with PHP but I don't know how to install this feature. I have enabled extension=php_mssql.dll in my php.ini file but after restarting apache I got a error message saying that don't found the DLL file.
After much attempts I reinstalled XAMPP 1.81, and I'm starting now from zero.
Thanks for any help.
Edit MSSQL has been discontinued as of 5.3
I believe the correct driver is php_sqlsrv.dll.
http://www.php.net/manual/en/sqlsrv.installation.php
Here are the available functions: http://www.php.net/manual/en/ref.sqlsrv.php