php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45087 Illegal or truncated character in input
Submitted: 2008-05-25 16:40 UTC Modified: 2010-06-21 00:31 UTC
Votes:12
Avg. Score:4.4 ± 0.9
Reproduced:12 of 12 (100.0%)
Same Version:7 (58.3%)
Same OS:0 (0.0%)
From: spam2 at rhsoft dot net Assigned:
Status: Wont fix Package: Unicode Engine related
PHP Version: 6CVS-2008-05-25 (CVS) OS: Fedora 9 x86_64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-05-25 16:40 UTC] spam2 at rhsoft dot net
Description:
------------
Warning: Illegal or truncated character in input: offset 104, state=0 in /mnt/data/www/thelounge.rhsoft.net/index.php on line 45 Parse error: syntax error, unexpected $end in /mnt/data/www/thelounge.rhsoft.net/index.php on line 45

_____________

The problem is the german "?"

else echo "&nbsp;<br /><h2 style=\"color:red\">Derzeit stehen keine Entwicklungsprojekte auf dieser Domain zur Verf?gung !</h2><br />&nbsp;";



Reproduce code:
---------------
<?php
 $result = @ini_set ("url_rewriter.tags", "");
 // Inhalt des Ordners zwischenspeichern
 settype ($dir_list, "array");
 $verz = opendir ("./");
 while ($file = readdir ($verz))
 {
  if (@is_dir($file) && $file !="." && $file !=".." && !stristr($file, "thevolumesetting") && !stristr($file, "network trash")) $dir_list[] = $file;
 }
 closedir ($verz);
 asort($dir_list);

 if (!empty($dir_list))
 {
  foreach ($dir_list as $dir)
  {
   echo "<a href=\"./" . $dir . "/\">" . strtolower($dir) . "</a><br>";
  }
 }
 else echo "&nbsp;<br /><h2 style=\"color:red\">Derzeit stehen keine Entwicklungsprojekte auf dieser Domain zur Verf?gung !</h2><br />&nbsp;";
?>

Expected result:
----------------
A simple html page

Actual result:
--------------
a strange parse error

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-29 16:05 UTC] gabrycucciolo84pv at fastwebnet dot it
I associate myself with this bug report. I had on my page the ? symbol and the ? symbol and became mad to find what was wrong until I read this bug submission and thought that also the ? and the ? sign are not standard characters.

At the moment I solved replacing them with &copy; and &reg; but it is a bit of pain this thing, it's better to rather change or replace it with 5.2 behaviour.

<OT>Php 6 is breaking several compatibilities with old scripts (and by old I mean v5 not v4 or v3). I am not a php coder so I don't know what's behind, but being a webmaster and programmer I can say that this is very ODD.
In less than 3 months, with standard configuration i used for years, my script had to be totally revised, phpMyAdmin was broken until a fix was done in v3, phpBB has some problems in reading private messages (v3.02 gold) and I suspect also many other scripts had problems.
Wouldn't be better to add a switch in php.ini of 6.0 to keep the old 5.2 behaviour, for backwards compatibility?
</OT>
 [2010-06-21 00:31 UTC] felipe@php.net
-Status: Open +Status: Wont fix
 [2010-06-21 00:31 UTC] felipe@php.net
Old trunk related.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 14:01:30 2024 UTC