戰地連結︰ Home My Flickr NBA.com About

2009年10月9日星期五

PHP crash with some MySql functions

Overview

I has been playing with a WAMP web site using Joomla 1.5 as the CMS. Actually I am just doing the setup when I encounter this issue. When I reached the “Database Configuration” step in Joomla installation, Apache keeps crashing when I proceeded, and the Event Log said that:

Faulting application httpd.exe, version 2.2.11.0, faulting module > php5ts.dll, version 5.2.10.10, fault address 0x0000ac6a.

Again, with some Googling I found that I am not alone and there are several solutions for this issue, which is caused by wrong "libMySql.dll" module used.

Both MySQL and PHP provides the "libMySql.dll" module. When using PHP, we should use the "libMySql.dll" module provided by PHP, but not MySQL.

Reference

PHP Installation, MySQL

php使用MySql函数导致Apache(iis)崩溃的问题

PHP Crash when use some mysql function

Steps

There are several ways to solve this problem, I use the first method:

  • Rename the "libMySql.dll" file located at your MySQL “<InstallDir>/bin” folder
  • Remove your MySQL “<InstallDir>/bin” folder path from the system’s path environment variable
  • Copy the "libMySql.dll" file from your PHP install folder to “%SystemRoot%/system32” folder

2009年10月7日星期三

Unlock files used by processes

Overview

I think most of the Windows users have seen the screen saying that “Cannot delete XXX: It is being used by another person or program”. This is quite annoying as you don’t have a clue what is actually locking the file. Now I would like to share some of the programs I used (or heard) to solve this problem.

Reference

Unlocker - http://ccollomb.free.fr/unlocker/

It is a very nice program which add a extensions to your Windows Explorer, so that you can right-click on any file/folder and select the “unlocker” option. It will shows all processes locking the file for your to decide what to do next. However the latest version (1.8.7) does not supports 64-bit OS.

LockHunter - http://lockhunter.com/

LockHunter is a similar tool to Unlocker, Windows Explorer extensions. However it works for both 32-bit and 64-bit OS, and it delete files to recycle bin.

Process Explorer - http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

Finding what files (handles) is used by a process is just one of the features of Process Explorer. As it actually shows much more information than the list of handles used. Because it is more powerful, it is also more complicated to use.

To use Process Explorer for unlocking files from processes, following the steps below:

  1. Select "Find" –> "Find Handle or DLL"
  2. Enter the full path of the file as the Handle substring, click "Search"
  3. For each of the search results that match the file you want to delete, right-click on the handle and choose "Close Handle"
  4. Done! However I recommend using “LockHunter” if you ONLY want to unlock files. ;-)