sqlsrv php not installing properly - php

I am trying to connect to my MS sql server through php.
I have set up a webserver and installed php using WAMP. I downloaded sqlsrv dll and added them to ext folder and then included it in php.ini
extension=php_pdo_sqlsrv_55_ts.dll
I can see that it's installed through WAMP:
However, when I check my phpinfo(), I don't see any reference to sqlsrv.
Any help would be appreciated. Thanks in advance!

Related

missing oci.dll and failed to load php_oci8.dll [duplicate]

I installed oracle 11g and I did create some tables and manipulate it using sql developer, and I am looking for a way to connect oracle with php on hosting site.
I tried but I get error after using this code:
$Conexion_ID =oci_connect($OracleUser, $OraclePassw, $OracleIP);
this is the error:
Call to undefined function oci_connect()
I've known that I should install and configure OCI8, so I downloaded this file:
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
but I don't know in which folder should I them to make the connection work well.
Download the PHP Extension from here(Confirm the PHP Version and download for the same, the thread safe[TS] version):
http://pecl.php.net/package/oci8/2.0.8/windows
You should be able to find three .dll's
php_oci8.dll, php_oci8_11g.dll and php_oci8_12c.dll
Place all dll's in extension directory, in WAMP it is generally wamp\bin\php\php5.*.*\ext
open the php configuration from the System try of wamp server and add the line:
; Enable only which is required
;extension=php_oci8.dll
extension=php_oci8_11g.dll
;extension=php_oci8_12c.dll
Restart the Apache server.
EDIT : Sorry I thought the other dll's are the libraries, but instead they are for different oracle versions. In your case enable 11g. Answer updated.
Update 2016-11-07: just wanted to say that latest package can be found here https://pecl.php.net/package/oci8. When I wrote this answer 2.0.8 was latest i guess.
if you are using wamp server on windows than you have to use the php_oci8.dll not the oci8.so. You need to download php_oci8.dll and copy it to ext directory under the PHP. If you don't have this extension in your PHP than install it and go to php.ini and add extension=php_oci8.dll.
Please make sure that wamp server have two php.ini files you have to change it on both the places. once everything is done than check with php info that oci 8 installed or not.

Moodle Error: database driver problem detected

I Have installed Moodle Version MOODLE_39_STABLE following the original documentation: https://docs.moodle.org/310/en/Step-by-step_Installation_Guide_for_Ubuntu
During the installation of Moodle, I am facing the issue
Error: database driver problem detected.The site administrator should
verify the server configuration PHP has not been properly configured
with the MySQLi extension for it to communicate with MySQL. Please
check your php.ini file or recompile PHP.
I have gone through several forums, StackOverflow tasks enabled php7.4_mysql extension uncommented the extension=mysqlnd.so in my php.ini file restarted the apache server but there is no use.
Please let me know what exactly I am doing wrong.
Server: Ubuntu 18.04
Web server: Apache2
Php : Php 7.4
Moodle Version: Moodle 39_stable
It seems you have mysql extension installed and you need mysqli (i stands for improved) extension: https://www.php.net/manual/en/book.mysqli.php

Installing the Mongo PHP Extensions (php_mongo.dll)

Environment in local system
MAMP 3.2.2
PHP 5.6.24
Webserver Apache
Mongodb for caching is installed successfully and found running in MongoDBservice.
I Downloaded Mongodb drivers from https://pecl.php.net/package/mongodb (used thread safe versions PHP5.6 "php_mongodb.dll") selected php_mongo-1.1.8-5.6-ts-vc11-x64.zip, Made changes to php.ini as extension=php_mongo.dll
I just copied and pasted .dll file in my C:\MAMP\bin\php\php5.6.24\ext
So far good... After restarting my MAMP I cannot see mongo in phpinfo ---->This is my issue
Any idea about this?
Thank you
Just copying the DLL file to the correct directory is not enough. You also need to add the following line to your php.ini file before the MongoDB extension is available:
extension=php_mongo.dll
After that restart Apache and MongoDB should show up as an available extension in phpinfo().
By the way, that is also mentioned on the official PHP website for installing the MongoDB driver: http://www.php.net/manual/en/mongodb.installation.windows.php
Should be extension="php_mongodb.dll instead of extension="php_mongo.dll as it is the name of the file you copied.
In my case, I first downloaded a x64 version of php_mongo.dll, which did not show in phpinfo page. Then i downloaded a x86 version and everything works fine. Hope this helps.
PS. Make sure you pick the right php version.

