Latest Posts

Most Popular Posts

The post below talks about processor affinity and setting IIS to use only one processor to increase stability of certain applications (PHP ISAPI anyone?).

You can set the affinity by opening Task Manager and selecting w3svc.exe or inetinfo.exe on the Processes tab. Right click and choose Set Affinity. Uncheck the processors which should not execute the application.

This is a temporary solution since it is reset once you restart Windows or IIS. Some people often disregard setting processor affinity as a fix since it never seems to work…but this is because they don’t set it permanently. Below is how to set the processor affinity permanently.

Grab the Imagecfg.exe tool from the \support\debug\i386 folder of a Windows NT 4.0, or the Imagecfg.exe tool from the Windows 2000/2003 Server Resource Kit.

Open a CMD prompt and type:

imagecfg -a 0xn drive:\Path\program.exe

where 0xn is the affinity mask and drive:\Path\program.exe is the program you wish to set. The mask indicates which processor is to run the desired application. On a dual-core system, you use CPUs 0 and 1 (not 1 and 2).

CPU MASK
0 0x1
1 0x2
2 0x4
3 0x8


(average: 5.00 out of 5)

While I was trying to find a content management system for a section of World’s Cutest Animals I decided to try WordPress 2 instead of programming my own (I’m lazy sometimes).

When I installed WordPress 2.1.x it was working fine until midday when requests for the page spiked as usual. It was the dreaded PHP Access Violation. Previous to this, there had never been a PHP related issue with the site in 11 months. I figured I’d try to get it to work instead of uninstalling it right away, so I tried the following:

1. Disabled XCompress HTTP compression, thinking it was an issue with ISAPI ordering like so many IIS related problems.

2. Disabled Isapi Rewrite (thinking it was a compatibility issue between the many rewrite systems and rules on my server in addition to ISAPI ordering)

3. Upgrading PHP to 4.4.7, then downgrading to 4.4.2 (hoping another build had a fix in there, seems every build of PHP breaks or fixes something)

4. Uninstalling WordPress (Tada! Worked! But this is not what I wanted. I’m lazy, I wanted wordpress working)

5. Installed WordPress 2.2 (Still didn’t work)

6. Played with WordPress Permalinks (Nothing)

7. Tried Fast-CGI wrapper from IIS.net for IIS 6.0/7.0 (Worked!)

The Fast-CGI from IIS.net is an effort between Zend and Microsoft to increase the stability of PHP on the upcoming Longhorn Server and IIS 7.0. It’s no secret that PHP is one of the worst offenders of IIS instability. They do have a technology preview out that works with IIS 5.0/6.0. I recommend this if you do have stability issues with PHP ISAPI. It is about 5 times faster than php.exe CGI that comes with PHP 4. The wrapper works for PHP 5 as well. It installs in about 2 minutes thanks to Microsoft’s script and instructions.

Turns out WordPress has some XML GetFeatureList that breaks PHP by forcing a multithreading situation in IIS (w3svc.exe). PHP ISAPI is terrible at any sort of attempt of multithreading as it is not supported.

On a related note, because of PHP ISAPI threading issues, if you have a dual-core server, best to set the processor affinity of w3svc.exe or inetinfo.exe (depending on whether or not you are in isolation mode) to one processor. If you have mulitple websites, assign them to two Application Pools and have each pool running on a different processor. This will assure a much more stable instance of PHP (4 and 5). In each Application Pool, be sure to keep Worker Processes set to 1 (in the properties box). Setting it to a higher number causes multiple threads to be started.

Click here for instructions on permanently setting Processor Affinity in Windows


(No Ratings Yet)

Looks like Spamhaus SBL+XBL has become Spamhaus Zen.

I have already switched my spam filter over to the new list and I must say, it is much more effective. Before I was averaging 19%-22% spam from Spamhaus SBL+XBL, and with Zen I am getting 29% spam rate, with only a few minor false positives. Spamhaus SBL+XBL will be discontinued soon, so I’d switch over immediately.


(No Ratings Yet)

In my relentless efforts to squash the ever increasing spam problem within our organization, I have added ORF Enterprise Anti-Spam by Vamsoft to our anti-spam arsenal.

ORF is not meant for Exchange Server only, it binds to any SMTP server and filters before/after arrival of messages. It seems any Exchange Server specific anti-spam product is much more expensive than it has to be. Perhaps it is because the cost of Exchange Server implies the owner has the money to buy an expensive anti-spam product? Maybe.

To the side are the stats from a typical day. 68% of all email received and tested is spam. By far the most effective feature is the DNS blacklist.

Name Spam %
SpamCop 18%
CBL Composite Blocking List 29%
Spamhaus SBL+XBL (Combined) 19%
Distributed Server Boycott List (Single) 4%
blackholes.us China and Korea combined networks 6%
Not Just Another Bogus List (NJABL) 18%
Open Relay Database < 1%
SORBS Combined List 25%
Abusive Host Blocking List (AHBL) 2%
Spamhaus SBL (Spam Block List) 1%
blackholes.us Korea network 5%
FiveTen Blackhole List 30%
blackholes.us China network 6%
Spamhaus XBL (Exploits Block List) 25%
Passive Spam Block List 21%
spambag.org 3%
No-more-funn 28%
Blitzed Open Proxy Monitor List Combined 1%

(No Ratings Yet)

To all those (3 people) who need to use file_get_contents in PHP on IIS 6, you may notice it doesn’t work by default. To see if it works, place the following code into a file called test.php.

<?php
$content=file_get_contents("http://www.google.com",FALSE,NULL,0,20);
echo $content;
?>

You should have the first 20 bytes of the google source code echoed back to you on the page when it is executed. If not, you may need to play with IIS 6.

Does fsockopen work?

IIS 6 by default does not allow sockets to be created on port 80 (file_get_contents works on this port, of course). This is a result of how IIS 6 accepts connections. To get file_get_contents to work, you need to enable IIS 5 Compatibility (Isolation Mode) on IIS 6. You then need to choose Low (IIS Process) under “Application Protection.” Isolation mode settings are found in the IIS Admin Interface –> Right-click on Web Sites folder and look under the Service Tab.


(No Ratings Yet)

Page 25 of 25« First...10...2122232425

What do you use Virtualization for?

View Results

Loading ... Loading ...