[FX.php List] [OFF] Anyone fluent with setting up Wordpress?

Leo R. Lundgren leo at finalresort.org
Mon Jan 19 10:58:06 MST 2009


When PHP says "parse error, expecting `T_STRING' or `T_VARIABLE' or  
`T_NUM_STRING'", it means that it was /expecting/ one of the  
mentioned types of literals.

So to answer your question, T_STRING "errors" (they're not the actual  
errors) can depend on pretty much anything, they don't tell you what  
the problem is, as I see it :) The error above could for example  
happen if you were to do "print(;", I suppose.

I never used Dreamweaver; In what way/how do you run it with PHP? If  
you run something PHP, shouldn't the errors go to the server log?  
Does it parse PHP itself? :-o

-|

19 jan 2009 kl. 18.36 skrev Bob Patin:

> Leo,
>
> Thanks for the reply; yes, this is an original file, unedited, from  
> Wordpress. It's their latest release, so it seems odd that it would  
> produce an error.
>
> Am I right in recalling that T_STRING errors are usually caused  
> when you forget to put a $ before a variable name?
>
> Dreamweaver's always been terrible about showing the same line  
> number that PHP reports as containing the error; I've gotten used  
> to assuming that the reported error line isn't going to help much,  
> but I've done as you do and put in a known error so I could narrow  
> down the problematic line...
>
> I'll give that a try. Meanwhile, I'll email you the page... I don't  
> think I can attach it here.
>
> thanks,
>
> 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:56 AM, Leo R. Lundgren wrote:
>
>> 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.
>>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list


-|



More information about the FX.php_List mailing list