Preserved Topic: Debugging PHP |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 04-10-2001 21:17
Every time I have an error in a PHP script, the page returns a parsing error at line 1 regardless of where the error actually is? Is there some way to configure PHP to return the actual line #? |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 04-10-2001 21:22
Must say it's always given me the right number I don't think there's any config issue there. |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 04-10-2001 21:38
Well should it say that if you have a semi-colon missing on say the 20th line? I've managed to debug the script, and the problem was a missing semi-colon, and I can't remember if I had any other errors. I didn't see any reason that it wouldn't be able to tell which line was missing a semi-colon. |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 04-10-2001 21:41
Any time I get an error (Lord knows that's often), it returns the right line number. It's probably like Bitdamaged said, maybe you didn't close a statement properly. If that's the case, the line number returned with the error, will be the line where PHP thinks the statement starts. |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 04-22-2001 07:45
Well after weeks of debugging my scripts by commenting out new sections then adding them one line at a time, I finally figured out what is wrong. Thought it might help someone else some day. |