Giter Site home page Giter Site logo

microsoft / msphpsql Goto Github PK

View Code? Open in Web Editor NEW
1.8K 155.0 370.0 87.78 MB

Microsoft Drivers for PHP for SQL Server

License: MIT License

C++ 5.00% C 0.46% PHP 93.93% Shell 0.04% M4 0.04% Python 0.43% PowerShell 0.01% TSQL 0.08%
microsoft php-extension php-driver microsoft-driver sql-server

msphpsql's Introduction

Microsoft Drivers for PHP for Microsoft SQL Server

Welcome to the Microsoft Drivers for PHP for Microsoft SQL Server

The Microsoft Drivers for PHP for Microsoft SQL Server are PHP extensions that allow for the reading and writing of SQL Server data from within PHP scripts. The SQLSRV extension provides a procedural interface while the PDO_SQLSRV extension implements PHP Data Objects (PDO) for accessing data in all editions of SQL Server 2012 and later (including Azure SQL DB). These drivers rely on the Microsoft ODBC Driver for SQL Server to handle the low-level communication with SQL Server.

This release contains the SQLSRV and PDO_SQLSRV drivers for PHP 8.0+ with improvements on both drivers and some limitations. Upcoming releases will contain additional functionalities, bug fixes, and more.

Take our survey

Thank you for taking the time to participate in the sentiment survey. You can continue to help us improve by letting us know how we are doing and how you use PHP:

Click here to start the PHP survey

Status of Most Recent Builds

Azure Pipelines (Linux) AppVeyor (Windows) Coverage (Windows)
az-image av-image Coverage Codecov

Get Started

Please follow the Getting started page.

Announcements

Please follow SQL Server Drivers for announcements.

Prerequisites

For full details on the system requirements for the drivers, see the system requirements on Microsoft Docs.

On the client machine:

On the server side, Microsoft SQL Server 2012 and above on Windows are supported, as are Microsoft SQL Server 2016 and above on Linux.

Building and Installing the Drivers on Windows

The drivers are distributed as pre-compiled extensions for PHP found on the releases page. They are available in thread-safe and non-thread-safe versions, and in 32-bit (Windows only) and 64-bit versions. The source code for the drivers is also available, and you can compile them as thread safe or non-thread-safe versions. The thread safety configuration of your web server will determine which version you need.

If you choose to build the drivers, you must be able to build PHP 8.* without including these extensions. For help building PHP on Windows, see the official PHP website. For details on compiling the drivers, see the documentation -- an example buildscript is provided, but you can also compile the drivers manually.

To load the drivers, make sure that the driver is in your PHP extension directory and enable it in your PHP installation's php.ini file by adding extension=php_sqlsrv.dll and/or extension=php_pdo_sqlsrv.dll to the ini file. If necessary, specify the extension directory using extension_dir, for example: extension_dir = "C:\PHP\ext". Note that the precompiled binaries have different names -- substitute accordingly in php.ini. For more details on loading the drivers, see Loading the PHP SQL Driver on Microsoft Docs.

Finally, if running PHP in a Web server, restart the Web server.

Install (UNIX)

For full instructions on installing the drivers on all supported Unix platforms, see the installation instructions on Microsoft Docs.

Sample Code

For PHP code samples, please see the sample folder or the code samples on Microsoft Docs. For information on how to use the driver, see Microsoft Drivers for PHP for Microsoft SQL Server.

Limitations and Known Issues

Please refer to Releases for the latest limitations and known issues.

Version number

The version numbers of the PHP drivers follow semantic versioning:

Given a version number MAJOR.MINOR.PATCH,

  • MAJOR version is incremented when an incompatible API change is made,
  • MINOR version is incremented when functionality is added in a backwards-compatible manner, and
  • PATCH version is incremented when backwards-compatible bug fixes are made.

The version number may have trailing pre-release version identifiers to indicate the stability and/or build metadata.

  • Pre-release version is denoted by a hyphen followed by beta or RC followed by a number. Production quality releases do not contain the pre-release version. beta has lower precedence than RC. Note that the PECL package version numbers do not have the hyphen before the pre-release version, owing to restrictions in PECL. An example of a PECL package version is 5.9.0beta2.
  • Build metadata may be denoted by a plus sign followed by a number of digits, such as 5.9.0-beta2+13930. Build metadata does not affect the precedence order.

Future Plans

  • Expand SQL Server feature support (example: Azure Active Directory, Always Encrypted, etc.)
  • Add more verification/fundamental tests
  • Improve performance
  • Bug fixes

Guidelines for Reporting Issues

We appreciate you taking the time to test the driver, provide feedback and report any issues. It would be extremely helpful if you:

  • First check the FAQ for common problems
  • Report each issue as a new issue (but check first if it's already been reported)
  • Please address the questions in the new issue template and provide scripts, table schema, and/or any details that may help reproduce the problem(s)

Thank you!

Questions

Q: Can we get dates for any of the Future Plans listed above?

A: At this time, Microsoft is not able to announce dates. We are working hard to release future versions of the driver and will share future plans as appropriate.

Q: What's next?

A: We will continue working on our future plans and releasing previews of upcoming releases

Q: Is Microsoft taking pull requests for this project?

A: Yes. Please submit pull requests to the dev branch, not the master branch.

License

The Microsoft Drivers for PHP for SQL Server are licensed under the MIT license. See the LICENSE file for more details.

Code of conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Resources

Documentation: Microsoft Docs Online.

SQL Server Drivers: Please browse the articles for announcements of various SQL Server Drivers.

Known Issues: Please visit the project on Github to view outstanding issues and report new ones.

msphpsql's People

Contributors

absci avatar ajlam avatar backendtea avatar david-engel avatar david-puglielli avatar gdegoulet avatar gjcarrette avatar jjeising avatar laclefyoshi avatar lilgreenbird avatar lotharofthehillpeople avatar meet-bhagdev avatar michaelsun90 avatar microsoft-github-policy-service[bot] avatar morozov avatar mpyw avatar sakitakamachi avatar satoryu avatar sumolion avatar szarkos avatar tobya avatar ulvii avatar v-dareck avatar v-kigos avatar v-mabarw avatar yazgoo avatar yitam avatar yukiwongky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

msphpsql's Issues

Unable to handle SQL_VARIANT types

The PDO driver is chocking on SQL_VARIANT types, but this can contain themselves simple types such as char, intenger, etc...

Steps to reproduce:

  1. Create an UDF:

CREATE FUNCTION [dbo].[GREATEST](@OP1 sql_variant, @OP2 sql_variant) RETURNS sql_variant AS
BEGIN
DECLARE @Result sql_variant
SET @Result = CASE WHEN @OP1 >= @OP2 THEN @OP1 ELSE @OP2 END
RETURN @Result
END
GO

  1. Run this query through the PDO

SELECT dbo.GREATEST(5, 6)

  1. Theses are the errors you get:

Without Buffered Queries:

SQLSTATE[IMSSP]: Invalid type.

With Buffered Queries:

Fatal error: Unknown type in sqlsrv_buffered_query::sqlsrv_buffered_query

I can manage to get it to work if I use PDO::PARAM_INT on the column before the fetch, but there is no way that I can infer this informatino from the PDO metadata (getColumnMeta) that is reporting:

sql_srv_type = sql_variant
native_type = string

Possible solutions.....

  1. At least let me retrieve the data as a string by default, instead of Fatal crashing.

template.rc uses winres.h rather than winresrc.h

Hi.

The instructions to use winres.h are quite old.

There is no need to change winresrc.h to winres.h

Patch supplied.

Work Item Details

Original CodePlex Issue: Issue 14042
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Sep 3, 2009 at 2:25 PM
Reported by: RQuadling
Updated on: Jul 17, 2010 at 8:06 PM
Updated by: AshayC
Closed on: Jul 17, 2010 at 8:06 PM

Plaintext Attachments

CodePlex Issue #14042 Plain Text Attachments

Type binding not properly managed in PDO

This is something that's been carried along for a while, the PDO driver is incorrectly doing type binding under some situations:

  • SQL type varbinary needs to be mapped to PDO::PARAM_LOB manually because the driver won't.

When using BUFFERED QUERIES, type binding is mibehaving, all numeric types (int, smallint, etc.) are mapped to string when using fetchObject(), but even worse, these string are NULL Terminated String.

So for a "5" integer, you get a "5\0" string.

Warning in ReflectionExtension::export('sqlsrv')

PHP 5.3.5 - windows 7 - VC6 ts

ReflectionExtension::export('sqlsrv');

Warning: ReflectionExtension::__toString(): Internal error: Cannot find
extension function SQLSRV_PHPTYPE_STREAM in global function table in
C:\www\test\index.php on line 4

Warning: ReflectionExtension::__toString(): Internal error: Cannot find
extension function SQLSRV_PHPTYPE_STRING in global function table in
C:\www\test\index.php on line 4

Warning: ReflectionExtension::__toString(): Internal error: Cannot find
extension function SQLSRV_SQLTYPE_BINARY in global function table in
C:\www\test\index.php on line 4

Warning: ReflectionExtension::__toString(): Internal error: Cannot find
extension function SQLSRV_SQLTYPE_CHAR in global function table in
C:\www\test\index.php on line 4

Warning: ReflectionExtension::__toString(): Internal error: Cannot find
extension function SQLSRV_SQLTYPE_DECIMAL in global function table in
C:\www\test\index.php on line 4

Warning: ReflectionExtension::__toString(): Internal error: Cannot find
extension function SQLSRV_SQLTYPE_NCHAR in global function table in
C:\www\test\index.php on line 4

Warning: ReflectionExtension::__toString(): Internal error: Cannot find
extension function SQLSRV_SQLTYPE_NUMERIC in global function table in
C:\www\test\index.php on line 4

Warning: ReflectionExtension::__toString(): Internal error: Cannot find
extension function SQLSRV_SQLTYPE_NVARCHAR in global function table in
C:\www\test\index.php on line 4

Warning: ReflectionExtension::__toString(): Internal error: Cannot find
extension function SQLSRV_SQLTYPE_VARBINARY in global function table in
C:\www\test\index.php on line 4

Warning: ReflectionExtension::__toString(): Internal error: Cannot find
extension function SQLSRV_SQLTYPE_VARCHAR in global function table in
C:\www\test\index.php on line 4
Extension [ extension #57 sqlsrv version 2.0.1307.0 ] {

  • INI {
    Entry [ sqlsrv.LogSeverity ]
    Current = '0'
    }
    Entry [ sqlsrv.LogSubsystems ]
    Current = '0'
    }
    Entry [ sqlsrv.WarningsReturnAsErrors ]
    Current = '1'
    }
    }
  • Constants [65] {
    Constant [ integer SQLSRV_ERR_ERRORS ] { 0 }
    Constant [ integer SQLSRV_ERR_WARNINGS ] { 1 }
    Constant [ integer SQLSRV_ERR_ALL ] { 2 }
    Constant [ integer SQLSRV_LOG_SYSTEM_OFF ] { 0 }
    Constant [ integer SQLSRV_LOG_SYSTEM_INIT ] { 1 }
    Constant [ integer SQLSRV_LOG_SYSTEM_CONN ] { 2 }
    Constant [ integer SQLSRV_LOG_SYSTEM_STMT ] { 4 }
    Constant [ integer SQLSRV_LOG_SYSTEM_UTIL ] { 8 }
    Constant [ integer SQLSRV_LOG_SYSTEM_ALL ] { -1 }
    Constant [ integer SQLSRV_LOG_SEVERITY_ERROR ] { 1 }
    Constant [ integer SQLSRV_LOG_SEVERITY_WARNING ] { 2 }
    Constant [ integer SQLSRV_LOG_SEVERITY_NOTICE ] { 4 }
    Constant [ integer SQLSRV_LOG_SEVERITY_ALL ] { -1 }
    Constant [ integer SQLSRV_FETCH_NUMERIC ] { 1 }
    Constant [ integer SQLSRV_FETCH_ASSOC ] { 2 }
    Constant [ integer SQLSRV_FETCH_BOTH ] { 3 }
    Constant [ integer SQLSRV_PHPTYPE_NULL ] { 1 }
    Constant [ integer SQLSRV_PHPTYPE_INT ] { 2 }
    Constant [ integer SQLSRV_PHPTYPE_FLOAT ] { 3 }
    Constant [ integer SQLSRV_PHPTYPE_DATETIME ] { 5 }
    Constant [ string SQLSRV_ENC_BINARY ] { binary }
    Constant [ string SQLSRV_ENC_CHAR ] { char }
    Constant [ integer SQLSRV_NULLABLE_YES ] { 0 }
    Constant [ integer SQLSRV_NULLABLE_NO ] { 1 }
    Constant [ integer SQLSRV_NULLABLE_UNKNOWN ] { 2 }
    Constant [ integer SQLSRV_SQLTYPE_BIGINT ] { -5 }
    Constant [ integer SQLSRV_SQLTYPE_BIT ] { -7 }
    Constant [ integer SQLSRV_SQLTYPE_DATETIME ] { 25177693 }
    Constant [ integer SQLSRV_SQLTYPE_FLOAT ] { 6 }
    Constant [ integer SQLSRV_SQLTYPE_IMAGE ] { -4 }
    Constant [ integer SQLSRV_SQLTYPE_INT ] { 4 }
    Constant [ integer SQLSRV_SQLTYPE_MONEY ] { 33564163 }
    Constant [ integer SQLSRV_SQLTYPE_NTEXT ] { -10 }
    Constant [ integer SQLSRV_SQLTYPE_TEXT ] { -1 }
    Constant [ integer SQLSRV_SQLTYPE_REAL ] { 7 }
    Constant [ integer SQLSRV_SQLTYPE_SMALLDATETIME ] { 8285 }
    Constant [ integer SQLSRV_SQLTYPE_SMALLINT ] { 5 }
    Constant [ integer SQLSRV_SQLTYPE_SMALLMONEY ] { 33559555 }
    Constant [ integer SQLSRV_SQLTYPE_TIMESTAMP ] { 4606 }
    Constant [ integer SQLSRV_SQLTYPE_TINYINT ] { -6 }
    Constant [ integer SQLSRV_SQLTYPE_UDT ] { -151 }
    Constant [ integer SQLSRV_SQLTYPE_UNIQUEIDENTIFIER ] { -11 }
    Constant [ integer SQLSRV_SQLTYPE_XML ] { -152 }
    Constant [ integer SQLSRV_SQLTYPE_DATE ] { 5211 }
    Constant [ integer SQLSRV_SQLTYPE_TIME ] { 58728806 }
    Constant [ integer SQLSRV_SQLTYPE_DATETIMEOFFSET ] { 58738021 }
    Constant [ integer SQLSRV_SQLTYPE_DATETIME2 ] { 58734173 }
    Constant [ integer SQLSRV_PARAM_IN ] { 1 }
    Constant [ integer SQLSRV_PARAM_OUT ] { 4 }
    Constant [ integer SQLSRV_PARAM_INOUT ] { 2 }
    Constant [ integer SQLSRV_TXN_READ_UNCOMMITTED ] { 1 }
    Constant [ integer SQLSRV_TXN_READ_COMMITTED ] { 2 }
    Constant [ integer SQLSRV_TXN_REPEATABLE_READ ] { 4 }
    Constant [ integer SQLSRV_TXN_SERIALIZABLE ] { 8 }
    Constant [ integer SQLSRV_TXN_SNAPSHOT ] { 32 }
    Constant [ integer SQLSRV_SCROLL_NEXT ] { 1 }
    Constant [ integer SQLSRV_SCROLL_PRIOR ] { 4 }
    Constant [ integer SQLSRV_SCROLL_FIRST ] { 2 }
    Constant [ integer SQLSRV_SCROLL_LAST ] { 3 }
    Constant [ integer SQLSRV_SCROLL_ABSOLUTE ] { 5 }
    Constant [ integer SQLSRV_SCROLL_RELATIVE ] { 6 }
    Constant [ string SQLSRV_CURSOR_FORWARD ] { forward }
    Constant [ string SQLSRV_CURSOR_STATIC ] { static }
    Constant [ string SQLSRV_CURSOR_DYNAMIC ] { dynamic }
    Constant [ string SQLSRV_CURSOR_KEYSET ] { keyset }
    }
  • Functions {
    Function [ function sqlsrv_connect ] {
    • Parameters [2] {
      Parameter #0 [ $"server" ]
      Parameter #1 [ array $"options" ]
      }
      }
      Function [ function sqlsrv_close ] {
    • Parameters [1] {
      Parameter #0 [ $"connection resource" ]
      }
      }
      Function [ function sqlsrv_commit ] {
    • Parameters [1] {
      Parameter #0 [ $"connection resource" ]
      }
      }
      Function [ function sqlsrv_begin_transaction ] {
    • Parameters [1] {
      Parameter #0 [ $"connection resource" ]
      }
      }
      Function [ function sqlsrv_rollback ] {
    • Parameters [1] {
      Parameter #0 [ $"connection resource" ]
      }
      }
      Function [ function &sqlsrv_errors ] {
    • Parameters [1] {
      Parameter #0 [ $"flags (errors, warnings, or all)" ]
      }
      }
      Function [ function sqlsrv_configure ] {
    • Parameters [2] {
      Parameter #0 [ $"option name" ]
      Parameter #1 [ $"value" ]
      }
      }
      Function [ function sqlsrv_get_config ] {
    • Parameters [1] {
      Parameter #0 [ $"option name" ]
      }
      }
      Function [ function &sqlsrv_prepare ] {
    • Parameters [4] {
      Parameter #0 [ $"connection resource" ]
      Parameter #1 [ $"sql command" ]
      Parameter #2 [ $"parameters" ]
      Parameter #3 [ array $"options" ]
      }
      }
      Function [ function sqlsrv_execute ] {
    • Parameters [2] {
      Parameter #0 [ $"statement resource" ]
      Parameter #1 [ $"parameters" ]
      }
      }
      Function [ function &sqlsrv_query ] {
    • Parameters [4] {
      Parameter #0 [ $"connection resource" ]
      Parameter #1 [ $"sql command" ]
      Parameter #2 [ $"parameters" ]
      Parameter #3 [ array $"options" ]
      }
      }
      Function [ function sqlsrv_fetch ] {
    • Parameters [1] {
      Parameter #0 [ $"statement resource" ]
      }
      }
      Function [ function &sqlsrv_get_field ] {
    • Parameters [3] {
      Parameter #0 [ $"statement resource" ]
      Parameter #1 [ $"field index" ]
      Parameter #2 [ $"type" ]
      }
      }
      Function [ function &sqlsrv_fetch_array ] {
    • Parameters [2] {
      Parameter #0 [ $"statement resource" ]
      Parameter #1 [ $"array type" ]
      }
      }
      Function [ function &sqlsrv_fetch_object ] {
    • Parameters [3] {
      Parameter #0 [ $"statement resource" ]
      Parameter #1 [ $"class name" ]
      Parameter #2 [ $"ctor params" ]
      }
      }
      Function [ function sqlsrv_has_rows ] {
    • Parameters [1] {
      Parameter #0 [ $"statement resource" ]
      }
      }
      Function [ function sqlsrv_num_fields ] {
    • Parameters [1] {
      Parameter #0 [ $"statement resource" ]
      }
      }
      Function [ function sqlsrv_next_result ] {
    • Parameters [1] {
      Parameter #0 [ $"statement resource" ]
      }
      }
      Function [ function sqlsrv_num_rows ] {
    • Parameters [1] {
      Parameter #0 [ $"statement resource" ]
      }
      }
      Function [ function sqlsrv_rows_affected ] {
    • Parameters [1] {
      Parameter #0 [ $"statement resource" ]
      }
      }
      Function [ function sqlsrv_client_info ] {
    • Parameters [1] {
      Parameter #0 [ $"connection resource" ]
      }
      }
      Function [ function sqlsrv_server_info ] {
    • Parameters [1] {
      Parameter #0 [ $"statement resource" ]
      }
      }
      Function [ function sqlsrv_cancel ] {
    • Parameters [1] {
      Parameter #0 [ $"statement resource" ]
      }
      }
      Function [ function sqlsrv_free_stmt ] {
    • Parameters [1] {
      Parameter #0 [ $"connection resource" ]
      }
      }
      Function [ function &sqlsrv_field_metadata ] {
    • Parameters [1] {
      Parameter #0 [ $"statement resource" ]
      }
      }
      Function [ function sqlsrv_send_stream_data ] {
    • Parameters [1] {
      Parameter #0 [ $"statement resource" ]
      }
      }
      }
      }

