php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58046 Unrecognized value, if separated with <TAB>
Submitted: 2008-02-19 06:31 UTC Modified: 2009-03-03 20:31 UTC
From: giedrius at su dot lt Assigned: pajoye (profile)
Status: Closed Package: htscanner (PECL)
PHP Version: Irrelevant OS: Linux 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 + 38 = ?
Subscribe to this entry?

 
 [2008-02-19 06:31 UTC] giedrius at su dot lt
Description:
------------
patch to fix:

*** htscanner.c 2008-02-19 13:25:07.000000000 +0200
--- htscanner.c.new 2008-02-19 13:21:39.000000000 +0200
***************
*** 97,102 ****
--- 97,103 ----
   /* strip any leading whitespaces or tabs from the name */
   PHP_HTSCANNER_LTRIM(name);
   value = strchr(name, ' ');
+  if (!value) value = strchr(name,'\t');

   if (value) {
    int len;


Reproduce code:
---------------
in .htaccess:

php_value<TAB or whitespace>short_open_tag<TAB>Off


Expected result:
----------------
turn off <? tags into <?php

Actual result:
--------------
value unrecognized/ignored


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-24 19:53 UTC] dereks at realloc dot net
Confirmed, I have a very similar issue on Ubuntu 7.10.

I have this line in my .htaccess file:

        php_flag short_open_tag         On

If I do a phpinfo(); under that dir, it shows that short_open_tag is "Off", instead of "On".

If I put a single space, like this, then it works fine:

        php_flag short_open_tag On

But one thing to note is that my server-wide default for short_open_tag is "On".  The extra spaces causes htscanner to actually set the WRONG value (Off) instead of just ignoring it and keeping the server-wide default of "On".

Thanks for your work on htscanner.  It is very useful for me.
 [2008-04-24 19:55 UTC] dereks at realloc dot net
Addendum to the above post: In my case the problem was due to many spaces (not a single TAB like the original submitter reported).
 [2009-03-03 20:31 UTC] pierre dot php at gmail dot com
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/htscanner


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 02:01:29 2024 UTC