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 host computer is running version
3.0.12 of PHP3 on a Unix server.

As for the code, I am not sure what more context would be helpful; the error
message indicated a failure on the function strtoupper() in that statement.
The statement is within a validation routine. I am running a series of tests
on $xmbrcode, a cookie variable; each test is independent.

You are correct in that creating a new variable instead of substringing it 3
times would be more efficient. However I cannot see how this would make a
significant difference.

I am baffled as to why PHP would fail on a valid statement, and fail only
for that user. Since the code is executed on the host computer, I do not see
how a slow connection would have any effect on it. I can see why extremely
heavy traffic on my host computer might cause a timeout, but not for one
user only, and not always on the same statement. By the time the HTML code
is sent to the user, I thought that the execution of PHP was done. In any
event, today, when this error was reported to me, has been one of the
slowest days of the year at my site.

Maybe I just baffle easily

Thanks for your help.

- hmc


James Cox wrote in message ...
>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 times,
which,
>on a slow connection which may have backlog (thus slower time for the html
>stream buffer to be delivered), it could timeout.
>
>More detail on a: the error, and b: the code *in context* would help.
>
>Regards,
>
>James Cox
>
>> -----Original Message-----
>> From: jjt [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, December 25, 2001 6:36 PM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] Client side fatal PHP error
>>
>>
>> A visitor to my site repeatedly receives a fatal error in one of
>> my scripts.
>>
>> He is using a Compaq PC with IE 6; Windows 98. He gets this error
message:
>> "Call to unsupported or undefined function srtoupper() in.... on line
82."
>>
>> Line 82 is a compound IF statement which uses strtoupper(). As best I can
>> tell, the syntax of the statement is fine:
>>
>> 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").... {
>>
>> And more significantly, no one else is reporting this error; I cannot
>> reproduce it. The script is executed thousands of times each day. By the
>> time he gets to line 82, he has successfully passed another simple
>> strtoupper() statement. Every user running this script must get past line
>> 82.
>>
>> I am very confused here.  Why does this error occur only on his computer?
>> How could it be machine or browser dependent? Isn't all PHP processing
>> done on my host (server) computer? And if so, why does the error not
>> occur every time the script is executed?
>>
>> I am totally baffled by this. Can anyone help?
>>
>> Thanks,
>>
>> Hershel M. Chicowitz
>> [EMAIL PROTECTED]
>>
>>
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to