Work Item Details

Original CodePlex Issue: Issue 20138
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Mar 4, 2011 at 12:13 PM
Reported by: stealth35
Updated on: Mar 4, 2011 at 2:54 PM
Updated by: stealth35

SQL Server 2008 R2 and PHP MSSQL

Greetings,

I hope someone can help me about my issue :

i have a SQL Server on the network, and i want to establish a connection from
my Website. But i receive all time this error : Warning: mssql_connect()
[function.mssql-connect]: Unable to connect to server.

The weird think is I can connect to the SQL Server using SQL Server Management
from my home, or using (sqlserv_connect) at PHP without any problem, but all
my project is using MSSQL so it will be hard to change it again to SQLSERV
Library.

The other think is when i use same project but in local, he can establish a
connection (That mean it's not ntwdblib.dll problem).

Thanks a lot .

Work Item Details

Original CodePlex Issue: Issue 22421
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Jul 17, 2013 at 2:52 AM
Reported by: GingFreecss
Updated on: Jul 17, 2013 at 2:52 AM
Updated by: GingFreecss

Mistake in help: Data protocol in PHP expects urlencoded data.

PHP has a feature to open the stream from string passed through RFC 2397 data:
protocol.
The SQLSRV help describes this feature to send the data as a stream to the MS-
SQL server.

However, data passed in โ€ždata:text/plain,โ€ฆโ€œ string should be either urlencoded
or base64 encoded. Otherwise serious damage of the data occurs, because when
data are not passed as base64, PHP urldecodes them (+ becomes space, %20
entities get decoded, etc.)

PROBLEM:
In the SQLSRV help, all source code lines opening stream from string should be
modified according the correct syntax.
Incorrect syntax: fopen( "data://text/plain,[ Insert lengthy comment here.]",
"r");
Correct syntax, option #1: fopen("data:text/plain,".urlencode('[ Insert
lengthy comment here.]')."", "r");
Correct syntax, option #2: fopen("data:text/plain;base64,".base64_encode('[
Insert lengthy comment here.]')."", "r");

TEST CASE:
Just run this code in PHP:

Links:
PHP Data stream: http://php.net/manual/en/wrappers.data.php

RFC 2397: http://www.faqs.org/rfcs/rfc2397.html

Work Item Details

Original CodePlex Issue: Issue 19139
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Nov 18, 2010 at 11:44 AM
Reported by: michalkocarek
Updated on: Nov 18, 2010 at 11:45 AM
Updated by: michalkocarek

PDO::ATTR_EMULATE_PREPARES Security Issue

We are reviewing a potential security issue and these are some internal comments:

-------------- THIS IS FROM THE MS SQL PDO DOCUMENTATION ---

The security of parameterized queries is not in effect when you use PDO::ATTR_EMULATE_PREPARES => true. Your application should ensure that the data that is bound to the parameter(s) does not contain malicious Transact-SQL code.


At the minimum, that looks like a bug in the PDO driver. If it is true that they cannot even guarantee the structure of the query in PDO::ATTR_EMULATE_PREPARES mode, they just should not have enabled this in the 3.x version of their driver.

----------- THE QUESTION ------------------------

Is this a mistake in the documentation?

Error calling sqlsrv_fetch

Hi.

When I call sqlsrv_fetch($stmt, SQLSRV_SCROLL_ABSOLUTE, 5) I got the error
[Microsoft][SQL Server Native Client 11.0]Fetch type out of rang .

Work Item Details

Original CodePlex Issue: Issue 22425
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Dec 9, 2013 at 11:11 PM
Reported by: omendoza
Updated on: Dec 9, 2013 at 11:11 PM
Updated by: omendoza

HY104 when binding an empty string

Driver returns

[HY104 0] [Microsoft][SQL Server Native Client 10.0]Invalid precision value

when executing parametrized query with binding of the empty string with
default options:
sqlsrv_query('SELECT ?', array(''));

I am using the 1.1 driver on PHP 5.3, SQL Server 2000.

Work Item Details

Original CodePlex Issue: Issue 16410
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Feb 18, 2010 at 1:02 PM
Reported by: michalkocarek
Updated on: Jan 20, 2012 at 6:05 AM
Updated by: tomkraw1
Closed on: Jul 17, 2010 at 7:59 PM

SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again)

