Category Archives: Microsoft Windows

Another IIS Blog – IIS7: Moving the INETPUB directory to a different drive

Having your content on a different partition than your Operating System is a good security practice. In previous IIS versions is was possible to do this during setup time in an unattend file. Due to changes in Vista and Windows Server 2008 setup it became impossible to do that however.

Source: Another IIS Blog – IIS7: Moving the INETPUB directory to a different drive

PHP connection to Microsoft SQL server from LAMP server

We have recently been working on a project for a client that involves dynamically creating web pages from data stored in a Microsoft SQL database. The solution is based on a LAMP (Linux, Apache, MySQL and PHP) server running Ubuntu.

Why not use IIS I hear you ask? Mainly because of costs and licensing and the Ubuntu server will be running several Web sites.

Here is a very basic example of the PHP code using PDO and DBLIB:

$user="username";
$password="password";
$dbh= new PDO('dblib:host=SERVERNAME\SQLSERVERINSTANCE;dbname=DBNAME',$user,$password);

$query = “SELECT * FROM SOME_TABLE”;
$statement = $dbh->prepare($query);
$statement->execute();
$result = $statement->fetchAll(PDO::FETCH_ASSOC);

var_dump($result);

You need to install the DBLIB PDO driver:

sudo apt-get install php7.0-sybase

Installing and searching for updates is slow and high CPU usage occurs in Windows 7 and Windows Server 2008 R2

We reinstalled a clean installation of Windows 7 Professional onto a clients laptop and when trying to apply updates the Windows update process just kept displaying searching for updates. After a reboot and then installing this Windows fix and another reboot Windows 7 now downloads and installs updates as it should do.

Source: Installing and searching for updates is slow and high CPU usage occurs in Windows 7 and Windows Server 2008 R2