Archive for April, 2010

Use Apache, PHP, and MSSQL on Windows

Wednesday, April 28th, 2010

This is how I made the php_mssql extension work on my Windows-Apache-PHP-MSSQL Server.

Download Apache. (I used the Win32 Binary including OpenSSL 0.9.8m (MSI Installer))

Download PHP. (I used the PHP 5.2.13 zip package)

Download ntwdblib.dll.


Run the apache installer, select custom install and change the install path the ‘C:\Apache2.2′

Extract the php zip file to ‘C:\PHP’

Open C:\PHP and copy php.ini-recomended to php.ini

Open php.ini and edit the following lines:
Set extension_dir = “C:\PHP\ext”
Uncomment php_mssql.dll
Set error_log = “C:/Apache2.2/logs/phperr.log”

Open C:\Apache2.2\conf\httpd.conf and edit the following lines:
Set DirectoryIndex index.php
LoadModule php5_module C:/PHP/php5apache2_2.dll
AddType application/x-httpd-php .php
PHPIniDir “C:/PHP”

Add “C:\PHP” to the PATH Environment variable

Replace the file C:\PHP\ntwdblib.dll with the copy you just downloaded (v2000.80.194.0)

Restart the Apache service


You can now use all the mssql functions in your php code without errors

Dell PowerConnect CLI – Change Management IP

Wednesday, April 21st, 2010

I locked myself out of the UI on one of my Dell switches today. I spent 20 minutes looking through Dell manuals until I found the answer.

To change the management IP of a Dell switch:

Console# configure

Console (config)# interface vlan 1

Console (config)# no ip address (Removes the existing IP)

Console (config)# ip address [IP] [subnet mask]

Console (config)# end

Console# copy run start

Userenv Events 1030 and 1058

Tuesday, April 13th, 2010

So, I keep getting Userenv errors 1030 and 1058 on one of my domain controllers.

The description of Event ID 1058 says “Windows cannot access the file gpt.ini for GPO CN={31B2F340-016D-11D2-945F-00C04FB984F9}, CN=Policies, CN=System, DC=MyDomain, DC=com. The file must be present at the location <\\MyDomain.com\ sysvol\ MyDomain.com\ Policies\ {31B2F340-016D-11D2-945F-00C04FB984F9}\ gpt.ini>. (Access is denied. ). Group Policy Processing aborted.”

This problem has plagued me for quite a while. I have checked permissions on the file, the folder and the root drive. Everything looked normal. I couldn’t figure out what to do. I decided to do nothing. Everything apeared to be working fine.

A couple months later I decided to cleanup active directory a little bit. I opened the Group Policy manager and deleted all of my unused GPOs. The next day, I noticed that the Userenv errors quit showing up. I was quite happy with myself. My patience paid off.

The next week however I noticed that I was getting the errors in a different environment. I was a little put out. I didn’t want to randomly delete GPOs until the problem went away, so I googled again. I came across a solution. It was so simple, I was angry that I lived with the error for so long. All I had to do was open the security page of all the GPOs and reset the ACL. After 5 minutes I fixed the error and have not seen it since.


To fix Userenv Events 1030 and 1058 that are caused by Access Restrictions:

  • Download and install the Group Policy Management Console.

  • Open the Group Policy Management MMC and browse to Forest: -> Domains -> MyDomain.com -> Group Policy Objects.
  • Click on the first object. Open the Delegation Tab.
  • Click on a user and then the Advanced… button in the bottom corner.
  • Uncheck and recheck any check box.
  • Click OK and repeat on every GPO. (This causes the ACL to be rewritten and permission granted the the broken GPO.)