I am close to getting buffered queries working in the Drupal database abstraction layer, with performance gains of ~30% (that's huge) on a vanilla install.

But... I am seeing again the Function sequence error :(

It took me ages to isolate the issue this time into a sample script.

Download schema and sample script from this dropbox link:

https://www.dropbox.com/s/3nd8xdf32a7dmyz/sample_sqlsrv_may.zip?dl=0

For the error to go away, simply remove the transaction related statements:

$cnn->beginTransaction();
$cnn->commit();

So it looks like you cannot have a transaction nested in a loop while iterating on a client buffered result set.

No mechanism to assign language during login.

Hi.

Having called sqlsrv_connect(), sqlsrv_errors() reports 2 entries.

The first relates to the "Changed database context", which is appropriate for
my call (I'm setting the 'Database' option).

The second is SQLSTATE 01000, code 5703, message "[Microsoft][SQL Server
Native Client 10.0][SQL Server]Changed language setting to us_english.".

Being a British English speaker, I'd like the option of setting the language
as part of the configuration in some way.

But I can't see if this is possible in any way.

Regards,

Richard Quadling.

Work Item Details

Original CodePlex Issue: Issue 16935
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Mar 23, 2010 at 4:28 PM
Reported by: RQuadling
Updated on: Jul 17, 2010 at 8:33 PM
Updated by: AshayC
Closed on: Jul 17, 2010 at 8:33 PM

Objects and resources (streams) cause web server crash after sqlsrv_prepare()

/*
This sample code will crash your web server.
It won't crash when $myDate is initialised to a DateTime object _ before _
calling sqlsrv_prepare().
*/

$conn = sqlsrv_connect(........);
sqlsrv_free_stmt(sqlsrv_query($conn, "create table #myDateTable(id int null,
myDate datetime null)"));
/ _ $myDate = new DateTime() _ / // Uncomment this line to avoid the crash
$params = array(&$id, &$myDate);
$tsql = "insert into #myDateTable(id, mydate) values(?,?)";
$stmt = sqlsrv_prepare($conn, $tsql, $params);
$datedata = array( 'Wed, 21 Apr 2010', 'Thu, 22 Apr 2010');
foreach($datedata as $k=>$v)
{

$id = $k+1;
$myDate = new DateTime($v);
if ( !sqlsrv_execute($stmt) )
{
    print_r(sqlsrv_errors($conn));
    echo '<br />';
}
else
{
    echo 'Row Inserted<br />';
}

}
sqlsrv_free_stmt(sqlsrv_query($conn, "drop table #myDateTable"));

Work Item Details

Original CodePlex Issue: Issue 17336
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Apr 21, 2010 at 3:03 PM
Reported by: robertjohnson
Updated on: Jul 13, 2010 at 9:04 PM
Updated by: icosahedron

Encoding Hash Table - Zend Hash Table error

The following errors are occuring when at least two users tries to query a SQL
Server 2005 database using sqlsrv (php_sqlsrv_52_ts_vc6.dll) with php 5.2.9
and apache 2.2 AT THE SAME TIME (same functionality). Sometimes it works,
sometimes it breaks...

  • An error occurred creating or accessing a Zend hash table
  • Fatal: Error retrieving encoding from encoding hash table

Work Item Details

Original CodePlex Issue: Issue 21609
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Oct 6, 2011 at 7:17 PM
Reported by: brizardh
Updated on: Oct 30, 2012 at 5:59 PM
Updated by: icosahedron
Closed on: Oct 30, 2012 at 5:59 PM
Closed by: icosahedron

PDOStatement execute error

I am using PHP 5.4 (zend 5.6), IIS 7.5, and SQLSRV-PHP driver on my
development machine. I tried inserting some data into SQL2008R2 database using
the new driver but to my surprise every time i run execute(), it inserts the
same record twice. Below is my code:

$pdo = new PDO("sqlsrv:server=(local);database=devDb;");
$sql = "insert into tblTest (name,ts) values(:name, :ts)";
$stmt = $pdo->prepare($sql);
$args = array(':name'=>'Some Value',':ts'=>microtime(true));
if( $stmt->execute($args) ){

.....

}

When i run and check the db, it creates 2 records with a difference in the ts
field of some few micro seconds. On my production system which is running
PHP5.3, that is not an issue.
Could it be a problem in the driver or PHP itself

Work Item Details

Original CodePlex Issue: Issue 22416
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: May 17, 2012 at 2:33 PM
Reported by: quaspam
Updated on: May 21, 2012 at 3:01 PM
Updated by: jguerin

sqlsrv_query with $params containing a NULL redefines NULL in php

When a NULL value exists in the parameters when calling sqlsrv_query, it
replaces the PHP NULL value with a reference. All variables end up containing
the same value.

E.g.
$params = array('abd' 'def', NULL);
sqlsrv_query($conn, $tsql, $params);

NULL is now a reference, so:
$newVar = '123'; // ALL null values now become '123'
$otherVar = '456' // $newVar, $otherVar and $params[2] are all '456', along
with any other variables that happen to be NULL.

I posted this in the MSDN forum: [ http://social.msdn.microsoft.com/Forums/en-
US/sqldriverforphp/thread/b4f0fdc1-62ce-4449-95f1-a9536311223a
](http://social.msdn.microsoft.com/Forums/en-
US/sqldriverforphp/thread/b4f0fdc1-62ce-4449-95f1-a9536311223a)

Sorry, I'm not great at describing things.

Work Item Details

Original CodePlex Issue: Issue 12205
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Dec 24, 2008 at 9:28 AM
Reported by: robertjohnson
Updated on: May 29, 2009 at 8:45 PM
Updated by: icosahedron
Closed on: May 29, 2009 at 8:45 PM

Add required header to config.w32

Hi.

Adding the line ...

   CHECK_HEADER_ADD_INCLUDE('sqlncli.h', 'CFLAGS_SQLSRV_ODBC');

to config.w32 would be useful for new builds.

Work Item Details

Original CodePlex Issue: Issue 19302
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Dec 14, 2010 at 4:57 PM
Reported by: RQuadling
Updated on: Dec 14, 2010 at 4:57 PM
Updated by: RQuadling

bindValue() is not accepting non-english chars

I cannot put non english chars as params in bindValue(), like ร .

Please see this code: http://pastebin.com/QBahEFBG

It triggers this exception:

Database::DataTable: IMSSP - SQLSTATE[IMSSP]: An error occurred translating
string for input param 1 to UCS-2: No mapping for the Unicode character exists
in the target multi-byte code page.

Please note that enabling the commented-out line (setAttribute) doesn't help.
Any idea?

Work Item Details

Original CodePlex Issue: Issue 22415
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Mar 15, 2012 at 4:49 PM
Reported by: fmntf
Updated on: Mar 20, 2012 at 6:26 PM
Updated by: jguerin
Closed on: Mar 20, 2012 at 6:26 PM

nextrowset() method

Stored procedures can return multiple rowset. How to jump to next rowset? We
need nextrowset() method.

Stored procedure example:

CREATE PROC test
AS
SELECT 'red' AS color
SELECT 'audi' AS model

Work Item Details

Original CodePlex Issue: Issue 15255
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Dec 8, 2009 at 9:06 PM
Reported by: bugzilla33
Updated on: Jul 13, 2010 at 8:37 PM
Updated by: icosahedron
Closed on: Jul 13, 2010 at 8:37 PM

phpinfo bad html

The sqlsrv section of phpinfo() is written with badly formed HTML.

sqlsrv

sqlsrv supportenabled

Work Item Details

Original CodePlex Issue: Issue 17186
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Apr 9, 2010 at 12:24 PM
Reported by: robertjohnson
Updated on: Jul 17, 2010 at 8:18 PM
Updated by: AshayC
Closed on: Jul 17, 2010 at 8:18 PM

Plaintext Attachments

CodePlex Issue #17186 Plain Text Attachments

Logging from Microsoft SQL Server Driver for PHP uses a different time to normal logging.

Hello.

I activated all logging for the sqlsvr extension.

Ran ...

php -r "phpinfo();"

Log file contains ...

[03-Sep-2009 10:45:00] PHP_MINIT_FUNCTION for php_sqlsrv: entering
[03-Sep-2009 09:45:00] sqlsrv: entering rinit
[03-Sep-2009 09:45:00] sqlsrv.WarningsReturnAsErrors = On
[03-Sep-2009 09:45:00] sqlsrv.LogSeverity = 255
[03-Sep-2009 09:45:00] sqlsrv.LogSubsystems = 255
[03-Sep-2009 09:45:02] sqlsrv: entering rshutdown

The time logged in the error log file for PHP functions uses the current time
which is in DST : British Summer Time (UTC+0100 currently). The driver logs
the time without the DST offset.

Work Item Details

Original CodePlex Issue: Issue 14039
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Sep 3, 2009 at 9:50 AM
Reported by: RQuadling
Updated on: Sep 3, 2009 at 9:50 AM
Updated by: RQuadling

Impossible to use local temporary tables

Using the PDO driver it is imposible to use local temporary tables (global temporary tables work).

See sample script. The first part of the script (local) fails, the scond (global) works.

I guess this is probably by design because I read the PDO uses internally connection pooling instead of persistent connections, effectively refreshing the connection scope on every statement.

setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $cnn->transactionSupport = TRUE; $cnn->transactionalDDLSupport = TRUE; // Clear a local temporary table. $cnn->query('CREATE TABLE #TEMP1 (COL1 int)'); $cnn->query('INSERT INTO #TEMP1 VALUES(1)'); $cnn->query('INSERT INTO #TEMP1 VALUES(2)'); $cnn->query('INSERT INTO #TEMP1 VALUES(3)'); $q = $cnn->query('SELECT COUNT(*) FROM #TEMP1'); $q->execute(); $r = $q->fetchAll(); // Create a global temporary table. $cnn->query('CREATE TABLE ##TEMP2 (COL1 int)'); $cnn->query('INSERT INTO ##TEMP2 VALUES(1)'); $cnn->query('INSERT INTO ##TEMP2 VALUES(2)'); $cnn->query('INSERT INTO ##TEMP2 VALUES(3)'); $q = $cnn->query('SELECT COUNT(*) FROM ##TEMP2'); $q->execute(); $r = $q->fetchAll();

php --re sqlsrv returns warnings.

Hi.

Using the official PHP V5.3.2 and php_sqlsrv_53_nts_vc9.dll results in some
warnings when using --ri.

Even tried removing the ini file (-n) ...

php -n -d extension_dir=c:\php5\ext -d extension=php_sqlsrv_53_nts_vc9.dll
--re sqlsrv

results in ...

Warning: Internal error: Cannot find extension function SQLSRV_PHPTYPE_STREAM
in global function table in Unknown on line 0

Warning: Internal error: Cannot find extension function SQLSRV_PHPTYPE_STRING
in global function table in Unknown on line 0

Warning: Internal error: Cannot find extension function SQLSRV_SQLTYPE_BINARY
in global function table in Unknown on line 0

Warning: Internal error: Cannot find extension function SQLSRV_SQLTYPE_CHAR in
global function table in Unknown on line 0

Warning: Internal error: Cannot find extension function SQLSRV_SQLTYPE_DECIMAL
in global function table in Unknown on line 0

Warning: Internal error: Cannot find extension function SQLSRV_SQLTYPE_NCHAR
in global function table in Unknown on line 0

Warning: Internal error: Cannot find extension function SQLSRV_SQLTYPE_NUMERIC
in global function table in Unknown on line 0

Warning: Internal error: Cannot find extension function
SQLSRV_SQLTYPE_NVARCHAR in global function table in Unknown on line 0

Warning: Internal error: Cannot find extension function
SQLSRV_SQLTYPE_VARBINARY in global function table in Unknown on line 0

Warning: Internal error: Cannot find extension function SQLSRV_SQLTYPE_VARCHAR
in global function table in Unknown on line 0
Extension [ extension #32 sqlsrv version 1.1.428.1 ] {

  • INI {
    Entry [ sqlsrv.WarningsReturnAsErrors ]
    Current = '1'
    }
    Entry [ sqlsrv.LogSeverity ]
    Current = '0'
    }
    Entry [ sqlsrv.LogSubsystems ]
    Current = '0'
    }
    }
  • Constants [65] {
    Constant [ integer SQLSRV_ERR_ERRORS ] { 0 }
    Constant [ integer SQLSRV_ERR_WARNINGS ] { 1 }
    ...

Work Item Details

Original CodePlex Issue: Issue 16926
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Mar 23, 2010 at 3:05 PM
Reported by: RQuadling
Updated on: Jul 19, 2010 at 11:19 AM
Updated by: RQuadling

Connection Delay When Used With MySQL

In my php.ini if I have both extension=php_sqlsrv_ts.dll and
extension=php_mysql.dll enabled and then try to connect to an MS SQL Server
there is a several second delay. If you disable extension=php_mysql.dll the
connection loads right away. The delay is also there if I enable
extension=php_pdo.dll and extension=php_pdo_mysql.dll.

The script I run for testing (note I have all output buffering turned off):

'someUser', 'PWD' => 'somePass', 'ConnectionPooling' => 0, 'Database' => 'someDb')); $finish = microtime(true); echo "Took ".(($finish - $start)/60)." secs"\n; ob_flush(); flush(); sqlsrv_close($conn); ob_flush(); flush(); echo "Closed\n"; ``` ?>

All the output in the script is nearly instant "Starting Took
0.0020201166470846 secs Closed" but the page still shows that its loading for
another 5 seconds! So I suspect something is wrong with how the sql server
extension shuts down.

I found at least one other person having this issue: [
http://social.msdn.microsoft.com/Forums/en-
US/sqldriverforphp/thread/52184d98-df10-48a1-ba13-c9fee6e5aa0f
](http://social.msdn.microsoft.com/Forums/en-
US/sqldriverforphp/thread/52184d98-df10-48a1-ba13-c9fee6e5aa0f)

Note: MySql seems to work fine without any delays regardless of what's
enabled.

Work Item Details

Original CodePlex Issue: Issue 13506
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Jun 18, 2009 at 5:11 PM
Reported by: brendantbs
Updated on: Jul 13, 2010 at 9:19 PM
Updated by: icosahedron
Closed on: Jul 13, 2010 at 9:19 PM

Linux Support

Now that MS has released a SQL Server native driver for Linux, when can we expect to see the sqlsrv driver supported on Linux as well?

PHP 5.6 Support

When do you plan to release binaries for PHP 5.6?
Current PHP version is 5.6.4 and latest supported version by sql driver is 5.5.

Thanks

When using PHP Session handlers -> Mysterious bug

Hi.

PHP spits out this if you try to connect to a SQL Server 2005 server in
session handling functions:
PHP Fatal error: sqlsrv_errors contains an invalid type in (path)/session.php
on line 29

Line 29 is wherre sqlsrv_connect is

When I use that OUTSIDE the session handling functions, it works fine, there
are no problems what so ever.

Code to reproduce the problem:
function sess_open($save_path, $session_name)
{

return true;

}

function sess_close()
{

return true;

}

function sess_read($id)
{

return '';

}

function sess_write($id, $sess_data)
{

$connectionInfo = array( 
    "UID"=>"MyUser",
    "PWD"=>"MyPassword",
    "Database"=>"MyDB" 
);

$conn = sqlsrv_connect("mySQLServer", $connectionInfo);

sqlsrv_query($conn,"SELECT 1 FROM sessions");

return true;

}

function sess_destroy($id)
{

return true;

}

function sess_gc($maxlifetime)
{

return true;

}

session_set_save_handler('sess_open', 'sess_close', 'sess_read', 'sess_write',
'sess_destroy', 'sess_gc');
session_start();

Work Item Details

Original CodePlex Issue: Issue 15199
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Dec 5, 2009 at 8:47 AM
Reported by: Auro
Updated on: Oct 17, 2011 at 8:42 PM
Updated by: jguerin
Closed on: Oct 17, 2011 at 8:42 PM

PHP 5.5 & VC11 Support

The current version 3.0.1 does not support use with the newly released PHP 5.5
binaries for Windows. The new version of PHP is now compiled against VC11
instead of the previous VC10 and the code contains conflicts with the new
version as documented in this comment.

http://sqlsrvphp.codeplex.com/discussions/441706

Work Item Details

Original CodePlex Issue: Issue 22422
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Jul 25, 2013 at 1:03 PM
Reported by: brentil
Updated on: Jul 13 at 10:31 AM
Updated by: VahaC

ADODB AutoExecute() problem with mssqlnative driver

Hi,

I'm trying to use this new driver with adodb5.11(latest version) and
everything works fine except when using AutoExecute().
This happens because &FetchField() (file -> adodb-mssqlnative.inc.php) doesn't
return the right values to construct the query.
It should return the name, type and max_lenght of a field but instead it's
returning the value posted to that same field.....
Using the old mssql driver, this works just fine

mssqlnative uses this:
$arrKeys = array_keys($this->fields);
$f = $this->fields[$arrKeys[$this->fieldOffset]]; //this only returns the
current field value

mssql uses:
$f = @mssql_fetch_field($this->_queryID, $fieldOffset); //this works fine

So, what am i doing wrong????????????
I'm a newbie so please go easy on me....

P.S.1: The attached file has a little modification i made to the &FetchField()
function. It works but i don't know if it's the best option...
P.S.2: I'm Portuguese, sorry for my english....

Work Item Details

Original CodePlex Issue: Issue 20183
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Mar 9, 2011 at 7:11 PM
Reported by: deoid
Updated on: Jan 12, 2012 at 8:28 PM
Updated by: jguerin
Closed on: Dec 30, 2011 at 8:50 PM

Plaintext Attachments

CodePlex Issue #20183 Plain Text Attachments

Cannot backup a database and retrieve multiple results in one statement

In our application, we need to be able to backup a database from PHP and also
retrieve data from SELECTs in the same statement. Actually, we run all this
code in a Stored Procedure in SQL Server 2008 but we were able to reproduce
the same exact problem with a simple query. Our application is made to work in
UTF-8 and display html using this encoding. What happens here is that PHP is
crashing in this particular case, which is very bad. We found out that if we
remove 'CharacterSet' => 'UTF-8', the issue is gone, the database gets backed
up and data is returned (but I guess utf-8 strings are messed up if any) and
we think it has something to do with UTF-8 encoding of error messages, as
reported in a Stackoverflow question here (which I also commented) : [
http://stackoverflow.com/questions/9621858/sqlsrv-php-driver-and-utf-8
-encoding-issue-with-error-messages
](http://stackoverflow.com/questions/9621858/sqlsrv-php-driver-and-utf-8
-encoding-issue-with-error-messages)

Here is the source code to reproduce the error :

"myDB", "UID"=>"sa", // using sa to demonstrate it's not a permission issue "PWD"=>"saPassword", 'APP' => 'MyApp', 'LoginTimeout' => 5, 'MultipleActiveResultSets' => true, 'ReturnDatesAsStrings' => true, 'CharacterSet' => 'UTF-8' ); $conn = sqlsrv_connect('myserverhost', $connInfo); $query = "BACKUP DATABASE [SomeDB] TO DISK = 'C:\\Backup\\test_backup.bak' WITH NOFORMAT, INIT, NAME = 'super backup', NOREWIND, NOUNLOAD, SKIP; SELECT 1; SELECT 2;"; $stmt = sqlsrv_prepare($conn, $query); sqlsrv_execute( $stmt ); // Fetch first result set while($row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC)) { $result[] = $row; } // Fetch all next result sets while($rs = sqlsrv_next_result($stmt)) { $result[] = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC); } sqlsrv_free_stmt($stmt); sqlsrv_close($conn); ``` ?>

