Dec 03

If you're a PHP developer who use Windows for development platform, you might want to try htscanner. It's a PHP extension that parses configuration files (for example .htaccess) and changes the PHP settings according to it. You can find its windows binaries here.

It's a very useful extension especially when you need to simulate PHP configuration setting using .htaccess in Windows, which you can't do this if you're using PHP in CGI/FastCGI that usually comes in Apache+PHP installation for Windows.

Just download php_htscanner.dll from PECL4Win, save it to your extension directory (for ex: c:\php\ext) and add these lines in your php.ini :

extension=php_htscanner.dll

[htscanner]
htscanner.config_file=".htaccess"
htscanner.default_docroot = c:\apache\htdocs

c:\apache\htdocs is your docroot, change it to your own docroot directory. Then create .htaccess file in your docroot with these lines:

<IfModule mod_php.c>
php_value register_globals off
</IfModule>

You need <IfModule mod_php.c> to make sure you won't get 500 error if you're using mod_access in your Apache installation, also it's compatible with Apache+mod_php configuration that usually comes with Apache in Linux. In this example i make register_globals off for all PHP files in c:\apache\htdocs.

Thanks to Pierre for maintaining this extension.

Dec 02

With the release of IE7 many web developers (like me) were faced with a need to test their applications on different versions of IE, but it was impossible for them since there is only one version of IE can be installed on Windows.

But today, as announced by IE Blog, Microsoft has made Virtual PC (VPC) 2004 available for download which contains a pre-activated Windows XP SP2, IE6 and the IE7 Readiness Toolkit to help facilitate developer to test their application on different version of IE (6 and 7).

Now you can install IE7 on your main machine for development, and get all the advantages of IE7, like the RSS platform, native XMLHTTP stack, and improved security, while still running IE6 simultaneously in the VPC on the same computer. Most importantly, you don’t even have to buy an additional Windows license. The VPC image runs in a virtual machine that offers all of the functionality of a full IE6 installation without giving it any access to its host machine’s hard drive, registry, etc. You can make as many modifications as you want to the virtual machine without affecting your host installation at all.

Get more information on Virtual PC 2004 here.