php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20008 php_admin_flag clears variable if it can't be changed
Submitted: 2002-10-21 07:40 UTC Modified: 2002-10-28 09:51 UTC
From: uhlar at fantomas dot sk Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.2.3 OS: FreeBSD4.5
Private report: No CVE-ID: None
 [2002-10-21 07:40 UTC] uhlar at fantomas dot sk
upload_tmp_dir was set to '/clients/home/TMP' in php.ini
I tried to redefine it in <VirtualHost> section via php_admin_flag (I missed that it's not allowed) it was changd to 0.
I think that if a variable can't be changed in <VirtualHost> section, attempt to change it should not wipe it.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-21 07:53 UTC] nicos@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

upload_tmp_dir is PHP_INI_SYSTEM.
PHP_INI_SYSTEM  Entry can be set in php.ini or httpd.conf (but not in VHost blocks in httpd.conf).
 [2002-10-21 07:56 UTC] derick@php.net
true, but that was not the reported bug
 [2002-10-21 08:00 UTC] nicos@php.net
Oh well yes, it shouldn't change it at all. Anyone tried this with PHP-4.3.0dev?
 [2002-10-28 09:51 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Actually <VirtualHost> can overwrite the php.ini settings. Your problem is that you are using php_admin_flag instead of php_admin_value when changing a string value. Since php_admin_flag expects On/Off or 0/1 bolean values the string value you provide gets converted to 0. Hence the 0 value for upload_tmp_dir.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 11:01:30 2024 UTC