If more details are needed I can provide them.

Hope the issue gets resolved soon

Work Item Details

Original CodePlex Issue: Issue 22419
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Dec 10, 2012 at 5:56 PM
Reported by: MaxiWheat
Updated on: Dec 11, 2012 at 2:29 PM
Updated by: MaxiWheat

'PDOException' with message 'SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error' in [no active file]:0

When performing insert operations having buffered queries turned on, you get this exception:

SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error

This happens when running INSERT's and preparing the statement like this:

$pdo_options[PDO::ATTR_CURSOR] = PDO::CURSOR_SCROLL; $pdo_options[PDO::SQLSRV_ATTR_CURSOR_SCROLL_TYPE] = PDO::SQLSRV_CURSOR_BUFFERED;

return PDO::prepare($query, $pdo_options);

This is happening in 3.0 and 3.1 version of the driver.

fetch does not return BIT column default value in SQL 2005

Create a table with a 'bit' type column with a default value. Query the
INFORMATION_SCHEMA using PHP/PDO sqlsrv driver. In SQL Server 2005, the
Column_Default column is not returned by fetchAll(). In SQL Server 2008, for
the _ exact _ same configuration and _ exact _ same database (backed up and
restored to SQL Server 2008 on the same machine), the Column_Default is
returned properly.

create table test (
bit_column bit default 1,
varchar_column varchar(10)
);

Here's the SQL (from Yii framework / CMSSqlSchema.findColumns )

SELECT *, columnproperty(object_id(table_schema+'.'+table_name), column_name,
'IsIdentity') as IsIdentity
FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='Test' AND
TABLE_SCHEMA='dbo';

Prepare() and execute(). Then $result=$statement->fetchAll(PDO::FETCH_ASSOC)

in SQL Server 2005, the $return array will not contain any Column_Default
values
in SQL Server 2008, the $return array will contain a Column_Default value for
bit_column with value 1

Environment:
Windows XP SP3 + all hotfixes
Apache 2.2.11
PHP 5.2.9-1
php_pdo_sqlsrv_52_ts_vc6.dll version 2.0.1802.200
SQL Server 2005 (and) SQL Server 2008 R2

Work Item Details

Original CodePlex Issue: Issue 19567
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Jan 5, 2011 at 6:28 AM
Reported by: jeremydunn
Updated on: Nov 2, 2011 at 11:09 PM
Updated by: jguerin
Closed on: Nov 2, 2011 at 11:09 PM

PHP process crash

We experience PHP process crash and believe that the reason is SQL Server
driver. The driver is used for Drupal 7 installation and the only way to
reproduce it is to issue massive parallel requests while Drupal is clearing
its cache. We were trying to explore the problem as deep as possible with
xebug tracing to get the last PHP function call before the crash and to get
native functions backtrace with Debug Diagnostics Tool as described on the
PHP documentation

. Results are the following:

  • Each xdebug trace of the crashed request ends with PDOStatement->execute() called for the insert query.
  • Native crash analysis reports about "the assembly instruction at php5!_efree+6a in C:\PHP\php5.dll from The PHP Group has caused an access violation exception (0xC0000005) when trying to read from memory location 0x00000000 on thread 0".

I'm attaching user dump analysis results produced by Debug Diagnostics Tool.
Stack trace looks not resolved probably because of missing debug pack files
for the SQL Server driver. If someone could help me to properly resolve the
stack trace it would be really great.

If you need more details, please feel free to ask.

Work Item Details

Original CodePlex Issue: Issue 22428
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Apr 2 at 9:31 AM
Reported by: DmitriyTrt
Updated on: Apr 2 at 9:32 AM
Updated by: DmitriyTrt

Binary Attachments

php-cgi__PID__181280__Date__04_02_2014__Time_01_00_47AM__868__Second_Chance_Exception_C0000005_CrashHangAnalysis (1).mht
php-cgi__PID__234608__Date__04_02_2014__Time_03_53_52PM__739__Second_Chance_Exception_C0000005_CrashHangAnalysis.mht

Prepared queries within a loop extremely slow

I've documented the problem and workaround solution here: [
http://social.technet.microsoft.com/Forums/en-
US/sqldriverforphp/thread/7b655c82-e4e3-4a98-ac47-0ca9c13d5864
](http://social.technet.microsoft.com/Forums/en-
US/sqldriverforphp/thread/7b655c82-e4e3-4a98-ac47-0ca9c13d5864)

Work Item Details

Original CodePlex Issue: Issue 21679
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Oct 25, 2011 at 7:35 PM
Reported by: beauwest
Updated on: Jan 13, 2012 at 8:33 PM
Updated by: jguerin
Closed on: Jan 13, 2012 at 8:33 PM

Wrong transaction management

Still need to confirm and create test script, but looks like if during a PDO transaction if a PDO exception is thrown (even if the exception is catched by the user) the transaction will automatically rollback.

In pseudocode:

$connection->startTransaction();

$connection->query('DO SOMETHING');

try {
$connection->query('DO SOMETHING ELSE');
} catch() {

}

$connection->commitTransaction();

If the 'DO SOMETHING ELSE' throws ann exception, the transaction is rollbacked.

This was not happening without buffered queries.

PHP sqlsrv 3.0.1 Driver: sqlsrv_field_metadata returns column name as char*, so unicode column names can't be fetched correctly

Customer uses unicode column names:

CREATE TABLE Greek
(
[ฮณฮตฮนฮฑ ฯƒฮฑฯ‚ ฮบฯŒฯƒฮผฮฟ] nvarchar NOT NULL,
[ะฟั€ะธะฒะตั‚ ะผะธั€] nvarchar NOT NULL,
[ใ“ใ‚“ใซใกใฏไธ–็•Œ] nvarchar NOT NULL
);

calling sqlsrv_field_metadata converts names to ANSI char strings:

Result 3 Row 2:Array
(
[0] => hello world
[?e?a sa? ??s๏ฟฝ?] => hello world
[1] => hello world
[?????? ???] => hello world
[2] => hello world
[???????] => hello world
)

Here are some of the source code changes we would need to make to fix this:

Core_sqlsrv.h:

sqlsrv_malloc_auto_ptr<SQLCHAR> field_name;

โ€ฆchange to:

sqlsrv_malloc_auto_ptr<SQLWCHAR> field_name;

core_stmt.cpp:

meta_data->field_name = static_cast<SQLCHAR*>( sqlsrv_malloc( SS_MAXCOLNAMELEN + 1 ));



