Bug #61415 [NEW]: zend_alter_ini_entry failuers
| From: | info at simonecaruso dot com | Date: | Fri, 16 Mar 2012 11:38:37 +0000 |
| Subject: | Bug #61415 [NEW]: zend_alter_ini_entry failuers | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-168546@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux
PHP version: 5.3.10
Package: Safe Mode/open_basedir
Bug Type: Bug
Bug description:zend_alter_ini_entry failuers
Description:
------------
I wrote an apache2.2 module that changs open_basedir and php_includepath
dynamically into translatename hook with zend_alter_ini_entry.
This works perfectly but for about 5% of requests i get a PHP Warning with
a
wrong open_basedir.
From my debug logs i get a FAILURE on
zend_alter_ini_entry("open_basedir",...)
with the rate of about 5 requests over 100; this never happen for
'includepath'
ini entry. For any call to zend_alter_ini_entry i submit always the same
string
for each virtualhost, i can't understand why the function output change
without
a input values change.
(gdb) bt full
#0 zend_alter_ini_entry_ex (name=0x7fff3913b4b0 "ø>\026\002",
name_length=1,
new_value=0x7fea30fa4250 "/home/www-data/gamerinside.it/html/",
new_value_length=957592432, modify_type=31715296, stage=32746,
force_change=0) at /root/php53/php-5.3.3/Zend/zend_ini.c:254
ini_entry = (zend_ini_entry *) 0x7fea30fa40e8
modified = 224 'Ã '
#1 0x00007fea2a670530 in zend_alter_ini_entry (name=0x7fea290e3f39
"open_basedir", name_length=13,
new_value=0x23e89e8 "/tmp/:/usr/share/php/:.:/home/www-
data/gamerinside.it/html/", new_value_length=59, modify_type=4, stage=16)
at /root/php53/php-5.3.3/Zend/zend_ini.c:249
No locals.
#2 0x00007fea290e29d0 in mod_vhost_ldap_translate_name (r=0x23e71c8) at
mod_vhost_ldap_ng.c:862
reqc = (mod_vhost_ldap_request_t *) 0x7fea30fa4070
conf = (mod_vhost_ldap_config_t *) 0x1d047f8
core = (core_server_config *) 0x1e3e680
ld = (LDAP *) 0x0
realfile = 0x0
alias = (alias_t *) 0x0
i = 0
ret = 0
str = {0x0, 0x0, 0x0}
ldapmsg = (LDAPMessage *) 0x0
vhostentry = (LDAPMessage *) 0x0
openbasedir = 0x23e89e8 "/tmp/:/usr/share/php/:.:/home/www-
data/gamerinside.it/html/"
include = 0x23e89a8 "/tmp/:/usr/share/php/:.:/home/www-
data/gamerinside.it/html/"
#3 0x0000000000433de3 in ap_run_translate_name ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#4 0x000000000043601e in ap_process_request_internal ()
No symbol table info available.
#5 0x0000000000449718 in ap_process_request ()
No symbol table info available.
#6 0x0000000000446858 in ?? ()
No symbol table info available.
#7 0x0000000000440493 in ap_run_process_connection ()
Actual result:
--------------
if(zend_alter_ini_entry("open_basedir", strlen("open_basedir") + 1,
(void *)openbasedir, strlen(openbasedir), PHP_INI_SYSTEM,
PHP_INI_STAGE_RUNTIME) != 0)
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r,
"zend_alter_ini_entry
failed, open_basedir: %s", openbasedir);
ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r, "PhpIncludePath:
%s,
PhpOpenBasedir %s", include, openbasedir);
[Fri Mar 16 00:00:47 2012] [error] [client 2.38.136.113]
zend_alter_ini_entry
failed, open_basedir:
/tmp/:/usr/share/php/:.:/home/www-data/pescasud.it/html/,
referer: http://pescasud.it/CacciaSud/administrator/index.php?
option=com_modules&view=module&layout=edit&id=117
[Fri Mar 16 00:00:47 2012] [info] [client 2.38.136.113] PhpIncludePath:
/tmp/:/usr/share/php/:.:/home/www-data/pescasud.it/html/, PhpOpenBasedir
/tmp/:/usr/share/php/:.:/home/www-data/pescasud.it/html/, referer:
http://pescasud.it/CacciaSud/administrator/index.php?
option=com_modules&view=module&layout=edit&id=117
--
Edit bug report at https://bugs.php.net/bug.php?id=61415&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61415&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61415&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61415&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=61415&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61415&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=61415&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=61415&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=61415&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=61415&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=61415&r=support
Expected behavior: https://bugs.php.net/fix.php?id=61415&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=61415&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=61415&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=61415&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61415&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=61415&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=61415&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=61415&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=61415&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=61415&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=61415&r=mysqlcfg