Tag: php

SQLSRV PDO could not be found

I’m trying to configure php_pdo_sqlsrv_55_ts.dll on Windows 7 x64, with on board XAMPP x86. I’ve correctly installed the SQL Native Client 2012 and the Microsoft Visual C++ Redistributable (x64) package (I don’t know if the last one is needed or not). I’ve copied to C:\xampp\php\ext\ both the php_pdo_sqlsrv_55_ts.dll and the php_sqlsrv_55_ts.dll libraries downloaded from the […]

Symfony connect with Windows Azure

I know it may sounds crazy, but i want to connect a symfony project with microsoft azure database connection. I have searched a lot to find the solution, but I did not find a single example how to connect a symfony project with a microsoft sql server or with windows azure. Do anyone knows how […]

Can't display german umlauts even if UTF-8 is set wherever possible

Let me explain situation closer. Im working on some old company server with PHP 4. There is Windows 2000NT installed and a databaze that I can open with Microsoft Access 2000. There is no any option to set character encoding (unlike in phpMyAdmin), but I can read that characters in MS Access properly. Im extracting […]

MSSQL “String or binary data would be truncated.” Error on Update

I have a MSSQL table users: CREATE TABLE users ( ID int IDENTITY(1,1) NOT NULL, firstname nvarchar(20) NOT NULL, lastname nvarchar(20) NOT NULL, dir bit NOT NULL, cc nvarchar(15), readyacc bit NOT NULL, region nvarchar(50), org nvarchar(50), suborg nvarchar(50), section nvarchar(50), title nvarchar(50), floor tinyint, wkstn nvarchar(50), fc nvarchar(15) ); And I’m trying to update […]

is mysqli command also avaible for use in mssql server?

I still haven’t tried using mysqli, because i wanna know first if it can be used using mssql server because I’m still planning to buy a license of mssql server

Can't Get Codeigniter Count Result to Work

I’m pretty new to Codeigniter and pretty much struggling with just this simple task which I really really really don’t understand at all. I’m using Codeigniter version 3.0.4 and I’m working on a project to create an admin page to monitored some transaction data. What I’m trying to do is just counting data from SQL […]

SQLSRV Query Returning Output Parameter As Strange Text

I have a stored procedure in SQL Server 2012 which first checks if data exists, if it does then it sets the Output parameter @Return to 1 and runs a select query and if not, sets @Return to 0 and returns a different select query. When testing this stored procedure to ensure the data is […]

Connecting to MSSQL with Codeigniter PHP

So I got project. It’s complete and it should work, now I’m trying to run it. It’s using PHP 5.6 and Codeigniter, DB is MSSQL11.SQLEXPRESS. I’m running project on XAMPP Here’s my db config: $db[‘default’][‘hostname’] = ‘127.0.0.1’; $db[‘default’][‘port’] = ‘1433’; $db[‘default’][‘username’] = ‘user’; $db[‘default’][‘password’] = ‘password1234’; $db[‘default’][‘database’] = ‘DataBase004’; $db[‘default’][‘dbdriver’] = strncasecmp(PHP_OS, ‘WIN’, 3) == […]

Using PDO's odbc to connect to a MSSQL server instance with Windows Authentication

I’m trying to connect to a MSSQL database using PDO with odbc. I’m aware that there’s a package SqlSrv (but for some reason that package (.dll) won’t load properly). So I found some documentation arguing it’s also possible with PDO. In my PHP.ini I’ve enabled the extension php_pdo_odbc.dll and it loads fine. My connection string […]

Codeigniter: How to setup connection to a SQL server (2008)

I’ve spent many days on this task, and I can’t see the end until now. In the past day I managed to install sqlsrv driver on my PHP environment successfully but now when I try to connect I get this message: Unable to connect to your database server using the provided settings. My settings in […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.