Connecting Tech Pros Worldwide Forums | Help | Site Map

Wierd character bug in PHP?

Michael J Martin
Guest
 
Posts: n/a
#1: Apr 8 '08
Found an interesting one today. I've been editing some code in the
office and one of my editors, either Coda, SubEthaEdit, Scite or Geany
added an interesting character into my PHP source file.

Initially I thought it was a bug somewhere in my code. But I didn't
know about this hidden character until I viewed it as a phps file.

http://projects.mike-martin.com/fecking_bug.phps
http://projects.mike-martin.com/fecking_bug.php.txt


http://projects.mike-martin.com/fecking_bug.php - error it returns
http://projects.mike-martin.com/fecking_bug.php.gz - in case the txt
file doesn't contain the character.

Can anyone else reproduce it with the links I have just given?

I'm hoping Apache doesn't cause it to go away. Now I've got to go back
into all my code to see if it's crept in. I tried converting /
reinterpreting Line Endings and Encoding types - even to ASCII in Coda
but it still appears!

I know it's probably an encoding issue but surely one like this
shouldn't bring PHP down?

Mike

Michael Fesser
Guest
 
Posts: n/a
#2: Apr 8 '08

re: Wierd character bug in PHP?


..oO(Michael J Martin)
Quote:
>Found an interesting one today. I've been editing some code in the
>office and one of my editors, either Coda, SubEthaEdit, Scite or Geany
>added an interesting character into my PHP source file.
>
>Initially I thought it was a bug somewhere in my code. But I didn't
>know about this hidden character until I viewed it as a phps file.
>
>http://projects.mike-martin.com/fecking_bug.phps
>http://projects.mike-martin.com/fecking_bug.php.txt
>
>
>http://projects.mike-martin.com/fecking_bug.php - error it returns
>http://projects.mike-martin.com/fecking_bug.php.gz - in case the txt
>file doesn't contain the character.
>
>Can anyone else reproduce it with the links I have just given?
Yes. Question is where does it come from?
Quote:
>I'm hoping Apache doesn't cause it to go away. Now I've got to go back
>into all my code to see if it's crept in. I tried converting /
>reinterpreting Line Endings and Encoding types - even to ASCII in Coda
>but it still appears!
>
>I know it's probably an encoding issue but surely one like this
>shouldn't bring PHP down?
The byte in question is 0x7F, which is the "DEL" control char:

http://www.fileformat.info/info/unic...007f/index.htm

Obviously it shouldn't be there at all.

Micha
Jerry Stuckle
Guest
 
Posts: n/a
#3: Apr 8 '08

re: Wierd character bug in PHP?


Michael J Martin wrote:
Quote:
Found an interesting one today. I've been editing some code in the
office and one of my editors, either Coda, SubEthaEdit, Scite or Geany
added an interesting character into my PHP source file.
>
Initially I thought it was a bug somewhere in my code. But I didn't
know about this hidden character until I viewed it as a phps file.
>
http://projects.mike-martin.com/fecking_bug.phps
http://projects.mike-martin.com/fecking_bug.php.txt
>
>
http://projects.mike-martin.com/fecking_bug.php - error it returns
http://projects.mike-martin.com/fecking_bug.php.gz - in case the txt
file doesn't contain the character.
>
Can anyone else reproduce it with the links I have just given?
>
I'm hoping Apache doesn't cause it to go away. Now I've got to go back
into all my code to see if it's crept in. I tried converting /
reinterpreting Line Endings and Encoding types - even to ASCII in Coda
but it still appears!
>
I know it's probably an encoding issue but surely one like this
shouldn't bring PHP down?
>
Mike
>
Mike,

It is in your .gz file - on a line by itself between the $qsql= and the
echo statements.

Maybe try a different editor. It showed up perfectly in TextPad.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Erwin Moller
Guest
 
Posts: n/a
#4: Apr 9 '08

re: Wierd character bug in PHP?