try {

    core::SQLDescribeCol( stmt, colno + 1, meta_data->field_name.get(), SS_MAXCOLNAMELEN, &field_name_len, 

โ€ฆchange to:

meta_data->field_name = static_cast<SQLWCHAR*>( sqlsrv_malloc( SS_MAXCOLNAMELEN + 1 ));



try {

    core::SQLDescribeColW( stmt, colno + 1, meta_data->field_name.get(), SS_MAXCOLNAMELEN, &field_name_len, 

stmt.cpp:

    core::sqlsrv_add_assoc_string( *stmt, field_array, FieldMetaData::NAME, 

                                   reinterpret_cast<char*>( core_meta_data->field_name.get() ), 0 TSRMLS_CC );

โ€ฆchange to:

    core::sqlsrv_add_assoc_string( *stmt, field_array, FieldMetaData::NAME, 

                                   reinterpret_cast< wchar_t*>( core_meta_data->field_name.get() ), 0 TSRMLS_CC );

Pdo_stmt.cpp:

// Set the name 

column_data->name = reinterpret_cast<char*>( core_meta_data->field_name.get());

โ€ฆchange to:

column_data->name = reinterpret_cast< wchar_t*>( core_meta_data->field_name.get());

Work Item Details

Original CodePlex Issue: Issue 22417
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Sep 25, 2012 at 8:17 PM
Reported by: WRead
Updated on: Sep 25, 2012 at 8:17 PM
Updated by: WRead

Plaintext Attachments

CodePlex Issue #22417 Plain Text Attachments

sqlsrv_has_rows() doesn't roll back statement cursor correctly

Hi, sqlsrv_has_rows() function seems to interfere with the statement cursor
position; assuming to work with an SQL statement wich retrieves a single
record (e.g.: SELECT myField FROM myTable WHERE myIDField =
someExistingValue), try this:

$stmt = sqlsrv_query($conn,$sql);
if (sqlsrv_has_rows($stmt)) {
    while ($row = sqlsrv_fetch_array($stmt)) {
        echo "first field value: " . $row[0];
    }
}
// no output will be produced, because the while cycle will be never entered:

Also repeated calls passing the same (populated) statement fatally makes the
returned value change from TRUE to FALSE. Assuming again to work with an SQL
statement wich retrieves a single record, try this:

$stmt = sqlsrv_query($conn,$sql);
echo "<br>Rows?" . (sqlsrv_has_rows($stmt) ? " Yes!" : " NO!") . "<br>";
echo "<br>Rows?" . (sqlsrv_has_rows($stmt) ? " Yes!" : " NO!") . "<br>";
// the output will be:
// Rows? Yes!
// Rows? No!

thanks in advance

Work Item Details

Original CodePlex Issue: Issue 22426
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Jan 8 at 6:04 PM
Reported by: ideattiva
Updated on: Jan 9 at 9:24 AM
Updated by: robertjohnson

PDO_SQLSRV_56_NTS not working even after installing ODBC11

Hello,

I have installed PHP 5.6.7 NTS x86 with SQLSRV3.2 and ODBC11 on Windows Web Server 2008 R2 x64 with SQL Server 2008 R2 x64.

When accessing website, it says "This extensions require ODBC 11 x86". Since I'm on a x64 architecture, I can't install the ODBC 11 x86.

Any solutions to this problem.

Thank you

Changes from Rev2.0 CTP break php_pdo_sqlsrv_53 driver?

The previous (2.0 CTP April, 2010) php_pdo_sqlsrv_53 driver worked fine in my
environment. When I use the newer (2.0 August, 2010) version, I see fails with
messages like: Error!: SQLSTATE[IMSSP]: The DSN string ended unexpectedly.
Here is the phpinfo() for the failing case: X-Powered-By: PHP/5.3.2 ZendServer
Set-Cookie: ZendDebuggerCookie=127.0.0.1%3A10000%3A0||004|77742D65|1016;
path=/ Content-type: text/html

<title>phpinfo()</title>

PHP Logo

PHP Version 5.3.2

System

Windows NT HYDROTEL 6.1 build 7600 ((null)) i586

Build Date

May 16 2010 09:11:12

Compiler

MSVC9 (Visual C++ 2008)

Architecture

x86

Configure Command

cscript /nologo configure.js "--disable-zip" "--disable-phar" "--disable-ipv6"
"--disable-zts" "--enable-cgi" "--disable-bcmath" "--disable-calendar"
"--disable-odbc" "--disable-tokenizer" "--disable-xmlreader" "--disable-
xmlwriter" "--without-sqlite" "--without-wddx" "--enable-cli-win32" "--enable-
pdo" "--with-openssl" "--with-php-build" "--with-libxml" "--with-pdo-sqlite"

Server API

CGI/FastCGI

Virtual Directory Support

disabled

Configuration File (php.ini) Path

C:\Windows

Loaded Configuration File

C:\Users\Ross\AppData\Local\Temp\zend_debug\session3899917984549426272.tmp\php
.ini

Scan this dir for additional .ini files

(none)

Additional .ini files parsed

(none)

PHP API

20090626

PHP Extension

20090626

Zend Extension

220090626

Zend Extension Build

API220090626,NTS,VC9

PHP Extension Build

API20090626,NTS,VC9

Debug Build

no

Thread Safety

disabled

Zend Memory Manager

enabled

Zend Multibyte Support

disabled

IPv6 Support

disabled

Registered PHP Streams

https, ftps, php, file, glob, data, http, ftp, compress.zlib, compress.bzip2,
phar, zip, sqlsrv

Registered Stream Socket Transports

tcp, udp, ssl, sslv3, sslv2, tls

Registered Stream Filters

convert.iconv., string.rot13, string.toupper, string.tolower,
string.strip_tags, convert.
, consumed, dechunk, zlib., bzip2.

Zend logo This program makes use of the Zend
Scripting Language Engine:
Zendย Engineย v2.3.0,ย Copyrightย (c)ย 1998-2010ย Zendย Technologies
withย Zendย Debuggerย v5.3,ย Copyrightย (c)ย 1999-2010,ย byย Zendย Technologies


PHP Credits


Configuration

bcmath

BCMath support

enabled

Directive Local Value Master Value

bcmath.scale

0

0

bz2

BZip2 Support

Enabled

Stream Wrapper support

compress.bz2://

Stream Filter support

bzip2.decompress, bzip2.compress

BZip2 Version

1.0.4, 20-Dec-2006

calendar

Calendar support

enabled

cgi-fcgi

Directive Local Value Master Value

cgi.check_shebang_line

1

1

cgi.discard_path

0

0

cgi.fix_pathinfo

1

1

cgi.force_redirect

1

1

cgi.nph

0

0

cgi.redirect_status_env

_ no value _

_ no value _

cgi.rfc2616_headers

0

0

fastcgi.impersonate

0

0

fastcgi.logging

1

1

com_dotnet

COM support enabled

DCOM support disabled

.Net support enabled

Directive Local Value Master Value

com.allow_dcom

0

0

com.autoregister_casesensitive

1

1

com.autoregister_typelib

0

0

com.autoregister_verbose

0

0

com.code_page

_ no value _

_ no value _

com.typelib_file

_ no value _

_ no value _

Core

PHP Version

5.3.2

Directive Local Value Master Value

allow_call_time_pass_reference

On

On

allow_url_fopen

On

On

allow_url_include

Off

Off

always_populate_raw_post_data

Off

Off

arg_separator.input

&

&

arg_separator.output

&

&

asp_tags

Off

Off

auto_append_file

_ no value _

_ no value _

auto_globals_jit

On

On

auto_prepend_file

_ no value _

_ no value _

browscap

_ no value _

_ no value _

default_charset

_ no value _

_ no value _

default_mimetype

text/html

text/html

define_syslog_variables

Off

Off

disable_classes

_ no value _

_ no value _

disable_functions

_ no value _

_ no value _

display_errors

On

On

display_startup_errors

On

Off

doc_root

_ no value _

_ no value _

docref_ext

_ no value _

_ no value _

docref_root

_ no value _

_ no value _

enable_dl

On

On

error_append_string

_ no value _

_ no value _

error_log

_ no value _

_ no value _

error_prepend_string

_ no value _

_ no value _

error_reporting

_ no value _

_ no value _

exit_on_timeout

Off

Off

expose_php

On

On

extension_dir

D:\eclipse\plugins\org.zend.php.debug.debugger.win32.x86_5.3.18.v20100603\reso
urces\php53\ext

D:\eclipse\plugins\org.zend.php.debug.debugger.win32.x86_5.3.18.v20100603\reso
urces\php53\ext

file_uploads

On

On

highlight.bg

FFFFFF

FFFFFF

highlight.comment

FF8000

FF8000

highlight.default

0000BB

0000BB

highlight.html
#000000
#000000

highlight.keyword
#007700
#007700

highlight.string

DD0000

DD0000

html_errors

On

On

ignore_repeated_errors

Off

Off

ignore_repeated_source

Off

Off

ignore_user_abort

On

Off

implicit_flush

Off

Off

include_path

.;D:\web\eclipse_projects\test

.;D:\web\eclipse_projects\test

log_errors

Off

Off

log_errors_max_len

1024

1024

magic_quotes_gpc

On

On

magic_quotes_runtime

Off

Off

magic_quotes_sybase

Off

Off

mail.add_x_header

Off

Off

mail.force_extra_parameters

_ no value _

_ no value _

mail.log

_ no value _

_ no value _

max_execution_time

30

30

max_file_uploads

20

20

max_input_nesting_level

64

64

max_input_time

-1
-1

memory_limit

128M

128M

open_basedir

_ no value _

_ no value _

output_buffering

0

0

output_handler

_ no value _

_ no value _

post_max_size

8M

8M

precision

14

14

realpath_cache_size

16K

16K

realpath_cache_ttl

120

120

register_argc_argv

On

On

register_globals

Off

Off

register_long_arrays

On

On

report_memleaks

On

On

report_zend_debug

On

On

request_order

_ no value _

_ no value _

safe_mode

Off

Off

safe_mode_exec_dir

_ no value _

_ no value _

safe_mode_gid

Off

Off

safe_mode_include_dir

_ no value _

_ no value _

sendmail_from

_ no value _

_ no value _

sendmail_path

_ no value _

_ no value _

serialize_precision

100

100

short_open_tag

On

On

SMTP

localhost

localhost

smtp_port

25

25

sql.safe_mode

Off

Off

track_errors

Off

Off

unserialize_callback_func

_ no value _

_ no value _

upload_max_filesize

2M

2M

upload_tmp_dir

_ no value _

_ no value _

user_dir

_ no value _

_ no value _

user_ini.cache_ttl

300

300

user_ini.filename

.user.ini

.user.ini

variables_order

EGPCS

EGPCS

xmlrpc_error_number

0

0

xmlrpc_errors

Off

Off

y2k_compliance

On

On

zend.enable_gc

On

On

ctype

ctype functions

enabled

curl

cURL support

enabled

cURL Information

7.20.0

Age

3

Features

AsynchDNS

Yes

Debug

No

GSS-Negotiate

No

IDN

No

IPv6

No

Largefile

Yes

NTLM

Yes

SPNEGO

No

SSL

Yes

SSPI

No

krb4

No

libz

Yes

CharConv

No

Protocols

dict, file, ftp, ftps, http, https, imap, imaps, ldap, pop3, pop3s, rtsp,
smtp, smtps, telnet, tftp

Host

i386-pc-win32

SSL Version

OpenSSL/0.9.8n

ZLib Version

1.2.3

date

date/time support

enabled

"Olson" Timezone Database Version

2010.3

Timezone Database

internal

Default timezone

Pacific/Auckland

Directive Local Value Master Value

date.default_latitude

31.7667

31.7667

date.default_longitude

35.2333

35.2333

date.sunrise_zenith

90.583333

90.583333

date.sunset_zenith

90.583333

90.583333

date.timezone

Pacific/Auckland

Pacific/Auckland

dom

DOM/XML

enabled

DOM/XML API Version

20031129

libxml Version

2.7.3

HTML Support

enabled

XPath Support

enabled

XPointer Support

enabled

Schema Support

enabled

RelaxNG Support

enabled

ereg

Regex Library

Bundled library enabled

exif

EXIF Support

enabled

EXIF Version

1.4 $Id: exif.c 293036 2010-01-03 09:23:27Z sebastian $

Supported EXIF Version

0220

Supported filetypes

JPEG,TIFF

Directive Local Value Master Value

exif.decode_jis_intel

JIS

JIS

exif.decode_jis_motorola

JIS

JIS

exif.decode_unicode_intel

UCS-2LE

UCS-2LE

exif.decode_unicode_motorola

UCS-2BE

UCS-2BE

exif.encode_jis

_ no value _

_ no value _

exif.encode_unicode

ISO-8859-15

ISO-8859-15

fileinfo

fileinfo support enabled

version

1.0.5-dev

filter

Input Validation and Filtering

enabled

Revision

$Revision: 294106 $

Directive Local Value Master Value

filter.default

unsafe_raw

unsafe_raw

filter.default_flags

_ no value _

_ no value _

ftp

FTP support

enabled

gd

GD Support

enabled

GD Version

bundled (2.0.34 compatible)

FreeType Support

enabled

FreeType Linkage

with freetype

FreeType Version

2.1.9

T1Lib Support

enabled

GIF Read Support

enabled

GIF Create Support

enabled

JPEG Support

enabled

libJPEG Version

6b

PNG Support

enabled

libPNG Version

1.2.8

WBMP Support

enabled

XBM Support

enabled

Directive Local Value Master Value

gd.jpeg_ignore_warning

0

0

gettext

GetText Support

enabled

gmp

gmp support

enabled

GMP version

4.1 (VC7)

hash

hash support

enabled

Hashing Engines

md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256
ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4
tiger192,4 snefru snefru256 gost adler32 crc32 crc32b salsa10 salsa20
haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4
haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5
haval256,5

iconv

iconv support

enabled

iconv implementation

"libiconv"

iconv library version

1.9

Directive Local Value Master Value

iconv.input_encoding

ISO-8859-1

ISO-8859-1

iconv.internal_encoding

ISO-8859-1

ISO-8859-1

iconv.output_encoding

ISO-8859-1

ISO-8859-1

imagick

imagick module enabled

imagick module version

2.2.2

imagick classes

Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator

ImageMagick version

ImageMagick 6.4.6 2008-12-01 Q16 http://www.imagemagick.org

ImageMagick copyright

Copyright (C) 1999-2009 ImageMagick Studio LLC

ImageMagick release date

2008-12-01

ImageMagick Number of supported formats:

0

Directive Local Value Master Value

imagick.locale_fix

0

0

imagick.progress_monitor

0

0

imap

IMAP c-Client Version

2007e

SSL Support

enabled

intl

Internationalization support enabled

version

1.0.3

ICU version

3.8.1

Directive Local Value Master Value

intl.default_locale

_ no value _

_ no value _

intl.error_level

0

0

json

json support

enabled

json version

1.2.1

ldap

LDAP Support

enabled

RCS Version

$Id: ldap.c 293036 2010-01-03 09:23:27Z sebastian $

Total Links

0/unlimited

API Version

3001

Vendor Name

OpenLDAP

Vendor Version

20220

Directive Local Value Master Value

ldap.max_links

Unlimited

Unlimited

libxml

libXML support

active

libXML Compiled Version

2.7.3

libXML Loaded Version

20703

libXML streams

enabled

mbstring

Multibyte Support

enabled

Multibyte string engine

libmbfl

HTTP input encoding translation

disabled

mbstring extension makes use of "streamable kanji code filter and converter",
which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support

enabled

Multibyte regex (oniguruma) version

4.7.1

Directive Local Value Master Value

mbstring.detect_order

_ no value _

_ no value _

mbstring.encoding_translation

Off

Off

mbstring.func_overload

0

0

mbstring.http_input

pass

pass

mbstring.http_output

pass

pass

mbstring.http_output_conv_mimetypes

^(text/|application/xhtml+xml)

^(text/|application/xhtml+xml)

mbstring.internal_encoding

_ no value _

_ no value _

mbstring.language

neutral

neutral

mbstring.strict_detection

Off

Off

mbstring.substitute_character

_ no value _

_ no value _

mcrypt

mcrypt support enabled

Version

2.5.7

Api No

20021217

Supported ciphers

cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192
saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma
rc2 tripledes

Supported modes

cbc cfb ctr ecb ncfb nofb ofb stream

Directive Local Value Master Value

mcrypt.algorithms_dir

_ no value _

_ no value _

mcrypt.modes_dir

_ no value _

_ no value _

memcache

memcache support enabled

Active persistent connections

0

Version

2.2.5

Revision

$Revision: 1.111 $

Directive Local Value Master Value

memcache.allow_failover

1

1

memcache.chunk_size

8192

8192

memcache.default_port

11211

11211

memcache.default_timeout_ms

1000

1000

memcache.hash_function

crc32

crc32

memcache.hash_strategy

standard

standard

memcache.max_failover_attempts

20

20

mysql

MySQL Support enabled

Active Persistent Links

0

Active Links

0

Client API version

mysqlnd 5.0.7-dev - 091210 - $Revision: 294543 $

Directive Local Value Master Value

mysql.allow_local_infile

On

On

mysql.allow_persistent

On

On

mysql.connect_timeout

60

60

mysql.default_host

_ no value _

_ no value _

mysql.default_password

_ no value _

_ no value _

mysql.default_port

_ no value _

_ no value _

mysql.default_socket

_ no value _

_ no value _

mysql.default_user

_ no value _

_ no value _

mysql.max_links

Unlimited

Unlimited

mysql.max_persistent

Unlimited

Unlimited

mysql.trace_mode

Off

Off

mysqli

MysqlI Support enabled

Client API library version

mysqlnd 5.0.7-dev - 091210 - $Revision: 294543 $

Active Persistent Links

0

Inactive Persistent Links

0

Active Links

0

Directive Local Value Master Value

mysqli.allow_local_infile

On

On

mysqli.allow_persistent

On

On

mysqli.default_host

_ no value _

_ no value _

mysqli.default_port

3306

3306

mysqli.default_pw

_ no value _

_ no value _

mysqli.default_socket

_ no value _

_ no value _

mysqli.default_user

_ no value _

_ no value _

mysqli.max_links

Unlimited

Unlimited

mysqli.max_persistent

Unlimited

Unlimited

mysqli.reconnect

Off

Off

mysqlnd

mysqlnd enabled

Version

mysqlnd 5.0.7-dev - 091210 - $Revision: 294543 $

Compression

supported

Command buffer size

4096

Read buffer size

32768

Read timeout

31536000

Collecting statistics

Yes

Collecting memory statistics

No

Client statistics

bytes_sent

0

bytes_received

0

packets_sent

0

packets_received

0

protocol_overhead_in

0

protocol_overhead_out

0

bytes_received_ok_packet

0

bytes_received_eof_packet

0

bytes_received_rset_header_packet

0

bytes_received_rset_field_meta_packet

0

bytes_received_rset_row_packet

0

bytes_received_prepare_response_packet

0

bytes_received_change_user_packet

0

packets_sent_command

0

packets_received_ok

0

packets_received_eof

0

packets_received_rset_header

0

packets_received_rset_field_meta

0

packets_received_rset_row

0

packets_received_prepare_response

0

packets_received_change_user

0

result_set_queries

0

non_result_set_queries

0

no_index_used

0

bad_index_used

0

slow_queries

0

buffered_sets

0

unbuffered_sets

0

ps_buffered_sets

0

ps_unbuffered_sets

0

flushed_normal_sets

0

flushed_ps_sets

0

ps_prepared_never_executed

0

ps_prepared_once_executed

0

rows_fetched_from_server_normal

0

rows_fetched_from_server_ps

0

rows_buffered_from_client_normal

0

rows_buffered_from_client_ps

0

rows_fetched_from_client_normal_buffered

0

rows_fetched_from_client_normal_unbuffered

0

rows_fetched_from_client_ps_buffered

0

rows_fetched_from_client_ps_unbuffered

0

rows_fetched_from_client_ps_cursor

0

rows_affected_normal

0

rows_affected_ps

0

rows_skipped_normal

0

rows_skipped_ps

0

copy_on_write_saved

0

copy_on_write_performed

0

command_buffer_too_small

0

connect_success

0

connect_failure

0

connection_reused

0

reconnect

0

pconnect_success

0

active_connections

0

active_persistent_connections

0

explicit_close

0

implicit_close

0

disconnect_close

0

in_middle_of_command_close

0

explicit_free_result

0

implicit_free_result

0

explicit_stmt_close

0

implicit_stmt_close

0

mem_emalloc_count

0

mem_emalloc_ammount

0

mem_ecalloc_count

0

mem_ecalloc_ammount

0

mem_erealloc_count

0

mem_erealloc_ammount

0

mem_efree_count

0

mem_malloc_count

0

mem_malloc_ammount

0

mem_calloc_count

0

mem_calloc_ammount

0

mem_realloc_count

0

mem_realloc_ammount

0

mem_free_count

0

proto_text_fetched_null

0

proto_text_fetched_bit

0

proto_text_fetched_tinyint

0

proto_text_fetched_short

0

proto_text_fetched_int24

0

proto_text_fetched_int

0

proto_text_fetched_bigint

0

proto_text_fetched_decimal

0

proto_text_fetched_float

0

proto_text_fetched_double

0

proto_text_fetched_date

0

proto_text_fetched_year

0

proto_text_fetched_time

0

proto_text_fetched_datetime

0

proto_text_fetched_timestamp

0

proto_text_fetched_string

0

proto_text_fetched_blob

0

proto_text_fetched_enum

0

proto_text_fetched_set

0

proto_text_fetched_geometry

0

proto_text_fetched_other

0

proto_binary_fetched_null

0

proto_binary_fetched_bit

0

proto_binary_fetched_tinyint

0

proto_binary_fetched_short

0

proto_binary_fetched_int24

0

proto_binary_fetched_int

0

proto_binary_fetched_bigint

0

proto_binary_fetched_decimal

0

proto_binary_fetched_float

0

proto_binary_fetched_double

0

proto_binary_fetched_date

0

proto_binary_fetched_year

0

proto_binary_fetched_time

0

proto_binary_fetched_datetime

0

proto_binary_fetched_timestamp

0

proto_binary_fetched_string

0

proto_binary_fetched_blob

0

proto_binary_fetched_enum

0

proto_binary_fetched_set

0

proto_binary_fetched_geometry

0

proto_binary_fetched_other

0

init_command_executed_count

0

init_command_failed_count

0

com_quit

0

com_init_db

0

com_query

0

com_field_list

0

com_create_db

0

com_drop_db

0

com_refresh

0

com_shutdown

0

com_statistics

0

com_process_info

0

com_connect

0

com_process_kill

0

com_debug

0

com_ping

0

com_time

0

com_delayed_insert

0

com_change_user

0

com_binlog_dump

0

com_table_dump

0

com_connect_out

0

com_register_slave

0

com_stmt_prepare

0

com_stmt_execute

0

com_stmt_send_long_data

0

com_stmt_close

0

com_stmt_reset

0

com_stmt_set_option

0

com_stmt_fetch

0

com_deamon

0

odbc

ODBC Support enabled

Active Persistent Links

0

Active Links

0

ODBC library

Win32

Directive Local Value Master Value

odbc.allow_persistent

On

On

odbc.check_persistent

On

On

odbc.default_cursortype

Static cursor

Static cursor

odbc.default_db

_ no value _

_ no value _

odbc.default_pw

_ no value _

_ no value _

odbc.default_user

_ no value _

_ no value _

odbc.defaultbinmode

return as is

return as is

odbc.defaultlrl

return up to 4096 bytes

return up to 4096 bytes

odbc.max_links

Unlimited

Unlimited

odbc.max_persistent

Unlimited

Unlimited

openssl

OpenSSL support

enabled

OpenSSL Library Version

OpenSSL 0.9.8n 24 Mar 2010

OpenSSL Header Version

OpenSSL 0.9.8n 24 Mar 2010

pcre

PCRE (Perl Compatible Regular Expressions) Support

enabled

PCRE Library Version

8.00 2009-10-19

Directive Local Value Master Value

pcre.backtrack_limit

100000

100000

pcre.recursion_limit

100000

100000

PDO

PDO support enabled

PDO drivers

sqlite, mysql, odbc, pgsql, sqlite2, sqlsrv

pdo_mysql

PDO Driver for MySQL enabled

Client API version

mysqlnd 5.0.7-dev - 091210 - $Revision: 294543 $

PDO_ODBC

PDO Driver for ODBC (Win32) enabled

ODBC Connection Pooling

Enabled, strict matching

pdo_pgsql

PDO Driver for PostgreSQL enabled

PostgreSQL(libpq) Version

8.2.14

Module version

1.0.2

Revision

$Id: pdo_pgsql.c 293036 2010-01-03 09:23:27Z sebastian $

pdo_sqlite

PDO Driver for SQLite 3.x enabled

SQLite Library

3.6.22

pdo_sqlsrv

pdo_sqlsrv support enabled

Directive Local Value Master Value

pdo_sqlsrv.log_severity

0

0

pgsql

PostgreSQL Support enabled

PostgreSQL(libpq) Version

8.2.14

Multibyte character support

enabled

SSL support

disabled

Active Persistent Links

0

Active Links

0

Directive Local Value Master Value

pgsql.allow_persistent

On

On

pgsql.auto_reset_persistent

Off

Off

pgsql.ignore_notice

Off

Off

pgsql.log_notice

Off

Off

pgsql.max_links

Unlimited

Unlimited

pgsql.max_persistent

Unlimited

Unlimited

Phar

Phar: PHP Archive support enabled

Phar EXT version

2.0.1

Phar API version

1.1.1

SVN revision

$Revision: 290435 $

Phar-based phar archives

enabled

Tar-based phar archives

enabled

ZIP-based phar archives

enabled

gzip compression

enabled

bzip2 compression

enabled

OpenSSL support

enabled

Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.

Directive Local Value Master Value

phar.cache_list

_ no value _

_ no value _

phar.readonly

On

On

phar.require_hash

On

On

Reflection

Reflection enabled

Version

$Revision: 293036 $

session

Session Support

enabled

Registered save handlers

files user memcache sqlite

Registered serializer handlers

php php_binary wddx

Directive Local Value Master Value

session.auto_start

Off

Off

session.bug_compat_42

On

On

session.bug_compat_warn

On

On

session.cache_expire

180

180

session.cache_limiter

nocache

nocache

session.cookie_domain

_ no value _

_ no value _

session.cookie_httponly

Off

Off

session.cookie_lifetime

0

0

session.cookie_path

/

/

session.cookie_secure

Off

Off

session.entropy_file

_ no value _

_ no value _

session.entropy_length

0

0

session.gc_divisor

100

100

session.gc_maxlifetime

1440

1440

session.gc_probability

1

1

session.hash_bits_per_character

4

4

session.hash_function

0

0

session.name

PHPSESSID

PHPSESSID

session.referer_check

_ no value _

_ no value _

session.save_handler

files

files

session.save_path

_ no value _

_ no value _

session.serialize_handler

php

php

session.use_cookies

On

On

session.use_only_cookies

On

On

session.use_trans_sid

0

0

shmop

shmop support

enabled

SimpleXML

Simplexml support enabled

Revision

$Revision: 293036 $

Schema support

enabled

soap

Soap Client

enabled

Soap Server

enabled

Directive Local Value Master Value

soap.wsdl_cache

1

1

soap.wsdl_cache_dir

/tmp

/tmp

soap.wsdl_cache_enabled

1

1

soap.wsdl_cache_limit

5

5

soap.wsdl_cache_ttl

86400

86400

sockets

Sockets Support

enabled

SPL

SPL support enabled

Interfaces

Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver,
SplSubject

Classes

AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException,
BadMethodCallException, CachingIterator, DirectoryIterator, DomainException,
EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator,
InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException,
LimitIterator, LogicException, MultipleIterator, NoRewindIterator,
OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator,
RangeException, RecursiveArrayIterator, RecursiveCachingIterator,
RecursiveDirectoryIterator, RecursiveFilterIterator,
RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator,
RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo,
SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap,
SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject,
UnderflowException, UnexpectedValueException

SQLite

SQLite support enabled

PECL Module version

2.0-dev $Id: sqlite.c 293036 2010-01-03 09:23:27Z sebastian $

SQLite Library

2.8.17

SQLite Encoding

iso8859

Directive Local Value Master Value

sqlite.assoc_case

0

0

sqlsrv

sqlsrv support enabled

Directive Local Value Master Value

sqlsrv.LogSeverity

0

0

sqlsrv.LogSubsystems

0

0

sqlsrv.WarningsReturnAsErrors

On

On

standard

Dynamic Library Support

enabled

Internal Sendmail Support for Windows

enabled

Directive Local Value Master Value

assert.active

1

1

assert.bail

0

0

assert.callback

_ no value _

_ no value _

assert.quiet_eval

0

0

assert.warning

1

1

auto_detect_line_endings

0

0

default_socket_timeout

60

60

safe_mode_allowed_env_vars

PHP_

PHP_

safe_mode_protected_env_vars

LD_LIBRARY_PATH

LD_LIBRARY_PATH

url_rewriter.tags

a=href,area=href,frame=src,form=,fieldset=

a=href,area=href,frame=src,form=,fieldset=

user_agent

_ no value _

_ no value _

tidy

Tidy support enabled

libTidy Release

1st August 2004

Extension Version

2.0 ($Id: tidy.c 294893 2010-02-11 17:36:40Z johannes $)

Directive Local Value Master Value

tidy.clean_output

0

0

tidy.default_config

_ no value _

_ no value _

tokenizer

Tokenizer Support

enabled

uploadprogress

uploadprogress support enabled

Version

1.0.1

Directive Local Value Master Value

uploadprogress.file.contents_template

/upload_contents_%s

/upload_contents_%s

uploadprogress.file.filename_template

/upt_%s.txt

/upt_%s.txt

uploadprogress.get_contents

0

0

wddx

WDDX Support enabled

WDDX Session Serializer

enabled

xml

XML Support

active

XML Namespace Support

active

libxml2 Version

2.7.3

xmlrpc

core library version

xmlrpc-epi v. 0.51

php extension version

0.51

author

Dan Libby

homepage

http://xmlrpc-epi.sourceforge.net

open sourced by

Epinions.com

xmlwriter

XMLWriter

enabled

Zend Debugger

Expose Zend Debugger

never

Passive Mode Timeout

20 seconds

Directive Local Value Master Value

zend_debugger.allow_hosts

127.0.0.1/32

127.0.0.1/32

zend_debugger.allow_tunnel

_ no value _

_ no value _

zend_debugger.deny_hosts

_ no value _

_ no value _

zend_debugger.expose_remotely

never

never

zend_debugger.httpd_uid

-1
-1

zend_debugger.max_msg_size

2097152

2097152

zend_debugger.tunnel_max_port

65535

65535

zend_debugger.tunnel_min_port

1024

1024

zend_debugger.use_fast_timestamp

1

1

zend_debugger.xdebug_compatible_coverage

0

0

zip

Zip

enabled

Extension Version

$Id: php_zip.c 294817 2010-02-09 17:51:39Z pajoye $

Zip version

1.9.1

Libzip version

0.9.0

zlib

ZLib Support

enabled

Stream Wrapper support

compress.zlib://

Stream Filter support

zlib.inflate, zlib.deflate

Compiled Version

1.2.3

Linked Version

1.2.3

Directive Local Value Master Value

zlib.output_compression

Off

Off

zlib.output_compression_level

-1
-1

zlib.output_handler

_ no value _

_ no value _

Additional Modules

Module Name

Environment

Variable Value

ALLUSERSPROFILE

C:\ProgramData

APPDATA

C:\Users\Ross\AppData\Roaming

CommonProgramFiles

C:\Program Files (x86)\Common Files

CommonProgramFiles(x86)

C:\Program Files (x86)\Common Files

CommonProgramW6432

C:\Program Files\Common Files

COMPUTERNAME

HYDROTEL

ComSpec

C:\Windows\system32\cmd.exe

FP_NO_HOST_CHECK

NO

HOMEDRIVE

C:

HOMEPATH

\Users\Ross

LOCALAPPDATA

C:\Users\Ross\AppData\Local

LOGONSERVER

\HYDROTEL

NUMBER_OF_PROCESSORS

1

OS

Windows_NT

Path

C:/Program Files (x86)/Java/jre1.5.0_22/bin/client;C:/Program Files
(x86)/Java/jre1.5.0_22/bin;C:/Program Files (x86)/Java/jre1.5.0_22/lib/i386;C:
\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind
owsPowerShell\v1.0;c:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn;c:\Program Files (x86)\Microsoft SQL
Server\100\DTS\Binn;c:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn\VSShell\Common7\IDE;c:\Program Files (x86)\Microsoft
Visual Studio 9.0\Common7\IDE\PrivateAssemblies\

PATHEXT

.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

PATH_INFO

D:\web\eclipse_projects\test\phpinfo.php

PATH_TRANSLATED

D:\web\eclipse_projects\test\phpinfo.php

PHPRC

C:\Users\Ross\AppData\Local\Temp\zend_debug\session3899917984549426272.tmp

PROCESSOR_ARCHITECTURE

x86

PROCESSOR_ARCHITEW6432

AMD64

PROCESSOR_IDENTIFIER

Intel64 Family 6 Model 26 Stepping 5, GenuineIntel

PROCESSOR_LEVEL

6

PROCESSOR_REVISION

1a05

ProgramData

C:\ProgramData

ProgramFiles

C:\Program Files (x86)

ProgramFiles(x86)

C:\Program Files (x86)

ProgramW6432

C:\Program Files

PROMPT

$P$G

PSModulePath

C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

PUBLIC

C:\Users\Public

QUERY_STRING

start_debug=1&send_sess_end=1&debug_session_id=1016&debug_start_session=1&debu
g_port=10000&debug_host=127.0.0.1

REDIRECT_STATUS

1

REQUEST_METHOD

GET

SCRIPT_FILENAME

D:\web\eclipse_projects\test\phpinfo.php

SCRIPT_NAME

D:\web\eclipse_projects\test\phpinfo.php

SESSIONNAME

Console

SystemDrive

C:

SystemRoot

C:\Windows

TEMP

C:\Users\Ross\AppData\Local\Temp

TMP

C:\Users\Ross\AppData\Local\Temp

USERDOMAIN

HYDROTEL

USERNAME

Ross

USERPROFILE

C:\Users\Ross

windir

C:\Windows

PHP Variables

Variable Value

_REQUEST["start_debug"]

1

_REQUEST["send_sess_end"]

1

_REQUEST["debug_session_id"]

1016

_REQUEST["debug_start_session"]

1

_REQUEST["debug_port"]

10000

_REQUEST["debug_host"]

127.0.0.1

_GET["start_debug"]

1

_GET["send_sess_end"]

1

_GET["debug_session_id"]

1016

_GET["debug_start_session"]

1

_GET["debug_port"]

10000

_GET["debug_host"]

127.0.0.1

_SERVER["ALLUSERSPROFILE"]

C:\ProgramData

_SERVER["APPDATA"]

C:\Users\Ross\AppData\Roaming

_SERVER["CommonProgramFiles"]

C:\Program Files (x86)\Common Files

_SERVER["CommonProgramFiles(x86)"]

C:\Program Files (x86)\Common Files

_SERVER["CommonProgramW6432"]

C:\Program Files\Common Files

_SERVER["COMPUTERNAME"]

HYDROTEL

_SERVER["ComSpec"]

C:\Windows\system32\cmd.exe

_SERVER["FP_NO_HOST_CHECK"]

NO

_SERVER["HOMEDRIVE"]

C:

_SERVER["HOMEPATH"]

\Users\Ross

_SERVER["LOCALAPPDATA"]

C:\Users\Ross\AppData\Local

_SERVER["LOGONSERVER"]

\HYDROTEL

_SERVER["NUMBER_OF_PROCESSORS"]

1

_SERVER["OS"]

Windows_NT

_SERVER["Path"]

C:/Program Files (x86)/Java/jre1.5.0_22/bin/client;C:/Program Files
(x86)/Java/jre1.5.0_22/bin;C:/Program Files (x86)/Java/jre1.5.0_22/lib/i386;C:
\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind
owsPowerShell\v1.0;c:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn;c:\Program Files (x86)\Microsoft SQL
Server\100\DTS\Binn;c:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn\VSShell\Common7\IDE;c:\Program Files (x86)\Microsoft
Visual Studio 9.0\Common7\IDE\PrivateAssemblies\

_SERVER["PATHEXT"]

.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

_SERVER["PATH_INFO"]

D:\web\eclipse_projects\test\phpinfo.php

_SERVER["PATH_TRANSLATED"]

D:\web\eclipse_projects\test\phpinfo.php

_SERVER["PHPRC"]

C:\Users\Ross\AppData\Local\Temp\zend_debug\session3899917984549426272.tmp

_SERVER["PROCESSOR_ARCHITECTURE"]

x86

_SERVER["PROCESSOR_ARCHITEW6432"]

AMD64

_SERVER["PROCESSOR_IDENTIFIER"]

Intel64 Family 6 Model 26 Stepping 5, GenuineIntel

_SERVER["PROCESSOR_LEVEL"]

6

_SERVER["PROCESSOR_REVISION"]

1a05

_SERVER["ProgramData"]

C:\ProgramData

_SERVER["ProgramFiles"]

C:\Program Files (x86)

_SERVER["ProgramFiles(x86)"]

C:\Program Files (x86)

_SERVER["ProgramW6432"]

C:\Program Files

_SERVER["PROMPT"]

$P$G

_SERVER["PSModulePath"]

C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

_SERVER["PUBLIC"]

C:\Users\Public

_SERVER["QUERY_STRING"]

start_debug=1&send_sess_end=1&debug_session_id=1016&debug_start_session=1&debu
g_port=10000&debug_host=127.0.0.1

_SERVER["REDIRECT_STATUS"]

1

_SERVER["REQUEST_METHOD"]

GET

_SERVER["SCRIPT_FILENAME"]

D:\web\eclipse_projects\test\phpinfo.php

_SERVER["SCRIPT_NAME"]

D:\web\eclipse_projects\test\phpinfo.php

_SERVER["SESSIONNAME"]

Console

_SERVER["SystemDrive"]

C:

_SERVER["SystemRoot"]

C:\Windows

_SERVER["TEMP"]

C:\Users\Ross\AppData\Local\Temp

_SERVER["TMP"]

C:\Users\Ross\AppData\Local\Temp

_SERVER["USERDOMAIN"]

HYDROTEL

_SERVER["USERNAME"]

Ross

_SERVER["USERPROFILE"]

C:\Users\Ross

_SERVER["windir"]

C:\Windows

_SERVER["PHP_SELF"]

D:\web\eclipse_projects\test\phpinfo.phpD:\web\eclipse_projects\test\phpinfo.p
hp

_SERVER["REQUEST_TIME"]

1282095491

_SERVER["argv"]

Array
(
    [0] => start_debug=1&send_sess_end=1&debug_session_id=1016&debug_start_session=1&debug_port=10000&debug_host=127.0.0.1
)

_SERVER["argc"]

1

_ENV["ALLUSERSPROFILE"]

C:\ProgramData

_ENV["APPDATA"]

C:\Users\Ross\AppData\Roaming

_ENV["CommonProgramFiles"]

C:\Program Files (x86)\Common Files

_ENV["CommonProgramFiles(x86)"]

C:\Program Files (x86)\Common Files

_ENV["CommonProgramW6432"]

C:\Program Files\Common Files

_ENV["COMPUTERNAME"]

HYDROTEL

_ENV["ComSpec"]

C:\Windows\system32\cmd.exe

_ENV["FP_NO_HOST_CHECK"]

NO

_ENV["HOMEDRIVE"]

C:

_ENV["HOMEPATH"]

\Users\Ross

_ENV["LOCALAPPDATA"]

C:\Users\Ross\AppData\Local

_ENV["LOGONSERVER"]

\HYDROTEL

_ENV["NUMBER_OF_PROCESSORS"]

1

_ENV["OS"]

Windows_NT

_ENV["Path"]

C:/Program Files (x86)/Java/jre1.5.0_22/bin/client;C:/Program Files
(x86)/Java/jre1.5.0_22/bin;C:/Program Files (x86)/Java/jre1.5.0_22/lib/i386;C:
\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind
owsPowerShell\v1.0;c:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn;c:\Program Files (x86)\Microsoft SQL
Server\100\DTS\Binn;c:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn\VSShell\Common7\IDE;c:\Program Files (x86)\Microsoft
Visual Studio 9.0\Common7\IDE\PrivateAssemblies\

_ENV["PATHEXT"]

.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

_ENV["PATH_INFO"]

D:\web\eclipse_projects\test\phpinfo.php

_ENV["PATH_TRANSLATED"]

D:\web\eclipse_projects\test\phpinfo.php

_ENV["PHPRC"]

C:\Users\Ross\AppData\Local\Temp\zend_debug\session3899917984549426272.tmp

_ENV["PROCESSOR_ARCHITECTURE"]

x86

_ENV["PROCESSOR_ARCHITEW6432"]

AMD64

_ENV["PROCESSOR_IDENTIFIER"]

Intel64 Family 6 Model 26 Stepping 5, GenuineIntel

_ENV["PROCESSOR_LEVEL"]

6

_ENV["PROCESSOR_REVISION"]

1a05

_ENV["ProgramData"]

C:\ProgramData

_ENV["ProgramFiles"]

C:\Program Files (x86)

_ENV["ProgramFiles(x86)"]

C:\Program Files (x86)

_ENV["ProgramW6432"]

C:\Program Files

_ENV["PROMPT"]

$P$G

_ENV["PSModulePath"]

C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

_ENV["PUBLIC"]

C:\Users\Public

_ENV["QUERY_STRING"]

start_debug=1&send_sess_end=1&debug_session_id=1016&debug_start_session=1&debu
g_port=10000&debug_host=127.0.0.1

_ENV["REDIRECT_STATUS"]

1

_ENV["REQUEST_METHOD"]

GET

_ENV["SCRIPT_FILENAME"]

D:\web\eclipse_projects\test\phpinfo.php

_ENV["SCRIPT_NAME"]

D:\web\eclipse_projects\test\phpinfo.php

_ENV["SESSIONNAME"]

Console

_ENV["SystemDrive"]

C:

_ENV["SystemRoot"]

C:\Windows

_ENV["TEMP"]

C:\Users\Ross\AppData\Local\Temp

_ENV["TMP"]

C:\Users\Ross\AppData\Local\Temp

_ENV["USERDOMAIN"]

HYDROTEL

_ENV["USERNAME"]

Ross

_ENV["USERPROFILE"]

C:\Users\Ross

_ENV["windir"]

C:\Windows

PHP License

This program is free software; you can redistribute it and/or modify it under
the terms of the PHP License as published by the PHP Group and included in the
distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions about
PHP licensing, please contact [email protected].

## Work Item Details

Original CodePlex Issue: Issue 18510
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Aug 18, 2010 at 1:41 AM
Reported by: rphilip
Updated on: Nov 1, 2010 at 9:06 AM
Updated by: rphilip
Closed on: Aug 25, 2010 at 4:51 AM

Inherited DateTime object not accepted in parametrized query

When passing inherited DateTime object to sqlsrv_query() in $params argument,
SQLSRV complains about unknown type of the value.

SQLSRV should look whether the DateTime instance is class of or _ child of _
DateTime object.

Example of bug:

class DateTime2 extends DateTime {

}

sqlsrv_query('SELECT ?', array( array(new DateTime2()) )); // โ† this raises an
error

Work Item Details

Original CodePlex Issue: Issue 16727
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Mar 11, 2010 at 10:36 AM
Reported by: michalkocarek
Updated on: Jul 17, 2010 at 8:15 PM
Updated by: AshayC
Closed on: Jul 17, 2010 at 8:15 PM

Problem with sqlsrv_next_result/lastinsertid after insert on table with trigger

Hi,

i have a table with an insert trigger defined. I made an insert on this table
and want to get the inserted id. So i made this:
$sql = 'INSERT INTO "content" ("parent", "name", "content", "created_by",
"changed_by", "create_date", "change_date") VALUES (?, ?, ?, ?, ?, ?, ?)
SELECT SCOPE_IDENTITY() as Current_Identity';
$params = array(1, 'TTTTTTTTTTTTT', 'TTTTTTTTTTTTT', 0, 0, '20121128
20:01:57', '20121128 20:01:57');

$stmt = sqlsrv_query( $conn, $sql, $params);

To get the Current_Identity i need to make two sqlsrv_next_result. If i delete
the trigger it works with only one sqlsrv_next_result.
This sounds like a bug for me.

Attached is an example script.

I used php 5.4 with sqlsrv 3.0.1

regards,
Frank

Work Item Details

Original CodePlex Issue: Issue 22418
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Nov 30, 2012 at 8:57 AM
Reported by: lordlamer
Updated on: Dec 6, 2012 at 7:45 AM
Updated by: lordlamer

Plaintext Attachments

CodePlex Issue #22418 Plain Text Attachments

Calling sqlsrv_connect() with TraceFile set but TraceOn set to False creates an empty file.

Hi.

Just started playing with this extension in earnest.

__FILE__, 'CharacterSet' => 'UTF-8', 'ConnectionPooling' => True, 'Database' => 'My_DB', 'Encrypt' => False, 'Failover_Partner' => '', 'LoginTimeout' => 10, 'MultipleActiveResultSets' => True, 'PWD' => 'My_PWD', 'QuotedId' => True, 'ReturnDatesAsStrings' => False, ``` // 'TraceFile' => 'Z:/Logs/SQLTrace/' . date('Y-m-d G.i.s ') . basename( ** FILE *\* ) . '_Trace.log', ``` 'TraceOn' => False, 'TransactionIsolation' => SQLSRV_TXN_READ_COMMITTED, 'TrustServerCertificate' => True, 'UID' => 'My_UID', 'WSID' => getenv('COMPUTERNAME'), ) ); ``` ?>

The call works fine, but if I don't comment out 'TraceFile', I get a zero
length file.

I think the file should be created when the first trace entry is written. If
no tracing is actually written (the TraceOn is False), then nothing should be
created.

Regards,

Richard Quadling.

Work Item Details

Original CodePlex Issue: Issue 16928
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Mar 23, 2010 at 3:32 PM
Reported by: RQuadling
Updated on: Jul 17, 2010 at 8:28 PM
Updated by: AshayC
Closed on: Jul 17, 2010 at 8:28 PM

memory exception when calling sql_next_result

SQL serer library: php_sqlsrv.dll, version 3
PHP: 5.4 & 5.5

Hi,

When calling sql_next_result we get a memory exception. The exception is
caused by the code in

_ sqlsrv_error* odbc_get_diag_rec( sqlsrv_stmt* odbc, SQLSMALLINT
record_number ) _

attempting to free a stack based char buffer.

The problem occurs when convert_string_from_utf16 does not convert the SQL
message (in our case a warning derived from a sql server print statement). If
it is not converted the char pointer in odbc_get_diag_rec still refers to a
stack variable instead of the new convert_string char pointer. On exit of the
function odbc_get_diag_rec causes a memory exception.

I have attached the code before and after my fix. The code was downloaded from
the source code link on the 19/02/2014

Charles Durrant
Thomson Reuters

Work Item Details

Original CodePlex Issue: Issue 22427
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Feb 24 at 10:52 AM
Reported by: charliedurrant
Updated on: Feb 24 at 10:52 AM
Updated by: charliedurrant

Binary Attachments

patch.zip

Binary data not returned when column data or column bound by name

Hi,

When using the PDO php driver (v3) with the adventureworks sample db and
either you add the following code to the sample (pdo_photo.php):

$stmt->execute(array(&$_GET['productId']));

/ _ NEW CODE _ /

$data = array();
$count = $stmt->columnCount();
for ( $i = 0; $i < $count; $i++ )
{
$field_data_array = $stmt->getColumnMeta($i);
$data[$field_data->Name] = $field_data_array;
}

/ _ END NEW CODE _ /

$stmt->bindColumn(1, $image, PDO::PARAM_LOB, 0, PDO::SQLSRV_ENCODING_BINARY);

$stmt->execute(array(&$_GET['productId']));

/ _ CHANGE column index to name, strange column indexes are 1 based _ /

$stmt->bindColumn(1, "LargePhoto", PDO::PARAM_LOB, 0,
PDO::SQLSRV_ENCODING_BINARY);

Then the binary data is mangled and the photo is not displayed.

Yours,

Charles Durrant
Thomson Reuters

Work Item Details

Original CodePlex Issue: Issue 22424
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Nov 19, 2013 at 2:47 PM
Reported by: charliedurrant
Updated on: Nov 19, 2013 at 2:48 PM
Updated by: charliedurrant

Domain user problem

Hey guys,

I'm testing your extension and I found this:

When I try to connect using a domain user account (DOMAIN\USER) it says it
can't connect "access denied" even when the user has admin rights on that
server (DBA), but it does work when a regular user (NOT DOMAIN) logs in, any
ideas what can be causing this?

Thanks.

Work Item Details

Original CodePlex Issue: Issue 22423
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Oct 8, 2013 at 2:56 PM
Reported by: jfha73
Updated on: Oct 24, 2013 at 8:34 AM
Updated by: robertjohnson

Using reflection on the extension or the functions in the extension result in invalid parameter names.

The parameter names to all the functions in the extension (V1.1.428.1) are
quoted ...

[2010/04/30 12:17:20] [C:] [] >c:\php5\php.exe -n -d extension_dir=c:\php5\ext
-d extension="php_sqlsrv_53_nts_vc9.dll" --rf sqlsrv_connect
Function [ internal:sqlsrv function sqlsrv_connect ] {

  • Parameters [2] {
    Parameter #0 [ $"server" ]
    Parameter #1 [ array $"options" ]
    }
    }

Patch supplied to fix this.

Regards,

Richard Quadling.

P.S. Re-attached patch and to
http://sqlsrvphp.codeplex.com/SourceControl/PatchList.aspx

Work Item Details

Original CodePlex Issue: Issue 17486
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Apr 30, 2010 at 11:21 AM
Reported by: RQuadling
Updated on: Jul 17, 2010 at 8:44 PM
Updated by: AshayC

Plaintext Attachments

CodePlex Issue #17486 Plain Text Attachments

Remove static on function already inside anonymous namespace

In stream.cpp:129, a static is specified on a function that is already inside
an anonymous namespace.

This really is just a test to put an issue in, though this is a real issue
that should be fixed in the next release.

Work Item Details

Original CodePlex Issue: Issue 10808
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Jul 29, 2008 at 12:36 AM
Reported by: icosahedron
Updated on: Apr 28, 2009 at 10:11 PM
Updated by: DavidSceppa
Closed on: Apr 28, 2009 at 10:11 PM

Cannot use transactions if there are any open recordsets

It seems that SQL Server does not allow more than one recordset to be opened
at the same time. So any code doing the something like this will fail:

  • open recordset
  • open recordset

To solve that limitation the "Multiple Active Result Sets" mode (MARS) was
created and the combination above started to work.

But the MARS mode has some limitations about what can and what cannot be done.
One of these is that we cannot use transactions if there are any open
recordsets. That means that any code doing the following will fail:

  • open recordset
  • start transaction

Is there any way to get around this?

Work Item Details

Original CodePlex Issue: Issue 22420
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Jun 7, 2013 at 11:09 AM
Reported by: luisdev
Updated on: Jun 7, 2013 at 11:09 AM
Updated by: luisdev

Analysis Services Driver

Provide an interface to SQL Server Analysis Services.

Work Item Details

Original CodePlex Issue: Issue 16555
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Feb 26, 2010 at 6:27 AM
Reported by: MitchMcBride
Updated on: Mar 8 at 11:04 AM
Updated by: miguelajh

Undocumented values of "Type" from sqlsrv_field_metadata()

sqlsrv_field_metadata() function returns also a value named Type for each of
the columns, but the values itself are lacking documentation.

The SQLSRV documentation states that Type is "Numeric value that corresponds
to a SQL type.", but the value itself does not map to any of SQLSRV_PHPTYPE_*
or SQLSRV_SQLTYPE_* constants. The value comes is ODBC SQL_* type constant.
These constants SHOULD be documented in the SQLSRV help. Without diving into
the sourcecode, noone can guess what do they mean.

** More information about Type value meaning **
According the source (stmt.cpp, around line 674), the Type value comes from
SQLDescribeCol() function ( [ http://msdn.microsoft.com/en-
us/library/ms716289%28VS.85%29.aspx ](http://msdn.microsoft.com/en-
us/library/ms716289%28VS.85%29.aspx) ) and value can be one of SQL_* constants
listed here http://msdn.microsoft.com/en-us/library/ms710150%28VS.85%29.aspx
.

SQL_* constants values can be found in ODBC client header files "sql.h" and
"sqlext.h" (I am running SQL Server 2000 with SDK, and these files are located
in Program Files\Microsoft SQL Server\80\Tools\DevTools\Include).

** Selected SQL_* constants values **
According to previous information, I constructed following list of most common
values of Type:
SQL_UNKNOWN_TYPE = 0
SQL_CHAR = 1
SQL_VARCHAR = 12
SQL_DECIMAL = 3
SQL_NUMERIC = 2
SQL_SMALLINT = 5
SQL_INTEGER = 4
SQL_REAL = 7
SQL_FLOAT = 6
SQL_DOUBLE = 8
SQL_BIT = -7
SQL_TINYINT = -6
SQL_BIGINT = -5
SQL_BINARY = -2
SQL_VARBINARY = -3
SQL_LONGVARBINARY = -4
SQL_TYPE_DATE = 91
SQL_TYPE_TIME = 92
SQL_TYPE_TIMESTAMP = 93

Work Item Details

Original CodePlex Issue: Issue 16723
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Mar 11, 2010 at 9:59 AM
Reported by: michalkocarek
Updated on: Jul 17, 2010 at 8:05 PM
Updated by: AshayC
Closed on: Jul 17, 2010 at 8:05 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.