[FX.php List] [OFF] Anyone fluent with setting up Wordpress?
Leo R. Lundgren
leo at finalresort.org
Mon Jan 19 09:56:54 MST 2009
Indeed, sounds weird if it's Wordpress' own code. Is it not modified
in any way?
Regarding line numbers in errors, I cannot say for sure, but my gut
feeling lately has been that the reporting have gotten better. I just
think that it usually matches the line where my errors are.
However this is when the file is well formatted; for example I had a
file yesterday that the author had saved with only CR's as line
endings, and the errors from this file never showed the right line.
And for a change it was usually a number AFTER the line where the
error was; previously I've mainly experienced the lines being
mentioned "prematurely".
The inconsistency in this specific file's errors may have been a
combination of other files included as well; Maybe PHP gets confused
and reports the incorrect line numbers when the are multiple files
included and they don't have the same line endings (and/or encodings,
I guess that could affect it as well)? I wouldn't be surprised if PHP
doesn't handle such cases.
Assuming your file is well saved then yeah, I wouldn't look much
further than that. Usually if I don't find an error i simply insert a
statement I /know/ will cause an error, and relocate it until I find
the line where my error starts being the first (and usually fatal)
one reported. That way I know that the real error should be right
after my intentional one. The same thing can be accomplished by using
die('GAAAH!'); and relocate that until your script dies with "GAAAH!"
instead of a blank page or whatever the real error causes.
So in short; Make sure files are well formatted, look a bit around
the mentioned line unless you find the error right away, and never be
afraid to use the good old ways to find errors :-)
If you send me the file I can have a look.
19 jan 2009 kl. 17.40 skrev Bob Patin:
> Leo,
>
> Thanks for your reply; I hadn't thought about the fact that the
> error points to a non-PHP part of the code... but then again, in
> Dreamweaver, line 310 isn't usually the line where the error
> exists. When I write FX code and there's a parse error, the
> reported line is almost NEVER the same line number as displayed in
> Dreamweaver. I think this is because the reported error line is
> ignoring blank lines...
>
> I went thru the page looking for short open tags, which my PHP
> install would refuse to allow, but didn't find any.
>
> From what I could tell, the PHP close tags are in place, but I
> think I'll go thru it all again. Would your guess be that I can
> stop looking after line 320 or so (assuming some line misnumbering
> in Dreamweaver)?
>
> Good tip about looking before the line number... I'll go back and
> look. It just seems odd that Wordpress would release a new version
> as their stable version, and have a parse error in it...
>
> Bob Patin
> Longterm Solutions LLC
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> Twitter: bobpatin
> iChat/AIM: bobpatin
> FileMaker 9 Certified Developer
> Member of FileMaker Business Alliance & TechNet
> --------------------------
> FileMaker hosting and consulting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>
> On Jan 19, 2009, at 10:26 AM, Leo R. Lundgren wrote:
>
>> Apparently PHP is trying to interpret that part of the file, and
>> as you say it's JavaScript, I guess it shouldn't?
>>
>> Do you have the appropriate ?> non-php-code <?php markup in
>> place? Or, if the code you pasted should be inside a string in the
>> PHP code, make sure that it's "stringed out" appropriately.
>>
>> Another note, not necessarily related, is that when you have a
>> syntax error, always look at the line immediately before the line
>> mentioned, as well. Depending on the type of code on the mentioned
>> line, it may be a continuation form the previous one and one will
>> get a clearer picture not just staring at the mentioned line :)
>>
>> -|
>>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
-|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20090119/23553cd4/attachment.html
More information about the FX.php_List
mailing list