PDA

View Full Version : Defensive programming


renehaentjens
05-25-2004, 03:39 AM
I just spent a couple of hours trying to find out why a newly installed PhpDig 180 was finding all the website pages, but never found any single keyword in them. In other words, the keywords table remained empty.

It was my own stupid mistake. I had altered the config file, changing MAX_WORDS_SIZE to 50, so I thought, but it turned out that due to my thick fingers, it had been set to 0. So PhpDig did exactly what I asked it to do: ignore all keywords with more than 0 characters.

For the likes of me, who sometimes do silly mistakes, it would be a giant enhancement if PhpDig could do a couple of basic checks before starting and even while it is doing its gigantic task of finding pages, parsing them for keywords etc.

Not so long ago, I had another problem that took me hours before I knew what I had done wrong and where again a simple check would have been a great help:
http://www.phpdig.net/showthread.php?s=&postid=3299#post3299

Or is PhpDig only meant for the smart admins who never run into these kinds of problems?

vinyl-junkie
05-25-2004, 04:30 AM
Originally posted by renehaentjens
Or is PhpDig only meant for the smart admins who never run into these kinds of problems? If there is such a person, I'd like to meet him or her. ;) I think anyone who has tried to customize phpdig in some way or another has run into problems with it, usually of their own making (note that I'm pointing a finger at myself as I say this, because I too am guilty).