Jerry Stuckle schreef:
Quote:
Michael J Martin wrote:
Quote:
>Found an interesting one today. I've been editing some code in the
>office and one of my editors, either Coda, SubEthaEdit, Scite or Geany
>added an interesting character into my PHP source file.
>>
>Initially I thought it was a bug somewhere in my code. But I didn't
>know about this hidden character until I viewed it as a phps file.
>>
>http://projects.mike-martin.com/fecking_bug.phps
>http://projects.mike-martin.com/fecking_bug.php.txt
>>
>>
>http://projects.mike-martin.com/fecking_bug.php - error it returns
>http://projects.mike-martin.com/fecking_bug.php.gz - in case the txt
>file doesn't contain the character.
>>
>Can anyone else reproduce it with the links I have just given?
>>
>I'm hoping Apache doesn't cause it to go away. Now I've got to go back
>into all my code to see if it's crept in. I tried converting /
>reinterpreting Line Endings and Encoding types - even to ASCII in Coda
>but it still appears!
>>
>I know it's probably an encoding issue but surely one like this
>shouldn't bring PHP down?
>>
>Mike
>>
>
Mike,
>
It is in your .gz file - on a line by itself between the $qsql= and the
echo statements.
>
Maybe try a different editor. It showed up perfectly in TextPad.
>
TextPad Jerry?
Great! My old favorite editor. :-)
I thought I was the last man on Earth using it. ;-)

Regards,
Erwin Moller
Michael J Martin
Guest
 
Posts: n/a
#5: Apr 9 '08

re: Wierd character bug in PHP?


On Apr 8, 2:14 pm, Michael Fesser <neti...@gmx.dewrote:
Quote:
The byte in question is 0x7F, which is the "DEL" control char:
>
http://www.fileformat.info/info/unic...007f/index.htm
>
Obviously it shouldn't be there at all.
>
Micha
Interesting, I'll keep an eye on that. Maybe if I can reproduce it
again whilst editing I'll send it to the Coda dev team. - I think it
was Coda that was the culprit.

So the question becomes subjective:
FR: Shouldn't the PHP interpreter ignore 0x07F when interpreting?
Jerry Stuckle
Guest
 
Posts: n/a
#6: Apr 9 '08

re: Wierd character bug in PHP?


Erwin Moller wrote:
Quote:
Jerry Stuckle schreef:
Quote:
>Michael J Martin wrote:
Quote:
>>Found an interesting one today. I've been editing some code in the
>>office and one of my editors, either Coda, SubEthaEdit, Scite or Geany
>>added an interesting character into my PHP source file.
>>>
>>Initially I thought it was a bug somewhere in my code. But I didn't
>>know about this hidden character until I viewed it as a phps file.
>>>
>>http://projects.mike-martin.com/fecking_bug.phps
>>http://projects.mike-martin.com/fecking_bug.php.txt
>>>
>>>
>>http://projects.mike-martin.com/fecking_bug.php - error it returns
>>http://projects.mike-martin.com/fecking_bug.php.gz - in case the txt
>>file doesn't contain the character.
>>>
>>Can anyone else reproduce it with the links I have just given?
>>>
>>I'm hoping Apache doesn't cause it to go away. Now I've got to go back
>>into all my code to see if it's crept in. I tried converting /
>>reinterpreting Line Endings and Encoding types - even to ASCII in Coda
>>but it still appears!
>>>
>>I know it's probably an encoding issue but surely one like this
>>shouldn't bring PHP down?
>>>
>>Mike
>>>
>>
>Mike,
>>
>It is in your .gz file - on a line by itself between the $qsql= and
>the echo statements.
>>
>Maybe try a different editor. It showed up perfectly in TextPad.
>>
>
TextPad Jerry?
Great! My old favorite editor. :-)
I thought I was the last man on Earth using it. ;-)
>
Regards,
Erwin Moller
>
Naw, Erwin, it's one of the editors I use, mainly for quick and dirty
stuff. I prefer Crimson for programming (actually Eclipse is better but
a bit buggy). But sometimes, like this, the simpler the better :-)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Jerry Stuckle
Guest
 
Posts: n/a
#7: Apr 9 '08

re: Wierd character bug in PHP?


Michael J Martin wrote:
Quote:
On Apr 8, 2:14 pm, Michael Fesser <neti...@gmx.dewrote:
>
Quote:
>The byte in question is 0x7F, which is the "DEL" control char:
>>
>http://www.fileformat.info/info/unic...007f/index.htm
>>
>Obviously it shouldn't be there at all.
>>
>Micha
>
Interesting, I'll keep an eye on that. Maybe if I can reproduce it
again whilst editing I'll send it to the Coda dev team. - I think it
was Coda that was the culprit.
>
So the question becomes subjective:
FR: Shouldn't the PHP interpreter ignore 0x07F when interpreting?
>
No, PHP doesn't ignore any character - just like every other language,
every character counts. As it should be.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Erwin Moller
Guest
 
Posts: n/a
#8: Apr 10 '08

re: Wierd character bug in PHP?


