PHP 7.1.2
Roundcube 1.2.3 - Complete
SQL Server 2016
Windows Server 2016
Downloaded Microsoft PHP drivers (SQLSRV40.EXE) from:
https://learn.microsoft.com/en-us/sql/connect/php/step-1-configure-development-environment-for-php-development
I get the following error message when trying to run the Roundcube installer and unable to continue:
Sorry but your webserver does not meet the requirements for Roundcube!
Please install the missing modules or fix the php.ini settings according to the > above check results.
Hint: only checks showing NOT OK need to be fixed.
Nothing is marked as "NOT OK" on the entire page, however the database does not appear to be recognized. See the following copied from the installer page:
Checking available databases
Check which of the supported extensions are installed. At least one of them is required.
MySQL: NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-mysql.php)
PostgreSQL: NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-pgsql.php)
SQLite: NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-sqlite.php)
SQLite (v2): NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-sqlite.php)
SQL Server (SQLSRV): NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-sqlsrv.php)
SQL Server (DBLIB): NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-dblib.php)
Oracle: NOT AVAILABLE(See http://www.php.net/manual/en/book.oci8.php)
I have verified the Microsoft drivers are in the PHP extension directory and attempted to include the following extensions (one at a time) in PHP.ini:
extension=php_sqlsrv_7_nts_x64.dll
extension=php_pdo_sqlsrv_7_nts_x64.dll
I have also tried other various SQL related extensions and restarted IIS and/or Windows with no success.
It appears that the SQLSRV dll files must match the version of your PHP. I installed PHP 7.1 and attempted to use Microsoft's 7.0 driver.
After locating the proper driver from GitHub.com/Microsoft/... it placed the "OK" next to the MS SQLSRV and enabled the "Next" button to continue the RoundCube WebMail install.
For ubuntu 16 operating system try to run
php -m
if mysqli is not shown after running this command then install mysqli
For PHP 7.0 version
sudo apt-get install php7.0-mysqli
For PHP 5 version
sudo apt-get install php5-mysqli
Related
I am trying to install LimeSurvery 4.2 with MSSQL option, but unable to get the MSSQL option in database configuration screen only MySQL option in dropdown.
Already Install Microsoft library for PHP SQLServer, register the dlls in php.ini
extension=php_pdo_sqlsrv_53_ts.dll
extension=php_sqlsrv_53_ts.dll
extension=php_sqlsrv_72_ts.dll
Current PHP version is 7+
Please help me out how to configure LimeSurvery with MSSQL server.
for sqlsrv : you need complete PHP number version.
If you have 7.2 : you need php_pdo_sqlsrv_72_ts.dll + php_sqlsrv_72_ts.dll only … see microsoft manual …
Check you error log of apache or IIS to know what happen
Maybe you need to add ODBC Driver too
I am running a Linux server that already has freetds installed, but is not configured to support dblib. Only sqlite and mysql are currently supported for PDO. MSSQL support is also enabled.
If I want to add support for dblib and enable the PDO Driver for FreeTDS/Sybase DB-lib, do I just need to run this command on the existing install:
./configure --with-pdo-dblib
If so, from which directory would I run the command?
Environment:
PHP Version 5.5.38
CENTOS 6.9
Thank you
If you have configured FreeTDS correctly, you should be able to connect like so:
$pdo = new PDO("dblib:host=mssql;dbname=$dbname", "$dbuser","$dbpwd");
If you can't, this answer gives more explicit instructions: Connect PHP to MSSQL via PDO ODBC
pdo_dblib is typically installed in most Linux distros when you install php-mssql (on CentOS and Ubuntu, for example). If the connect command isn't working, please rewrite your question to include the specific steps you have taken and the error output. Good luck!
Since writing this question, the support team at the company that is hosting this server installed the driver. I don't know exactly what steps they took to do it so I can not post a step by step answer as I would like. Closing this question.
I tried to enable PDO_OCI in whm cPanel through software -> Module insataller -> PHP Pecl but it shows error like
WARNING: "pear/PDO_OCI" is deprecated in favor of "channel://http://www.php.net/pdo_oci/ext/pdo_oci" pear/PDO_OCI requires PHP extension "pdo" (version >= 1.0) No valid packages found install failed The PDO_OCI.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20100525 Tidying /usr/local/lib/php.ini... No changes Tidying /usr/local/cpanel/3rdparty/php/54/etc/php.ini... No changes
Then i tried to install PDO and shows
WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO" downloading PDO-1.0.3.tgz ... Starting to download PDO-1.0.3.tgz (52,613 bytes) .............done:
So please help me how can i enable PDO_OCI in my WHM cPanel.
When trying to print phpinfo() from my server it shows PDO is enabled.
If you got that far, you may just need to load the pdo_oci extension in cPanel's PHP configuration:
WHM -> Service Configuration -> PHP Configuration Editor
Advanced Mode
Find the "extension" section and add pdo_oci.so to the comma
separated list Save the PHP configuration
Check phpinfo() again - you should see pdo_oci available
If that does not work and you still have issues, you can always build the new (non-pecl) pdo_oci into cPanel's PHP manually as follows:
Ensure you have the Basic and Devel Instant Client installed (http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html)
Create (or update) the rawopts file (example: /var/cpanel/easy/apache/rawopts/all_php5) for your PHP version to include this line: ---with-pdo-oci=shared,instantclient,/usr,12.1 (assuming you installed version 12.1 of the Oracle Instant Client using RPM)
In our case, the PHP LDAP module was checked in EasyApache, so I had to remove the LDAP module from the instant client install to prevent a conflict during compilation: rm /usr/include/oracle/12.1/client64/ldap.h
Rebuild your profile in EasyApache
If successful, add pdo_oci.so to the PHP configuration as outlined above
As noted, these steps are only applicable to cPanel.
Today some of my packages in Ubuntu was upgraded automatically, and I didn't think of what was actually going on.
Ever since the update, my local dev-environment doesn't work anymore. First of by not working was mod_rewrite which I had to enable again using a2enmod. But now I've run into an issue that I can't seem to resolve. My application can't seem to find the PDO MySQL driver. When running the application, I get the error failed to open the DB connection: could not find driver.
This is strange, since if I check the phpinfo() the PDO drivers do support MySQL, and the socket path is a valid path.
pdo_mysql client API version is 5.5.35 according to php info.
PHP5: 5.5.3
MySQL: 5.5.35
Connectionstring
mysql:host=127.0.0.1;dbname=MyDB;port=3306
What could be causing this?
The PHP MySQL driver (mysql.so/mysqli.so) and the PHP PDO MySQL driver (pdo_mysql.so) are two separate modules. You need both of them for PDO functionality with MySQL.
It is quite possible that one of them is missing or of an incompatible version - I do not have an Ubuntu system at hand, but on my RPM-based Linux distribution there is a separate package for each module (php-mysql/php-mysqli and php-pdo_mysql). I also expect PDO to be using the newer mysqli.so driver, rather than the obsolete mysql.so one, so you should verify that one is installed as well.
Try this:
sudo apt-get install -y php5-mysql php5 mysql-client
This should automatically restart your apache if any of the dependencies aren't installed.
Try using vagrant.
Dependencies can be isolated, upgraded and downgraded when you like.
Vagrant
Does Windows 8 supports sql server driver for php.
I found that system Requirements for sql Driver does not contain Windows 8.
I installed and configured sql driver for php on wamp server, but sqlsrv doesn't show in phpinfo().
It's working fine for me on windows 8, if you don't activate the good extension in php.ini, by default (int XAMP) the slqsrv extension is selected extension=php_pdo_sqlsrv.dll, in my case, I am using PHP 5.4 and have configured the following extension:
extension=php_pdo_sqlsrv_54_ts.dll
See Readme file provided with the installation drivers to see which extension to activate in your case.
Restart the server and it's done.