PDA

View Full Version : Problem searching contents of .PHP files on WinXP?


jAZ
06-29-2006, 02:47 PM
I've been trying to search for a keyword in a directory of PHP files. I'm using the basic WinXP search function. I keep coming up with no hits.

I've tested the search by finding a file looking for a keyword and then searching for that word, and even then it comes up empty.

Anyone else run into this before? It's like the search function is ignoring the .php files entirely.

bgguitarman
06-29-2006, 02:52 PM
I've been trying to search for a keyword in a directory of PHP files. I'm using the basic WinXP search function. I keep coming up with no hits.

I've tested the search by finding a file looking for a keyword and then searching for that word, and even then it comes up empty.

Anyone else run into this before? It's like the search function is ignoring the .php files entirely.

Works for me!

jAZ
06-29-2006, 02:59 PM
Works for me!
Ugh... this is stupid...

I found a keyword that is in lots of the files. Searched for it. The only files that it retuns are .html files that include the keyword. None of the references from the code files itself are returned.

jAZ
06-29-2006, 03:04 PM
http://www.intelliadmin.com/blog/2006/04/fix-broken-search-feature-in-windows.html

Fix the broken search feature in Windows XP & 2003

Quietly, Microsoft changed the way its search feature within windows works. In windows 95, 98, ME, NT and 2000 you could search for text within any file on the system. Without notice XP, and 2003 now only search 'registered' file types. There are only a handful of these types.

Microsoft does not make it clear they are only searching certain file extensions. It can really throw you off the track when you are looking for a certain string within a file.

For example. If I was looking for the string 'purchase' within all files that matched *.* windows would skip all file extensions that it does not recognize.

A simple registry change can be made to bring XP, and 2003 search back the way it was:

Under HKEY_LOCAL_MACHINE:

SYSTEM\CurrentControlSet\Control\ContentIndex\FilterFilesWithUnknownExtensions

Set the above value to 1

It will treat unknown extensions as text files. After a reboot the change will take effect.

Now when you search for a string within the files that match the wildcard of *.* it will actually search all files it finds - Imagine that!