Cannot install Microsoft SQL driver for PHP 5.6 on Windows

I have been trying all day long and nothing. No sqlsrv extension, no logs, nothing. The sqlsrv_connect() function is not defined and I don't see the extension in phpinfo(). I tried WAMP at first. It didn't work. Now I am doing it bit by bit.
I have Windows 10
I installed SQL Express 2005 (is what I need for RMS).
I installed Apache 2.4.16 (x86) in C:\Apache\apache24 from here
I installed PHP 5.6.12 TS (x86) in C:\PHP\php5_6_12 from here
Configured Apache to load php5apache2_4.dll (and changed several other settings so it can run PHP files)
I downloaded Microsoft Drivers for PHP for SQL Server (file SQLSRV32.EXE) from here
I extracted php_pdo_sqlsrv_56_ts.dll and php_sqlsrv_56_ts.dll to the ext folder of PHP
Set up extension_dir like extension_dir = "ext"
Added the extensions to php.ini
I start Apache (httpd.exe), see no errors (neither inside the error.log file)
Now, when I open the file that outputs phpinfo() I don't see the extension anywhere. The sqlsrv_connect() is undefined.
I don't see where the PHP related errors are saved (maybe is not configured yet) and I am just stuck after trying thousands of solutions. Can't believe how hard is this in our century. PHP is really old but I really need to have this working.
print phpinfo() and and find sqlsrv. if you'r not able to find in phpinfo()
then, go to wamp and enable the extension my be you have not enable the extension , same issue happens with me so.. pls check
if you are using wamp with 64bit than you need to use unofficial Microsoft SQL Server Driver for PHP (sqlsrv)

OCI8 php extension installation on windows server

I have specific problem with making OCI8 work on my server installation.
First setup:
Win 2008 Server 32bit
ZendServer for PHP with Apache2.2
PHP version 5.3.14 which was without php_oci8 files
No oracle things installed
I need to be able to connect to remote oracle database, so I find out, that OCI8 extension should be used. To make OCI8 work, I also should need at least Oracle Instant Client on server, because of certain DLL OCI8 need.
What I did?
downloaded Oracle Instant Client from their sites ( oracle download site ), version 11.2.0.4.0
unpacked into folder, I choosed Program Files/oci_11_2
added to windows variable path the address
restarted Win
downloaded php_oci8 libraries from PECL ( PECL oci8 dl site )
put them into the ext directory set in php.ini
added extension=php_oci8.dll into php.ini
restarted apache
After all this I checked php_info to see, if everything is ok, however no signs of oci8.
I tried older Oracle instant client, swtiching between php_oci8.dll, php_oci8_11g.dll or php_oci8_12c.dll, yet nothing helped.
I found, that due to php_info in environment section doesn't show the same values, as one that are set in windows.
From php error log I also got following:
[30-May-2014 08:02:16 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\Zend\ZendServer\lib\phpext\php_oci8_11g.dll' - The specified module could not be found.
in Unknown on line 0
Currently, I have no idea what to do, unless trying reinstalling php(which I don't want to because of many problematics connected with that), different Oracle instant clients or differenct php_oci8 libraries. I google for some hours, tried looking on Stack, but no solution, just some tips, that didn't help. Have someone encountered and solved something similar?
I have Same Issue, Following steps helped me out.
Download instantclient and place "C:\instantclient_11_2"
Set environment variable for C:\instantclient_11_2
Check your php version i.e. PHP Version 5.6.15
Form http://pecl.php.net/package/oci8 download exact version, for me its php_oci8-2.0.8-5.6-nts-vc11-x86.zip, unzip it and copy
php_oci8_11g.dll to php ext folder, for me its "C:\xampp\php\ext"
Un-Comment "extension=php_oci8_11g.dll" in php.ini and restart apache
check php_info(), oci8 should be enabled.
Thats all.

Categories