Can't find text in source files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rabatt
Forum Newbie
Posts: 3
Joined: Wed Dec 29, 2010 1:08 am

Can't find text in source files

Post by Rabatt »

WARNING: Newbie ahead!

Hi folks.

I have some programming experience in ASP, but my introduction to PHP is going to be via trying to make some elementary modifications to an existing website. Well, At least I think they're elementary.

The first thing I want to do is fix several mistakes such as spelling and syntax errors, stuff like that. Basically, the results of carelessness by the original programmers. I figured that shouldn't be too hard to do even for me -- just search and replace.

There's a MySQL database involved and I can handle that OK (I just love HeidiSQL). And I'm using an old version of Dreamweaver as my editor, just because that's what I've got and I'm familiar with it.

So my initial problem is this...

I use Dreamweaver to search through all the site files for the text that I want to fix. For example, on the webpages viewed in a browser there are several instances of "Thankyou" instead of "Thank you". But I search the entire site for "Thankyou" and no results are returned. I also searched the entire SQL database with the same result.

The compiled pages that these errors reside on don't actually exist, they only show up as something like:
http://domainname.com/foldername/?id=150

Can anyone give me a shove in the right direction?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Can't find text in source files

Post by Celauran »

Check your page controller to see what's being done with the ?id=150. Work backwards from there.
Rabatt
Forum Newbie
Posts: 3
Joined: Wed Dec 29, 2010 1:08 am

Re: Can't find text in source files

Post by Rabatt »

Thanks Celauran.

I didn't know what a "page controller" was so I had to look that up and I've learned something new already! However that was a bit advanced for me at the moment but I'll be spending more time on it.

Anyway, with a bit of outside help, I have figured out what the problem was.

Apparently this old version of Dreamweaver, when it's told to search in HTML, only searches files where it recognizes the filename extension. And apparently it doesn't know anything about .module and .inc files, which is where the text I was searching for is located.

Obviously I need a more PHP-aware editor. Any recommendations -- free or very cheap. I don't mind investing in the proper tools when the time comes, but as you've no doubt guessed I'm very much a PHP beginner at the moment.

All suggestions much appreciated and most welcome.
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Can't find text in source files

Post by McInfo »

Rabatt wrote:Obviously I need a more PHP-aware editor. Any recommendations -- free or very cheap.
Wikipedia: I like NetBeans. Eclipse is good too.
Rabatt
Forum Newbie
Posts: 3
Joined: Wed Dec 29, 2010 1:08 am

Re: Can't find text in source files

Post by Rabatt »

Thanks for the tip.

I have installed NetBeans and will try to come to grips with it over the next few days.
Post Reply