Jerry Stuckle schreef:
Quote:
Erwin Moller wrote:
<snip>
Quote:
Quote:
>TextPad Jerry?
>Great! My old favorite editor. :-)
>I thought I was the last man on Earth using it. ;-)
>>
>Regards,
>Erwin Moller
>>
>
Naw, Erwin, it's one of the editors I use, mainly for quick and dirty
stuff. I prefer Crimson for programming (actually Eclipse is better but
a bit buggy). But sometimes, like this, the simpler the better :-)
Hi Jerry,

TextPad is a great program, but I don't use it either for PHP
programming. I prefer Zend Studio (5.5) at the moment, but am
considering their Eclipse port.

I feel a bit had by Zend. When I bought Zend Studio, they promised me a
lifetime of free upgrades, only to start their new line in Eclipse right
away, for which I have to pay of course.
Bad Zend, seems they are in it for the money. ;-)

Regards,
Erwin
Jerry Stuckle
Guest
 
Posts: n/a
#9: Apr 10 '08

re: Wierd character bug in PHP?


Erwin Moller wrote:
Quote:
Jerry Stuckle schreef:
Quote:
>Erwin Moller wrote:
>
<snip>
>
Quote:
Quote:
>>TextPad Jerry?
>>Great! My old favorite editor. :-)
>>I thought I was the last man on Earth using it. ;-)
>>>
>>Regards,
>>Erwin Moller
>>>
>>
>Naw, Erwin, it's one of the editors I use, mainly for quick and dirty
>stuff. I prefer Crimson for programming (actually Eclipse is better
>but a bit buggy). But sometimes, like this, the simpler the better :-)
>
Hi Jerry,
>
TextPad is a great program, but I don't use it either for PHP
programming. I prefer Zend Studio (5.5) at the moment, but am
considering their Eclipse port.
>
I feel a bit had by Zend. When I bought Zend Studio, they promised me a
lifetime of free upgrades, only to start their new line in Eclipse right
away, for which I have to pay of course.
Bad Zend, seems they are in it for the money. ;-)
>
Regards,
Erwin
>
Yea, I almost bought Zend studio. Glad I didn't, now.

Of course, they said "lifetime updates" - but they didn't say WHOSE
lifetime... :-)


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Piotr
Guest
 
Posts: n/a
#10: Apr 10 '08

re: Wierd character bug in PHP?


Piotr wrote:
Quote:
Quote:
Quote:
>>TextPad is a great program, but I don't use it either for PHP
>>programming. I prefer Zend Studio (5.5) at the moment, but am
>>considering their Eclipse port.
>>>
>>I feel a bit had by Zend. When I bought Zend Studio, they promised me
>>a lifetime of free upgrades, only to start their new line in Eclipse
>>right away, for which I have to pay of course.
>>Bad Zend, seems they are in it for the money. ;-)
>>>
>>Regards,
>>Erwin
>>>
>Yea, I almost bought Zend studio. Glad I didn't, now.
>>
>Of course, they said "lifetime updates" - but they didn't say WHOSE
>lifetime... :-)
>>
>>
>
There will be Netbeans powered PHP first alpha released in about one month.
>
best regards
Piotr N
ofc, I ment PHP IDE
Piotr
Guest
 
Posts: n/a
#11: Apr 10 '08

re: Wierd character bug in PHP?


>TextPad is a great program, but I don't use it either for PHP
Quote:
Quote:
>programming. I prefer Zend Studio (5.5) at the moment, but am
>considering their Eclipse port.
>>
>I feel a bit had by Zend. When I bought Zend Studio, they promised me
>a lifetime of free upgrades, only to start their new line in Eclipse
>right away, for which I have to pay of course.
>Bad Zend, seems they are in it for the money. ;-)
>>
>Regards,
>Erwin
>>
>
Yea, I almost bought Zend studio. Glad I didn't, now.
>
Of course, they said "lifetime updates" - but they didn't say WHOSE
lifetime... :-)
>
>
There will be Netbeans powered PHP first alpha released in about one month.

best regards
Piotr N
Erwin Moller
Guest
 
Posts: n/a
#12: Apr 10 '08

re: Wierd character bug in PHP?


