php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17234 setting short_open_tag in .htaccess does nothing
Submitted: 2002-05-14 23:45 UTC Modified: 2002-10-08 21:39 UTC
Votes:26
Avg. Score:4.2 ± 0.9
Reproduced:21 of 23 (91.3%)
Same Version:4 (19.0%)
Same OS:4 (19.0%)
From: php at rawhide dot cjb dot net Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 4.2.1 OS: Windows XP
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: php at rawhide dot cjb dot net
New email:
PHP Version: OS:

 

 [2002-05-14 23:45 UTC] php at rawhide dot cjb dot net
Entering a value for short_open_tag in the .htaccess file achieves nothing. Example:

php_value short_open_tag X

Where X is 0, 1, off, on, true, false, etc. Executing phpinfo() will reveal the local value does not change from the master value, whether the master value is on or off.

I'd like to keep short_open_tag on for the majority of sites I'm running on my server but there is one in particular making use of XML which I want to disable short_open_tag for.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-15 00:32 UTC] rasmus@php.net
CGI or Apache module?  The CGI version of PHP does not read .htaccess.
 [2002-05-15 00:39 UTC] php at rawhide dot cjb dot net
Sorry, module.

I've tried other values such as display_errors and that changes fine.
 [2002-05-15 14:41 UTC] sander@php.net
You need php_flag for on/off settings:
php_flag short_open_tag off
 [2002-05-15 19:28 UTC] php at rawhide dot cjb dot net
Error message: 
<directory>/.htaccess: Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration.

This isn't bogus yet.
 [2002-05-17 03:45 UTC] jwoolley@php.net
That last problem you mentioned ("Invalid command 'php_flag'") is fixed in CVS, just so you know.
 [2002-09-05 11:35 UTC] gbenson at redhat dot com
I'm seeing this problem too, and it only seems to effect short_open_tag.  In my setup, /etc/php.ini says:

  register_globals = Off
  short_open_tag = Off

and I have the following in a file which is included by httpd.conf:

  <Directory /foo/bar/baz>
    php_value register_globals 1
    php_value short_open_tag 1
  </Directory>

A phpinfo() in /foo/bar/baz/phpinfo.php says:

  Directive          Local value       Global value
  register_globals   On                Off
  short_open_tag     Off               Off

ie, php_value worked for register_globals but not for short_open_tag.
 [2002-09-16 10:34 UTC] derick@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-10-08 21:39 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2004-03-10 22:32 UTC] darren at dzr-web dot com
On Red Hat Linux 9, with Apache 2.0.40 and PHP 4.2.2, attempting to change short_open_tag from .htaccess also fails. I've tried both:

php_value short_open_tag Off

and

php_flag short_open_tag Off

and neither has any effect. Changing the value in /etc/php.ini does. I'm not sure which version number PHP was at when comment #8 below was posted, suggesting that a recent CVS version be tested, but I am guessing that 4.2.2 postdates that. This is precisely what I have installed:

httpd-2.0.40-21.9
httpd-devel-2.0.40-21.9
httpd-manual-2.0.40-21.9
php-4.2.2-17.2
php-devel-4.2.2-17.2
php-imap-4.2.2-17.2
php-ldap-4.2.2-17.2
php-manual-4.2.2-17.2
php-mysql-4.2.2-17.2
php-odbc-4.2.2-17.2
php-pgsql-4.2.2-17.2
php-snmp-4.2.2-17.2
 [2006-07-31 20:43 UTC] php at rules dot net
On Red Hat Linux 9, with Apache 2.0.40 and PHP 4.2.2 neither adding php_flag short_open_tag On to httpd.conf nor to .htaccess has any effect
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 16:01:30 2024 UTC