Errors - PHP
This is a discussion on Errors - PHP ; I am very new to PHP been working on a script to access MySql have got it
down pretty good, but, being lazy I like to copy code to not have to
re-write it, I am now getting a constant ...
-
Errors
I am very new to PHP been working on a script to access MySql have got it
down pretty good, but, being lazy I like to copy code to not have to
re-write it, I am now getting a constant flood of errors. I have looked in
my book I have searched on the php site and have had no luck.
WHAT IN THE HECK IS A "T_" error. I get "T_Else", T_Variable, T_what ever.
What does it mean????
Very frustrated old man.
-
Re: [PHP] Errors
On Wed, 1 Dec 2004 10:44:00 -0700, olsofty <olsofty@olsofty.com> wrote:
> I am very new to PHP been working on a script to access MySql have got it
> down pretty good, but, being lazy I like to copy code to not have to
> re-write it, I am now getting a constant flood of errors. I have looked in
> my book I have searched on the php site and have had no luck.
> WHAT IN THE HECK IS A "T_" error. I get "T_Else", T_Variable, T_what ever.
> What does it mean????
> Very frustrated old man.
Where's the code?
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/
-
Re: [PHP] Errors
Greg Donald wrote:
> On Wed, 1 Dec 2004 10:44:00 -0700, olsofty <olsofty@olsofty.com> wrote:
>
>>I am very new to PHP been working on a script to access MySql have got it
>>down pretty good, but, being lazy I like to copy code to not have to
>>re-write it, I am now getting a constant flood of errors. I have looked in
>>my book I have searched on the php site and have had no luck.
>>WHAT IN THE HECK IS A "T_" error. I get "T_Else", T_Variable, T_what ever.
>>What does it mean????
>>Very frustrated old man.
>
>
> Where's the code?
>
>
T_* errors are parse-errors. Basically, the parser checks (parses) the
syntax before "running" the script, during this parsing, the parser
might find a syntax error. All those T_* parts stand for specific
keywords/parts of the PHP syntax. When the parser tells you it found an
unexpected T_STRING, it means that the parser found a string where it
doesn't expect one. Same thing for eg T_ELSE (an else statement where
one shouldn't be).
-
RE: [PHP] Errors
Incorrect syntax.
You likely have a set a variable and not ended it with ';'
For example,
$some_variable = "some_value";
is the proper syntax. Or, post the code as recommended.
Best,
Thomas S. Crum
-----Original Message-----
From: Greg Donald [mailto:destiney@gmail.com]
Sent: Wednesday, December 01, 2004 1:25 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Errors
On Wed, 1 Dec 2004 10:44:00 -0700, olsofty <olsofty@olsofty.com> wrote:
> I am very new to PHP been working on a script to access MySql have got it
> down pretty good, but, being lazy I like to copy code to not have to
> re-write it, I am now getting a constant flood of errors. I have looked in
> my book I have searched on the php site and have had no luck.
> WHAT IN THE HECK IS A "T_" error. I get "T_Else", T_Variable, T_what ever.
> What does it mean????
> Very frustrated old man.
Where's the code?
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-
Re: [PHP] Errors
On Thursday 02 December 2004 01:44, olsofty wrote:
> I am very new to PHP been working on a script to access MySql have got it
> down pretty good, but, being lazy I like to copy code to not have to
> re-write it, I am now getting a constant flood of errors. I have looked in
> my book I have searched on the php site and have had no luck.
> WHAT IN THE HECK IS A "T_" error. I get "T_Else", T_Variable, T_what ever.
> What does it mean????
> Very frustrated old man.
manual > Appendix P. List of Parser Tokens
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
love, n.:
Love ties in a knot in the end of the rope.
*/
-
ScreenHeight?
Hi
Is there any way of getting the clients screenheight in PHP? (or do I have
to do it in Javascript)
/Gustav Wiberg
@varupiraten.se
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.802 / Virus Database: 545 - Release Date: 2004-11-26
-
Re: [PHP] ScreenHeight?
> Is there any way of getting the clients screenheight in PHP? (or do I
> have
> to do it in Javascript)
You have to do it with JavaScript.
-
Re: [PHP] Errors
olsofty wrote:
> I am very new to PHP been working on a script to access MySql have got it
> down pretty good, but, being lazy I like to copy code to not have to
> re-write it, I am now getting a constant flood of errors. I have looked in
> my book I have searched on the php site and have had no luck.
> WHAT IN THE HECK IS A "T_" error. I get "T_Else", T_Variable, T_what ever.
> What does it mean????
> Very frustrated old man.
That's Geek for "you typed something so wrong, I don't even know what
you're trying to do"
Generally the line number is helpful.
You know it is usually on that line, or the line before.
But sometimes it's before that, maybe *WAY* before that, if the real
problem is you are missing a quote mark somewhere.
For sure, the problem CANNOT be *after* the line number PHP is complaining
about. It reads the file line by line, and works out what you mean as it
goes.
You should probably invest time/money in finding a color-coded PHP syntax
editor. There are sooooo many of them, I won't even try to recommend one.
Odds are good the editor you use right now has a PHP syntax color-coding
plugin or feature, and you just haven't turned it "on" yet.
--
Like Music?
http://l-i-e.com/artists.htm
-
Re: [PHP] Errors
On Wed, 1 Dec 2004 11:51:33 -0800 (PST), Richard Lynch <ceo@l-i-e.com> wrote:
> That's Geek for "you typed something so wrong, I don't even know what
> you're trying to do"
Man.. they let just about anyone post to php-general lately. 
How you doing Richard?
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/
-
Re: [PHP] ScreenHeight?
Wiberg wrote:
> Hi
>
> Is there any way of getting the clients screenheight in PHP? (or do I have
> to do it in Javascript)
PHP is serverside. JavaScript is your answer.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@kegworks.com