cacti mbstring.overload has to be set to 0 when on same machine as egroupware

Bug #313328 reported by el es
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cacti (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hi
this affects Ubuntu 8.04 LTS (all up to date):

http://ubuntuforums.org/showthread.php?t=1012019

In short : when egroupware and cacti are installed so they are served by the same apache, you never know, which apache instance is actually serving it; and since cacti cannot use '''php_value mbstring.func_overload''' it has to be set to 0 everywhere it is set otherwise, like in /etc/apache2/conf.d/egroupware change line 29.

So the /etc/apache2/conf.d/cacti.conf now reads:

> > Alias /cacti /usr/share/cacti/site
> >
> > <DirectoryMatch /usr/share/cacti/site>
> > Options +FollowSymLinks
> > AllowOverride None
> > order allow,deny
> > allow from all
> > # <IfModule mod_php4.c> # modify here
> > AddType application/x-httpd-php .php
> >
> > php_flag magic_quotes_gpc Off
> > php_flag short_open_tag On
> > php_flag register_globals Off
> > php_flag register_argc_argv On
> > php_flag track_vars On
> > # this setting is necessary for some locales
> > php_value mbstring.func_overload 0 # here is the clue
> > php_value include_path .
> >
> > DirectoryIndex index.php
> > # </IfModule> # and here
> > </DirectoryMatch>

I don't know if the ifmodule modification is meaningful at all, but I haven't tested it without, and with the file reading as above, it works flawless.

Revision history for this message
cviniciusm (cviniciusm) wrote :

Hello,

I'm using Ubuntu 8.10, cacti 0.8.7b-2.1ubuntu2, egroupware 1.4.004-2.dfsg-1 and php5 5.2.6-2ubuntu4.1.

Using cacti alone on a tab (IE or Firefox), it works fine.

But when I use egroupware on another tab than cacti (IE or Firefox) and I go back to cacti, cacti shows:
"Warning: mb_ereg_replace() [function.mb-ereg-replace]: mbregex compile err: premature end of char-class in /usr/share/cacti/site/include/global.php on line 86

Warning: mb_ereg_replace() [function.mb-ereg-replace]: mbregex compile err: premature end of char-class in /usr/share/cacti/site/include/global.php on line 87

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/global.php:86) in /usr/share/cacti/site/include/global.php on line 121

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/global.php:86) in /usr/share/cacti/site/include/global.php on line 122

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/global.php:86) in /usr/share/cacti/site/include/global.php on line 123

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/global.php:86) in /usr/share/cacti/site/include/global.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/global.php:86) in /usr/share/cacti/site/include/global.php on line 125

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/share/cacti/site/include/global.php:86) in /usr/share/cacti/site/include/global.php on line 129

Warning: include(/database.php) [function.include]: failed to open stream: No such file or directory in /usr/share/cacti/site/include/global.php on line 184

Warning: include() [function.include]: Failed opening '/database.php' for inclusion (include_path='.') in /usr/share/cacti/site/include/global.php on line 184

Warning: include_once(/functions.php) [function.include-once]: failed to open stream: No such file or directory in /usr/share/cacti/site/include/global.php on line 185

Warning: include_once() [function.include]: Failed opening '/functions.php' for inclusion (include_path='.') in /usr/share/cacti/site/include/global.php on line 185

Fatal error: Call to undefined function db_connect_real() in /usr/share/cacti/site/include/global.php on line 191
"

http://.../egroupware/admin/phpinfo.php shows:
"
Directive Local Value Master Value
...
mbstring.func_overload 7 0
"

So, the entry on cacti.conf doesn't works.

Revision history for this message
el es (el-es-poczta) wrote :

@cviniciusm, this is probably belated - but please read my solution throughly :

- in /etc/apache2/conf.d/cacti.conf, comment out the <IfModule mod_php4.c> line,
- and the corresponding </IfModule>,

- modify line that has mbstring.func_overload,
- to contain mbstring.func_overload 0

(i.e. not 7 0)
(for clarification, read php docs on mbstring.func_overload)

This works for me (still on 8.04 LTS with that server).

Revision history for this message
Paul Gevers (paul-climbing) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the later versions of Ubuntu, at least since Lucid Lynx (Debian version 0.8.7d-1).

If you need a fix for the bug in previous versions of Ubuntu, please follow the instructions for "How to request new packages" at https://wiki.ubuntu.com/UbuntuBackports

Changed in cacti (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.