Jan Reilink

Jan Reilink

Hi there, I'm Jan and this is my blog.

Connect to MS SQL Server with PHP 5.3+

PHP logo by Colin Viebrock

As of PHP 5.3.2 you have to use the SQLSRV API functions to connect to an Microsoft SQL Server database from PHP. For example, use sqlsrv_connect() to create a connection resource and open a connection. Learn how to connect to a Microsoft SQL Server database using PHP 5.3+ and SQLSRV.

“The length of the URL for this request exceeds the configured maxUrlLength value”

[HttpException (0x80004005): The length of the URL for this request exceeds the configured maxUrlLength value.]

The length of the URL for this request exceeds the configured maxUrlLength value is an IIS error telling you the length of the given URL exceeds a limit. The Windows Server IIS maximum URL length is defined by the HttpRuntimeSection.MaxUrlLength property. Its value is 260 characters. This may cause problems with longer URLs, and here is how to resolve this maxUrlLength issue.

PHP on IIS: “No input file specified”

Microsoft Internet Information Services (IIS) logo

When you host your PHP website on Windows Server IIS, you may receive an "No input file specified" error message, when a HTTP request is made to non-existing .php files. When this happens you probably have no Request Restrictions configured in IIS PHP handler settings. Here is how to fix the "no input file specified error" with PHP and IIS.