cacti viewing error
Moderators: Developers, Moderators
cacti viewing error
i installed cacti following the INSTALL file but if i try to view
cacti url it shows this error:
Warning: mb_ereg_replace(): mbregex compile err: premature end of
regular expression in /var/www/html/cacti/include/config.php on line
43
Warning: mb_ereg_replace(): mbregex compile err: premature end of
regular expression in /var/www/html/cacti/include/config.php on line
44
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 67
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 68
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 69
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 70
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 71
Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at /var/www/html/cacti/include/config.php:43)
in /var/www/html/cacti/include/config.php on line 74
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at
/var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 74
Warning: main(/adodb/adodb.inc.php): failed to open stream: No such
file or directory in /var/www/html/cacti/include/config.php on line
103
Warning: main(): Failed opening '/adodb/adodb.inc.php' for inclusion
(include_path='.:/usr/share/pear') in
/var/www/html/cacti/include/config.php on line 103
Warning: main(/database.php): failed to open stream: No such file or
directory in /var/www/html/cacti/include/config.php on line 104
Warning: main(): Failed opening '/database.php' for inclusion
(include_path='.:/usr/share/pear') in
/var/www/html/cacti/include/config.php on line 104
Warning: main(/functions.php): failed to open stream: No such file or
directory in /var/www/html/cacti/include/config.php on line 105
Warning: main(): Failed opening '/functions.php' for inclusion
(include_path='.:/usr/share/pear') in
/var/www/html/cacti/include/config.php on line 105
Fatal error: Call to undefined function: db_connect_real() in
/var/www/html/cacti/include/config.php on line 111
i'm not sure if it's cacti or php error anyone encountered the same problem?
cacti url it shows this error:
Warning: mb_ereg_replace(): mbregex compile err: premature end of
regular expression in /var/www/html/cacti/include/config.php on line
43
Warning: mb_ereg_replace(): mbregex compile err: premature end of
regular expression in /var/www/html/cacti/include/config.php on line
44
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 67
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 68
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 69
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 70
Warning: Cannot modify header information - headers already sent by
(output started at /var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 71
Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at /var/www/html/cacti/include/config.php:43)
in /var/www/html/cacti/include/config.php on line 74
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at
/var/www/html/cacti/include/config.php:43) in
/var/www/html/cacti/include/config.php on line 74
Warning: main(/adodb/adodb.inc.php): failed to open stream: No such
file or directory in /var/www/html/cacti/include/config.php on line
103
Warning: main(): Failed opening '/adodb/adodb.inc.php' for inclusion
(include_path='.:/usr/share/pear') in
/var/www/html/cacti/include/config.php on line 103
Warning: main(/database.php): failed to open stream: No such file or
directory in /var/www/html/cacti/include/config.php on line 104
Warning: main(): Failed opening '/database.php' for inclusion
(include_path='.:/usr/share/pear') in
/var/www/html/cacti/include/config.php on line 104
Warning: main(/functions.php): failed to open stream: No such file or
directory in /var/www/html/cacti/include/config.php on line 105
Warning: main(): Failed opening '/functions.php' for inclusion
(include_path='.:/usr/share/pear') in
/var/www/html/cacti/include/config.php on line 105
Fatal error: Call to undefined function: db_connect_real() in
/var/www/html/cacti/include/config.php on line 111
i'm not sure if it's cacti or php error anyone encountered the same problem?
chwon -R us.us ./base
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Version of:
Cacti?
OS?
PHP?
Cacti?
OS?
PHP?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Um... Try upgrading PHP to 4.3.11
Also, make sure that if you have FastCGI enabled that you set "cgi.fix_pathinfo = 1" in your php.ini file.
Also, make sure that if you have FastCGI enabled that you set "cgi.fix_pathinfo = 1" in your php.ini file.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
hi it worked with centos but not in fedora. i haven't upgraded it to php 4.3.11 because i can't find rpm for fedora that version is 4.3.11rony wrote:Um... Try upgrading PHP to 4.3.11
Also, make sure that if you have FastCGI enabled that you set "cgi.fix_pathinfo = 1" in your php.ini file.
chwon -R us.us ./base
Solved this sucker!
I figured it out after a quick look on the ereg_replace manual page
The first offending line (43) is:
which the manual says means that the \\1 will be replaced with the first bit between (), i.e. anything before the "include" part.
BUT - cacti thinks to be smart and figure out for itself whether it is running on WinDOS ( \ path separator) or Unix ( / path separator).
Needless to say, this fails - miserably.
If you read the above, you'll see that ereg_replace is apt to get confused by this - does he (that's you) want a string with "number" \\], or does he want an actual escaped backslash (\\)?
My guess is it tries the former, and gives up
If this is a parsing error then it's an actual PHP bug.
I solved it by removing the [] and the separator that is not for my platform (Linux), and voila - glorious install screens are here!
In case this much code confuses you, here's the new line:
Note that this only works on Linux!
For WinDOS you'll have to use \\ instead of \/
Modify the second line(with the /lib path) in the same way.
The first offending line (43) is:
Code: Select all
$config["base_path"] = ereg_replace("(.*)[\/\\]include", "\\1", dirname(__FILE__));
BUT - cacti thinks to be smart and figure out for itself whether it is running on WinDOS ( \ path separator) or Unix ( / path separator).
Needless to say, this fails - miserably.
If you read the above, you'll see that ereg_replace is apt to get confused by this - does he (that's you) want a string with "number" \\], or does he want an actual escaped backslash (\\)?
My guess is it tries the former, and gives up
If this is a parsing error then it's an actual PHP bug.
I solved it by removing the [] and the separator that is not for my platform (Linux), and voila - glorious install screens are here!
In case this much code confuses you, here's the new line:
Code: Select all
$config["base_path"] = ereg_replace("(.*)\/include", "\\1", dirname(__FILE__));
For WinDOS you'll have to use \\ instead of \/
Modify the second line(with the /lib path) in the same way.
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Um....
If this was a problem, more people would report it. I think it's related to your version of php.
If this was a problem, more people would report it. I think it's related to your version of php.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Sure, like a Linux system consists of a few, small, known-state partsrony wrote:Um....
If this was a problem, more people would report it.
And an EDIT: that's actually pretty insulting to the OP of this thread: he reported this problem.
Now you're saying it must be my problem ?
Well duh - that's why I said it may be a PHP bug.rony wrote: I think it's related to your version of php.
I'm running php 4.3.11, by the way - the version you repeatedly recommend to upgrade to.
viewing error
Thanks - I'm running php 4.3.9 on FC3 and that solved my problem , so ...adaptr wrote:Sure, like a Linux system consists of a few, small, known-state partsrony wrote:Um....
If this was a problem, more people would report it.
And an EDIT: that's actually pretty insulting to the OP of this thread: he reported this problem.
Now you're saying it must be my problem ?
Well duh - that's why I said it may be a PHP bug.rony wrote: I think it's related to your version of php.
I'm running php 4.3.11, by the way - the version you repeatedly recommend to upgrade to.
Who is online
Users browsing this forum: No registered users and 2 guests