Using PHP 5.4 and Freetds - php

I keep getting the following message when trying to connect to a ms sql database via PHP
Fatal error: Call to undefined function mssql_connect()
I need to do it using FREETDS, I have followed the instructions: http://docs.moodle.org/24/en/Installing_MSSQL_for_PHP
I am using WAMP with php 5.4 the extension is ticked in my extension list in wamp toolbar. One thing I wonder is whether it's something to do with freetds.conf under a standard wamp install where should this go? I have it sitting in the root of c and under bin/php/php5.4.16. The only info I have changed in it is the IP address of the server I want to connect to, is this correct?

Related

Connecting to MS SQL Server via XAMPP PHP undefined function sqlsrv_connect

I'm new to PHP (and web servers for that matter).
Here's what I'm dealing with.
Database Server: MS SQL Server 2014 Express
Web Server: XAMPP v3.2.2
PHP: PHP Version 7.3.0
I'm trying to connect to my database via PHP.
Here's what I've done thus far.
1) Since I need drivers for PHP Version 7.3.0, I got them at https://github.com/Microsoft/msphpsql/releases (Windows-7.3.zip)
There are four files in the folder.
2) I've placed all possible combinations of those files in C:\xampp\php\ext and added/deleted corresponding lines like "extension=php_pdo_sqlsrv_73_nts"
I don't know if it matters, but I placed all the lines just under all the other extensions (the last on the list is "extension=shmop").
3) Then I've proceeded to http://localhost/dashboard/phpinfo.php, but there was no changes on this page. And my connection attempt results in the same error:
Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect()
Any help would be appreciated. Thank you!

SQL server error: Unable to connect to your database server using the provided settings

Again I am here with an error, i have connected my PHP with SQL server from an IP Address and it works properly in my local PC. but when i transfer my source codes to my client PC it gives below error:
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: C:/xampp/htdocs/SAT_POS/system/database/DB_driver.php
Line Number: 436
but actualy i have included the extension also and set in php.ini, see below:
extension=php_sqlsrv_56_ts.dll
extension=php_sqlsrv_54_ts.dll
the above two lines are included in the php.ini file and the extension directory is also the default one, see below:
extension_dir="C:\xampp\php\ext"
and in CI database code I configured like below :
You have to pick ONE SQL Server database extension ONLY.
You have also loaded one extension that is compiled for PHP 5.4
php_sqlsrv_54_ts.dll
AND one that is compiled for PHP 5.6
php_sqlsrv_56_ts.dll
Pick the ONE extension that matches your currently runnning PHP version
Also did you load the SQLServer client software on your clients PC.
At last with the help of the stack genius who commented on this I have done the work!
Just installed ODBC DRIVER for SQL SERVER on the windows!

Oracle Instant Client is installed and the php_oci8 is enabled, but php throws: Call to undefined function oci_connect()

I try to get to work my PHP server and an Oracle database (12c). The problem is that PHP throws this error:
Call to undefined function oci_connect()
After reading a few posts, I installed Oracle Instant Client. The environment is an Ubuntu, to be precise its a Laravel Homestead vagrant box. The sqlplus connect is working, so I can log in into the database, but PHP still doesn't find the oci_connect() function. I also enabled the php_oci8.dll.
Is there any idea what the problem is?

"Call to undefined .. mssql_connect" when using PHP in IIS?

May is ask you about how to connect to Microsoft SQL server 2005 enterprise using PHP.
I am using Appserv 2.5.10 ( Apache 2.2.8, PHP 5.2.6) and SQL server 2005
After I place the extension download from this link :
http://www.microsoft.com/en-us/download/details.aspx?id=20098
enable the php.ini file by adding these lines.
extension=php_pdo.dll
extension=php_sqlsrv_52_ts_vc6.dll
extension=php_pdo_sqlsrv_52_ts_vc6.dll
Restart Apache using this code to connect
$link = mssql_connect($server, $user, $pass);
Error shown in browser is
Fatal error: Call to undefined function mssql_connect() in G:\AppServ\www\testmssql_connect.php on line 12
can anyone help me ?
NOTE: i am using windows server 2003 and i don't found this OS in OS supporting list of Microsoft Driver 3.0 for PHP. Is this issue cause the problem ?
Look at this link:
PHP Fatal error: Call to undefined function mssql_connect()
1) Check your PHP.INI file's extension_dir
2) Make sure you copied your .dlls into that directory (for example, into C:\PHP\ext").
3) Create a dummy page to call phpinfo();. Display the page in a browser. Make sure you see entries for "sqlsrv".
'Hope that helps!

help with PHP and interbase

im trying to create a PHP web application to connec to an interbase database. Iv installed xampp for the PHP and Apache. I then installed Firebird SQL 2.5 to get the required DLL's. however iv noticed that in the php\ext folder there doesnt seem to be a php_interbase.dll which from what iv read is needed. can some one please direct me in the right direction where I can get the needed DLL or even how i should ste up my machine in order for me to be able to connect to interbase.
when i try to connect to the database i get the following error
Fatal error: Call to undefined function ibase_connect() in C:\xampp\htdocs\phase\includes\config.php on line 11
php_interbase.dll Requires: gds32.dll (bundled)
http://www.firebirdfaq.org/faq191/
http://www.alberton.info/firebird_php_windows.html
Yes, it can. If your client is 64-bit, it's called ibclient64.dll, not gds32.dll
for windows64
copy file C:\Program Files\Firebird\Firebird__\WOW64\fbclient.dll
to :C:\Windows\SysWOW64\fbclient.dll

Categories