php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57678 cant change php.ini values
Submitted: 2007-05-21 14:30 UTC Modified: 2007-07-30 03:22 UTC
From: cirox at x-provid dot de Assigned: pajoye (profile)
Status: Not a bug Package: htscanner (PECL)
PHP Version: 5.2.1 OS: Debian etch
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cirox at x-provid dot de
New email:
PHP Version: OS:

 

 [2007-05-21 14:30 UTC] cirox at x-provid dot de
Description:
------------
I compiled PHP 5.2.2 (cgi-bin) and add the extension htscanner like described in readme with phpize from compiled PHP Version. I add the php.ini lines from extension to php.ini file and enable the extension. Each User has a different php.ini. I dont use the standard php.ini values like docroot = "/". So i change the value to "/var/www/"




Reproduce code:
---------------
change to htscanner dir

/usr/local/bin/php5/bin/phpize

./configure \
--enable-htscanner \
--with-php-config=/usr/local/bin/php5/bin/php-config

make && make install

Expected result:
----------------
I see the extension htscanner enabled in infophp File. And i expect to see the changed values like docroot.


Actual result:
--------------
htscanner works for some PHP Functions but i can not see the changed settings like docroot in the php.ini file. It always shows the standard values like docroot = "/".

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-22 04:29 UTC] pierre dot php at gmail dot com
docroot should be defined by the (F)CGI or the web server itself. The default value set in php.ini is system wide.

If you need to specify an alternative docroot, you may use the htscanner option default_docroot (See docs/htscanner.ini). Have you tried it?
 [2007-05-22 05:09 UTC] cirox at x-provi dot de
I have tried it. Everything else works in a userspezified php.ini und i can enable / disable the extension htscanner for every user in his own php.ini:

extension=htscanner.so

[htscanner]
config_file=".htaccess"
default_docroot="/var/www"
stop_on_error = 0
default_ttl = 500

extension is enabled and works for example with php_value display_errors 1
But own values set see example above doesnt work
 [2007-05-22 05:40 UTC] pierre dot php at gmail dot com
"But own values set see example above doesnt work"

There is a couple of ini setting that cannot be change by htscanner. PHP set them once per request and does that before calling the htscanner extension init functions (like setting magic_quotes_gpc to Off when it was off).

It requires htscanner to be merged in php itself and/or to use alternative methods (sapi specific).
 [2007-05-22 10:57 UTC] cirox at x-provi dot de
I think here is a misunderstanding.

I mean the settings:

default_docroot from the extension htscanner doesnt work in a php.ini File not the PHP Functions itselfs.
 [2007-05-22 11:11 UTC] pierre dot php at gmail dot com
"default_docroot from the extension htscanner doesnt work in a php.ini File not the PHP Functions itselfs."

Please note that this setting is used only when the PHP docroot is not set or cannot be fetch.

Is it set on your system?
 [2007-05-22 13:21 UTC] cirox at x-provi dot de
no its is not set. ok, but at the other site i changed TTL time like described before and nothing is chown in infophp File. the infophp File only shows the default values. But i build the extension on the right way i think, cause i can enable / disbale htscanner in this same php.ini file for each user. 

The only way to change the values of the extension is to compile it with other values. Then its is chown on infophp File

Here is the code i had to change but its useless for me, cause i have only one php binary for all.

/* {{{ PHP_INI
 */
PHP_INI_BEGIN()
    STD_PHP_INI_ENTRY("htscanner.config_file", ".htaccess", PHP_INI_SYSTEM, OnUpdateString, config_file, zend_htscanner_globals, htscanner_globals)
   STD_PHP_INI_ENTRY("htscanner.default_docroot", "/", PHP_INI_SYSTEM, OnUpdateString, default_docroot, zend_htscanner_globals, htscanner_globals)
#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 0)
   STD_PHP_INI_ENTRY("htscanner.default_ttl", "300", PHP_INI_SYSTEM, OnUpdateLong, default_ttl, zend_htscanner_globals, htscanner_globals)
   STD_PHP_INI_ENTRY("htscanner.stop_on_error", "0", PHP_INI_SYSTEM, OnUpdateLong, stop_on_error, zend_htscanner_globals, htscanner_globals)
#else
   STD_PHP_INI_ENTRY("htscanner.default_ttl", "300", PHP_INI_SYSTEM, OnUpdateInt, default_ttl, zend_htscanner_globals, htscanner_globals)
   STD_PHP_INI_ENTRY("htscanner.stop_on_error", "0", PHP_INI_SYSTEM, OnUpdateInt, stop_on_error, zend_htscanner_globals, htscanner_globals)
#endif
PHP_INI_END()
/* }}} */
 [2007-05-23 05:13 UTC] pierre dot php at gmail dot com
Can you give a link to your phpinfo page and tell me which values you use in php.ini?

I'm not sure to understand exactly what you are trying to do, sorry.

If these info are private, you can mail me them to pierre.php[at]gmail[dot]com (I can speak german too btw :)
 [2007-07-28 19:53 UTC] cirox at x-provi dot de
everything works fine now with the doc_root and i can change the values for every user in his php.ini. The solution for me was to add the word "htscanner" before the changing value. So i had to write: htscanner.default_docroot="/path_to_web" instead of only default_docroot="/path_to_web" for example.
 [2007-07-29 05:55 UTC] pierre dot php at gmail dot com
yes, it should work too if you create a [htscanner] section. But the ini parser may differ from one php version to another :)

Can I close this bug yet or is there still another issue?
 [2007-07-29 19:21 UTC] cirox at x-provi dot de
You can close the bug cause there is no another issue.
 [2007-07-30 03:22 UTC] pierre dot php at gmail dot com
Ok, thanks.

Not a bug > bogus.
 [2008-01-24 15:57 UTC] puke at tomas dot bednar dot sk
Hi, friends,
htscanner is great utility, thanks for it.
As I see, it's actually required to use full names of variables in php.ini i.e. htscanner.default_docroot just like it is mentioned in source:
STD_PHP_INI_ENTRY("htscanner.default_docroot" .....
Prefacing section ([htscanner]) is not sufficient.
See e.g. mysql variables in php.ini:
mysql.default_port
mysql.default_socket
and simillary all other extensions.
I recommend to fix distributed docs/htscanner.ini file and add prefixes, not to search web for this bug by every new user of htscanner like me :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC