php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39969 ini setting short_open_tag has no effect when using --enable-maintainer-zts
Submitted: 2006-12-27 23:36 UTC Modified: 2007-01-12 14:38 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: yahikootje at gmail dot com Assigned: dmitry (profile)
Status: Closed Package: PHP options/info functions
PHP Version: 6CVS-2006-12-27 (CVS) OS: Linux 2.6.17-gentoo-r8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yahikootje at gmail dot com
New email:
PHP Version: OS:

 

 [2006-12-27 23:36 UTC] yahikootje at gmail dot com
Description:
------------
When compiling PHP with --enable-maintainer-zts, setting the "short_open_tag" and "asp_tag" ini settings in php.ini have no effect.
Compiling without --enable-maintainer-zts doesn't this problem.
The values that are used for these ini settings (when compiled with --enable-maintainer-zts) are the default values that are set in zend_set_default_compile_time_values()

I noticed this issue in PHP-5.2.1RC1, but it is also present in current HEAD (and probably also in older PHP versions).

If more information is needed, just ask.

Reproduce code:
---------------
<?php echo "long open php tags" . PHP_EOL ?>
<? echo "short open php tags" . PHP_EOL ?>
<% echo "asp open php tag" . PHP_EOL %>

with php.ini containing:

short_open_tag = Off
asp_tags = On

Expected result:
----------------
long open php tags
<? echo "short open php tags" . PHP_EOL ?>
asp open php tag

Actual result:
--------------
long open php tags
short open php tags
<% echo "asp open php tag" . PHP_EOL %>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-30 20:50 UTC] yahikootje+bugs at gmail dot com
While digging a bit deeper I found that zend_post_startup() is only called when ZTS is enabled. This function calls compilers_global_ctor() which in turn calls zend_set_default_compile_time_values(). In that function the values for CG(short_tags) and CG(asp_tags) are reset to the default values, cancelling the effect off setting the ini values.

Removing the call to zend_set_default_compile_time_values() in compilers_global_ctor() seems to solve the problem, but I can not say for sure it won't cause any other problems.
 [2007-01-12 14:38 UTC] dmitry@php.net
Fixed in CVS HEAD and PHP_5_2.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Apr 01 03:01:29 2025 UTC