Tag: php

Using PHP, MSSQL, Jquery for instant search

I am trying to implement an instant search function using PHP, jQuery, and a MS SQL database. I’m not sure what the issue I’m having is, to be honest. I’m not getting any php errors, and the only thing I could possibly think it is is that there is some confusion in connection to the […]

Unable to load php_sqlsrv_55_ts.dll

I am using Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.15 with PHP 5.6.15 both 32 bit. I am unable to load php_sqlsrv_55_ts.dll. I have added extension=php_sqlsrv_55_ts.dll ; DLL for SQL SRV in php.ini and also kept the respective DLL in the ext directory. What could be the reason for this? PS: I downloaded the 32 bit dll file.

Calling 3 Stored Procedures with PDO DBLIB in PHP 5.4.4 fails

I try to call 3 SQL Server 2000 Stored Procedures one after the other using PDO DBLIB in PHP 5.4.4 (Linux) and I get an error at the second query : Fatal error: Call to a member function fetchAll() on a non-object The first query works perfectly, returning results as expected. If I move query […]

PHP: Custom Session Handler Unserialize Not Working on Windows

The development environment of my application is Zend Framework 1.11, MSSQL Server 2012, SQLSRV Extension for Database connectivity with PDO, Windows 7, IIS 7. Session is being stored in database by using custom session handler class. The issue is that when i print $_SESSION after session_start() which is written in Bootstrap.php file, it does not […]

How to grab code from another website (that I control)?

I want to enter a line of php into my site and have it echo out code that is to be entered on my site. Essentially I am controlling a part of a clients’ site and it is more convenient for all involved if I can change it without requiring them to upload it. This […]

Not getting connected to Sql Server 2012

I am getting following error while connecting to Sql Server 2012 in Laravel 4 PDOException SQLSTATE[IMSSP]: This extension requires the Microsoft SQL Server 2012 Native Client ODBC Driver to communicate with SQL Server. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712 As per this link […]

PDO truncates my SQL string in Prepared Statement, tries to bind parameter number 0?

Okay, so I’ve spent a couple days trolling google and finding absolutely nothing on this. Basically I’m using a prepared statement that has a couple joins and matches based on several LIKEs, an IN, and a FREETEXT. I’m building the query dynamically to support the IN condition. I think some code will help public function […]

Connecting to MSSQL server via php-pdo?

I’m unable to connect to MSSQL database on smarterasp.net domain. I’m using: PHP Tools for Visual Studio Here is the code: <?php try { $conn = new PDO(“mssql:host=host_name_string;dbname=database_name_string”, “username_string”, “password_string”); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo “Connected successfully”; } catch(PDOException $e) { echo “Connection failed: ” . $e->getMessage(); } ?> […]

search in a local database (sql) with AS3

I’ve got an AS3 code that I want to link with a php. That php search in a database (sql) and send results to my AS3 code. So I’ve got 3 files : my project (FLA file), my php file, and my sql file. I would like to do this operation offline (local). How can […]

Connecting php to MS SQL Server. Login failed

I am trying to connect to my sql server database, but i keep getting this message: Array ( [0] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user ‘NT AUTHORITY\SYSTEM’. [message] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Login […]

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