Connecting Tech Pros Worldwide Help | Site Map

obscure bug related to size of script file?

  #1  
Old July 17th, 2005, 02:09 AM
Ryan
Guest
 
Posts: n/a
hi

i am having a problem with a php script i am trying to write.
the problem is that the ouput from the script (the html) was
sometimes being truncated, but sometimes it would work
as expected.

i managed to narrow the problem down (believe it or not) to
the difference between a sinle character anywhere in the script.

by this i mean, for example, when the php script was at 10,589 bytes
it worked perfectly. if i took one character out from anywhere in
the in the script (and i mean anywhere, changed a printf to a print,
or took a character from a php comment, or took a char from some
html outside the php scriplets, or changed a number from say 100 to 99)
it would fail!!!! and by fail i mean the result that was being received
by my browser was truncated about half way down the page (in the
middle of some html from the script!).

i am totally totally blown away by this obscure bug. has anyone
seen anything like it? maybe it is fixed in later versions of php?

the stuff i am running is:

PHP 4.3.3 (cgi) (built: Sep 1 2003 04:45:21)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

RedHat Linux 7.x OS

Apache/1.3.27 Server


thanks

Ryan


  #2  
Old July 17th, 2005, 02:09 AM
Ryan
Guest
 
Posts: n/a

re: obscure bug related to size of script file?


Ok, so i finally figured it out...

turns out it was a bug in the ftp client i was using to upload
that was truncating the script!!! must have been the sequence
of chars in the script not being escaped properly or something..

lol, what a pain!

Ryan

"Ryan" <ryan@someplace.com> wrote in message
news:3fb6faeb@news.comindico.com.au...[color=blue]
> hi
>
> i am having a problem with a php script i am trying to write.
> the problem is that the ouput from the script (the html) was
> sometimes being truncated, but sometimes it would work
> as expected.
>
> i managed to narrow the problem down (believe it or not) to
> the difference between a sinle character anywhere in the script.
>
> by this i mean, for example, when the php script was at 10,589 bytes
> it worked perfectly. if i took one character out from anywhere in
> the in the script (and i mean anywhere, changed a printf to a print,
> or took a character from a php comment, or took a char from some
> html outside the php scriplets, or changed a number from say 100 to 99)
> it would fail!!!! and by fail i mean the result that was being received
> by my browser was truncated about half way down the page (in the
> middle of some html from the script!).
>
> i am totally totally blown away by this obscure bug. has anyone
> seen anything like it? maybe it is fixed in later versions of php?
>
> the stuff i am running is:
>
> PHP 4.3.3 (cgi) (built: Sep 1 2003 04:45:21)
> Copyright (c) 1997-2003 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
>
> RedHat Linux 7.x OS
>
> Apache/1.3.27 Server
>
>
> thanks
>
> Ryan
>
>[/color]


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 04:15 AM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 11:37 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 09:56 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 13th, 2005 03:15 AM