php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28522 .htaccess settings missing
Submitted: 2004-05-26 01:31 UTC Modified: 2004-12-21 01:00 UTC
From: phpbugs at pajunas dot net Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 4.3.6 OS: FreeBSD 5.2.x
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: phpbugs at pajunas dot net
New email:
PHP Version: OS:

 

 [2004-05-26 01:31 UTC] phpbugs at pajunas dot net
Description:
------------
After several months of proper behavior and no system 
changes, apache2/php are no longer consistently applying 
php_value and php_flag settings from .htaccess files.

I create a .htaccess file including the following 
settings (which differ from their php.ini values):

php_flag display_errors On
php_flag register_globals On

Between 5-10% of web requests do not take these settings 
into account.  A phpinfo() script, reloaded repeatedly 
produces the php.ini (and not the .htaccess) values some 
of the time, and scripts relying on these settings 
occasionally break.

This began occurring without warning, and may related to 
the addition of ~12 VirtualHosts to apache



./configure' '--enable-versioning' '--enable-memory-
limit' '--with-layout=GNU' '--with-zlib-dir=/usr' '--
disable-all' '--with-regex=php' '--with-pear' '--enable-
bcmath' '--with-bz2=/usr' '--enable-calendar' '--with-
cdb' '--with-crack=/usr/local' '--enable-ctype' '--with-
curl=/usr/local' '--with-db4=/usr/local' '--enable-dba' 
'--enable-dbx' '--enable-dio' '--with-dom=/usr/local' 
'--with-dom-xslt=/usr/local' '--with-dom-exslt=/usr/
local' '--enable-exif' '--enable-ftp' '--with-gd' '--
enable-gd-native-ttf' '--enable-gd-jis-conv' '--with-
freetype-dir=/usr/local' '--with-t1lib=/usr/local' '--
with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' 
'--with-gdbm=/usr/local' '--with-gettext=/usr/local' '--
with-iconv-dir=/usr/local' '--with-iconv=/usr/local' '--
with-inifile' '--with-java=/usr/local/jdk1.4.2' '--
enable-mbstring' '--with-mcal=/usr/local' '--with-
mcrypt=/usr/local' '--with-mhash=/usr/local' '--with-
mime-magic=/usr/share/misc/magic.mime' '--with-ming=/
usr/local' '--with-mm=/usr/local' '--with-mnogosearch=/
usr/local' '--with-mysql=/usr/local' '--with-ldap=/usr/
local' '--with-openssl-dir=/usr' '--with-openssl=/usr' 
'--enable-overload' '--with-pcre-regex=yes' '--with-
pdflib=/usr/local' '--enable-posix' '--with-pgsql=/usr/
local' '--with-pspell=/usr/local' '--enable-session' '--
enable-shmop' '--enable-sockets' '--enable-sysvsem' '--
enable-sysvshm' '--enable-tokenizer' '--with-unixODBC=/
usr/local' '--enable-wddx' '--with-expat-dir=/usr/local' 
'--enable-xml' '--with-xmlrpc' '--enable-xslt' '--with-
xslt-sablot=/usr/local' '--with-zip=/usr/local' '--with-
zlib=yes' '--with-apxs2=/usr/local/sbin/apxs' '--with-
imap=/usr/local' '--with-imap-ssl=/usr/local' '--with-
snmp=/usr/local' '--enable-ucd-snmp-hack' '--prefix=/
usr/local' 'i386-portbld-freebsd5.2' 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-26 19:31 UTC] iliaa@php.net
Are you sure you are running 4.3.6? 4.3.6 has been out for 
just over a month. The error you've describe is reminiscent 
of a ini leak solved by 4.3.6. 
 [2004-05-26 19:38 UTC] phpbugs at pajunas dot net
Yes, I am using 4.3.6.  I encountered that ini leak bug 
in 4.3.4 and limped by with MaxRequestsPerChild 1 until 
4.3.5 came out.

However, in this case, setting MaxRequestsPerChild 1 
does not appear to have any effect.
 [2004-05-26 20:18 UTC] phpbugs at pajunas dot net
It is worth describing how php settings are managed.  
In addition to the php.ini file, each VirtualHost gets 
php settings via a Directory directive.

<VirtualHost *:80>
  ServerName www.example.com
  ServerAlias example.com
  DocumentRoot /www/virtual/example.com/www
  ErrorLog /www/virtual/example.com/logs/error_log
</VirtualHost>

<Directory /www/virtual/example.com/www>
  php_value session.save_path /www/virtual/example.com/
tmp
  php_admin_value upload_tmp_dir /www/virtual/
example.com/tmp
  php_admin_value doc_root /www/virtual/example.com/www
  php_admin_value open_basedir /www/lib/:/www/virtual/
example.com/
  php_admin_value sendmail_from support@pajunas.net
  SetEnv PHP_DOCUMENT_ROOT /www/virtual/example.com/www
  SetEnv PHPRC /www/virtual/example.com/conf
</Directory>

Things have been fine this way, but the only change on 
the system before the .htaccess problem was the 
addition of several VirtualHosts.
 [2004-12-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 02:01:29 2024 UTC