RE: [PHP] Client side fatal PHP error

2001-12-25 Thread James Cox
Well, what you have said here isn't that clear, however consider the following revised code: $teststr = strtoupper(substr($xmbrcode,11,1)); if(($teststr != B) ($teststr != P) ($teststr != H) ($teststr != O)){ do.. } What you are doing is executing the substr and strtoupper many

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread jjt
Thanks for your help. I do not have any more info on the error; that is all the visitor to my site provided. But I am not sure what more useful detail there could be; it was a fatal error as I described; the script aborted on line 82, the IF statement. However, it might be useful to know that my

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread Philip Olson
Call to unsupported or undefined function srtoupper() in on line 82. srt != str (typo). if (strtoupper(substr($xmbrcode,11,1)) != B strtoupper(substr($xmbrcode,11,1)) != P srtoupper(substr($xmbrcode,11,1)) != H srtoupper(substr($xmbrcode,11,1)) != O) { See above.

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread LaserJetter
Is there a utility out there that checks for typos, like a spell check but for code? They are the most annoying things ever and probably the hardest of errors to find in scrips. Something simple, even command line would be handy. Also, its interesting that only one user of the script got the

RE: [PHP] Client side fatal PHP error

2001-12-25 Thread James Cox
Yeah, I know it's executed client side, but if the buffer fills up because you have a lot to send to the client (and the network connection is saturated), then it might fail, since it cannot do the test. it is unlikely, but possible. Also, that code you quoted is (out of context) inefficient, so

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread jjt
Ah yes... that would do it. How embarrassing! But another respondent brought up an interesting question. Why does this error not show up every time? As written, it is a basic syntactical error. I tested this thing up and down; I test it in production every day. Ah it's always something

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread Philip Olson
Is there a utility out there that checks for typos, like a spell check but for code? They are the most annoying things ever and probably the hardest of errors to find in scrips. Something simple, even command line would be handy. It's good to program with error_reporting turned all the way

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread Philip Olson
Ah yes... that would do it. How embarrassing! But another respondent brought up an interesting question. Why does this error not show up every time? As written, it is a basic syntactical error. I tested this thing up and down; I test it in production every day. This error will happen every

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread Ken
At 08:53 PM 12/25/01 -0500, jjt wrote: Why does this error not show up every time? It will show up every time PHP attempts to call the (incorrect) function. But the functions won't be called every time. For example, due to short-circuit evaluation, if the string is B or P, the error will

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread Andrew Brampton
- From: jjt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 26, 2001 1:53 AM Subject: Re: [PHP] Client side fatal PHP error Ah yes... that would do it. How embarrassing! But another respondent brought up an interesting question. Why does this error not show up every time