[FX.php List] Suggestions on finding parse errors in long PHP pages

Jonathan Schwartz jschwartz at exit445.com
Wed Nov 28 12:10:02 MST 2007


Oh my god, yes!

There's always a one-to-one match between php errors and BBEDIT line numbers.

As I mentioned before...it's only when the PHP interpreter (or 
fx.php?) doesn't find a closing "if" bracket does the search begin.

Also....and I'm not real clear on this....I also use "echo markers" 
in the code to narrow down where the script is going awry...but the 
script will not run at all if the interpreter chokes based on 
cerrtain conditions...mismatched brackets is one of them.

HTH,

Jonathan



At 12:40 PM -0600 11/28/07, Bob Patin wrote:
>Jonathan,
>
>I found it on line 383 (the parse error said line 294): instead of 
>"echo" I'd typed "cho".
>
>So would BBEdit show things on their correct lines?
>
>BP
>
>
>On Nov 28, 2007, at 12:32 PM, Jonathan Schwartz wrote:
>
>>Bob,
>>
>>This is always a lot of fun.
>>
>>If the error isn't on the line number offered, then we are talking 
>>missing "}" in a if statement, no?
>>
>>If so, I use the latest version of BBEDIT that offers the ability 
>>to visually see in the Margin, the symbols indicating opening and 
>>closing if statements.  Although it doesn't wave at you, it is just 
>>a matter to narrow down the location of the mssing closing bracket.
>>
>>Not sure if that is the issue for you.  HTH.
>>
>>If you find a more intelligent method, I'd love to hear.
>>
>>Jonathan
>>
>>
>>At 12:21 PM -0600 11/28/07, Bob Patin wrote:
>>>I have a form that has embedded PHP all the way down, on approx. 
>>>40 survey questions; now that I managed to get to the bottom of 
>>>the form and test it, I'm getting a parse error.
>>>
>>>The problem is that the error msg. lists a line that isn't 
>>>relevant to the actual lines of the code; do you guys have a way 
>>>to take the parse error line # and interpolate it so that it shows 
>>>the actual error line?
>>>
>>>Thanks,
>>>
>>>Bob Patin
>>
>>--
>>Jonathan Schwartz
>>Exit 445 Group
>>jonathan at exit445.com
>>http://www.exit445.com
>>415-381-1852
>>_______________________________________________
>>FX.php_List mailing list
>>FX.php_List at mail.iviking.org
>>http://www.iviking.org/mailman/listinfo/fx.php_list
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list


-- 
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-381-1852


More information about the FX.php_List mailing list