Piotr schreef:
Quote:
Piotr wrote:
Quote:
Quote:
>>>TextPad is a great program, but I don't use it either for PHP
>>>programming. I prefer Zend Studio (5.5) at the moment, but am
>>>considering their Eclipse port.
>>>>
>>>I feel a bit had by Zend. When I bought Zend Studio, they promised me
>>>a lifetime of free upgrades, only to start their new line in Eclipse
>>>right away, for which I have to pay of course.
>>>Bad Zend, seems they are in it for the money. ;-)
>>>>
>>>Regards,
>>>Erwin
>>>>
>>Yea, I almost bought Zend studio. Glad I didn't, now.
>>>
>>Of course, they said "lifetime updates" - but they didn't say WHOSE
>>lifetime... :-)
>>>
>>>
>There will be Netbeans powered PHP first alpha released in about one month.
>>
>best regards
>Piotr N
ofc, I ment PHP IDE
Netbeans goes PHP?
Wow!

I liked Netbeans a lot more than Eclipse for my Java Projects.
Not to mention Eclipse was horribly slow on my old development machine.

Personally, I thought of Eclipse as overly complex compared to Netbeans,
but that could very well be just me.

I'll keep an eye on it. :-)

Thanks for the news.

Regards,
Erwin Moller
Jerry Stuckle
Guest
 
Posts: n/a
#13: Apr 10 '08

re: Wierd character bug in PHP?


Piotr wrote:
Quote:
Quote:
Quote:
>>TextPad is a great program, but I don't use it either for PHP
>>programming. I prefer Zend Studio (5.5) at the moment, but am
>>considering their Eclipse port.
>>>
>>I feel a bit had by Zend. When I bought Zend Studio, they promised me
>>a lifetime of free upgrades, only to start their new line in Eclipse
>>right away, for which I have to pay of course.
>>Bad Zend, seems they are in it for the money. ;-)
>>>
>>Regards,
>>Erwin
>>>
>Yea, I almost bought Zend studio. Glad I didn't, now.
>>
>Of course, they said "lifetime updates" - but they didn't say WHOSE
>lifetime... :-)
>>
>>
>
There will be Netbeans powered PHP first alpha released in about one month.
>
best regards
Piotr N
>
Hmmm, now that would be good! Netbeans is really good for Java.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Piotr
Guest
 
Posts: n/a
#14: Apr 10 '08

re: Wierd character bug in PHP?


Jerry Stuckle wrote:
Quote:
>
Hmmm, now that would be good! Netbeans is really good for Java.
>
Well.. in fact one of it's dev team members asked the question about
"what are our expectations from 'best' PHP IDE" few days ago on polish
PHP group.
I have some experience with Eclipse and Zend Studio, so shared my view
from that perspective, but if you have some more info, i guess it
wouldn't be bad to mail the guy with suggestions.

He posted as tomslot(at)gmail.com,
web: http://wiki.netbeans.org/PHP

best regards
Piotr N
Jerry Stuckle
Guest
 
Posts: n/a
#15: Apr 10 '08

re: Wierd character bug in PHP?


Piotr wrote:
Quote:
Jerry Stuckle wrote:
Quote:
>Hmmm, now that would be good! Netbeans is really good for Java.
>>
Well.. in fact one of it's dev team members asked the question about
"what are our expectations from 'best' PHP IDE" few days ago on polish
PHP group.
I have some experience with Eclipse and Zend Studio, so shared my view
from that perspective, but if you have some more info, i guess it
wouldn't be bad to mail the guy with suggestions.
>
He posted as tomslot(at)gmail.com,
web: http://wiki.netbeans.org/PHP
>
best regards
Piotr N
>
Not knowing what they're planning, it's hard to make suggestions. But
if they do the same things that NetBeans is doing currently in Java, it
should be great.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Piotr
Guest
 
Posts: n/a
#16: Apr 11 '08

re: Wierd character bug in PHP?


Jerry Stuckle wrote:
Quote:
>
Not knowing what they're planning, it's hard to make suggestions. But
if they do the same things that NetBeans is doing currently in Java, it
should be great.
>
I guess one of the point of him asking, was that we dont know what they
are planing :) They don't want to know what we expect, but rather what
we would like to have.

Anyways, it's all in the wiki.

best regards
Piotr N
Jerry Stuckle
Guest
 
Posts: n/a
#17: Apr 11 '08

re: Wierd character bug in PHP?


Piotr wrote:
Quote:
Jerry Stuckle wrote:
Quote:
>Not knowing what they're planning, it's hard to make suggestions. But
>if they do the same things that NetBeans is doing currently in Java, it
>should be great.
>>
I guess one of the point of him asking, was that we dont know what they
are planing :) They don't want to know what we expect, but rather what
we would like to have.
>
Anyways, it's all in the wiki.
>
best regards
Piotr N
>
As I said - if they're going to do for PHP what NetBeans does for Java,
I'd be happy.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Closed Thread


Similar PHP bytes