Posting this so that others may learn from my experience...
Recently I:
1. Downloaded my db.cgi in ASCII mode to make a minor change.
2. On the web server I renamed my current db.cgi to "db.cgi.09-01-03"
3. The only change I made was to add a <P> tag in some existing HTML within the script.
4. I uploaded the new script and got an internal server error.
5. I panicked
6. Undid change and re-uploaded script
7. Still got internal server error
8. Really panicking I deleted db.cgi and renamed "db.cgi.09-01-03" back to "db.cgi"
9. Script worked!
10. Concluded that I must have had a corrupted download and repeated steps 1-9 with exact same results.
11. Set up script on test server and began to troubleshoot and discovered the following: If you re-name your db.cgi to something else and then upload another copy YOU MUST RE-CHMOD THE NEW FILE TO 755 (rwx, rx, rx)
Note: I've never encounted this problem with html.pl, so I wasn't expecting it to happen with db.cgi. I was also working on a "live" server and couldn't afford to experiment.
So the moral to this story is always rename your script on the server to a backup copy before uploading any changes, but be prepared to re-do the permissions if you're sure your changes to the script is not the problem. It also doesn't hurt to have a "mirror" site db2 or something to play with before hacking the real one.
Recently I:
1. Downloaded my db.cgi in ASCII mode to make a minor change.
2. On the web server I renamed my current db.cgi to "db.cgi.09-01-03"
3. The only change I made was to add a <P> tag in some existing HTML within the script.
4. I uploaded the new script and got an internal server error.
5. I panicked
6. Undid change and re-uploaded script
7. Still got internal server error
8. Really panicking I deleted db.cgi and renamed "db.cgi.09-01-03" back to "db.cgi"
9. Script worked!
10. Concluded that I must have had a corrupted download and repeated steps 1-9 with exact same results.
11. Set up script on test server and began to troubleshoot and discovered the following: If you re-name your db.cgi to something else and then upload another copy YOU MUST RE-CHMOD THE NEW FILE TO 755 (rwx, rx, rx)
Note: I've never encounted this problem with html.pl, so I wasn't expecting it to happen with db.cgi. I was also working on a "live" server and couldn't afford to experiment.
So the moral to this story is always rename your script on the server to a backup copy before uploading any changes, but be prepared to re-do the permissions if you're sure your changes to the script is not the problem. It also doesn't hurt to have a "mirror" site db2 or something to play with before hacking the real one.