Fatal error: Cannot redeclare title_trim

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

ETNOC

Fatal error: Cannot redeclare title_trim

Post by ETNOC »

Fatal error: Cannot redeclare title_trim() (previously declared in C:\webroot\cacti\include\functions.php:27) in c:\webroot\cacti\include\functions.php on line 27
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Can you give me a little more detail about this problem? What you did to cause this error would be very helpful.

-Ian
ETNOC

Fatal error: Cannot redeclare title_trim

Post by ETNOC »

Ok, i just install. After install i go to the /install/index.php by the web how your manual said and everything was fine. When i click to go to the next page after complete the path information i get this error.

Fatal error: Cannot redeclare title_trim() (previously declared in C:\webroot\cacti\include\functions.php:27) in c:\webroot\cacti\include\functions.php on line 27


Windows 2000 Server
I am runing with IIS 5
MYSQL
PHP
rrdtool

All with the latest version

Thanks for your Help.
Guest

redeclare error in function.php

Post by Guest »

I have just installed Cacti on a Win2K Server as well as PHP and Apache 2 as the web server and MYSql.

After the login screen I also am getting a unable to redeclare function title_trim from functions.php previously declared in functions.php.

include path = c:\program files\apache group\apache2\htdocs\cacti


Thanks.
lucky
Cacti User
Posts: 62
Joined: Mon Sep 30, 2002 3:23 am
Location: Germany

Post by lucky »

hi,

i have the same problem after updating from cacti 0.68a to cacti 0.8

Code: Select all

Fatal error: Cannot redeclare title_trim() (previously declared in C:\Inetpub\wwwroot\cacti\include\functions.php:27) in c:\inetpub\wwwroot\cacti\include\functions.php on line 27
what do you mean with:

Code: Select all

include path = c:\program files\apache group\apache2\htdocs\cacti 
wenn i'm adding

Code: Select all

c:\inetpub\wwwroot\cacti\
as windows path i have the same problem....

I am running cacti 0.8 on a w2k server with php 4.2.2 and iis.
Kluso
Posts: 2
Joined: Tue Jan 21, 2003 5:32 pm

Cannot redeclare title_trim()

Post by Kluso »

Same here. 0.6.8a was working but 0.8 returns this error:

Fatal error: Cannot redeclare title_trim() (previously declared in C:\htdocs\CACTI\include\functions.php:27) in C:\htdocs\cacti\include\functions.php on line 27

DB conversion seems to have worked but I never got to the login screen.

Win2K Server
Apache 2.0.45 (Win32)
PHP 4.3.0

:(
Mike R.

Same error...

Post by Mike R. »

I am experiencing the same error as above. The web-based install portion seemed to go OK, but as soon as it completed I get the same error.

"Fatal error: Cannot redeclare title_trim() (previously declared in D:\Apache\Apache2\htdocs\cacti\include\functions.php:27) in d:\apache\apache2\htdocs\cacti\include\functions.php on line 27"

Windows 2000 Server
Apache 2.0.46
PHP 4.3.1
MySQL 4.0.11
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

This is confusing... I am using PHP's include_once() function everywhere, as to prevent this kind of error.

After getting this error, what happens if you point your browser to /index.php?

Also can some give me their:

1) cacti Web Root
2) Web Server Document Root

Normally this error will reveal where functions.php is being called from... I have no idea why it is not here. I am curious to see if it is the installer or a Cacti include causing this error.

-Ian
blacksky

Fatal error: Cannot redeclare title_trim

Post by blacksky »

cacti web root = c:\webroot\cacti

web server document root = c:\webroot

Thanks
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Re: Fatal error: Cannot redeclare title_trim

Post by raX »

blacksky wrote:cacti web root = c:\webroot\cacti
Should be: /cacti
blacksky wrote:web server document root = c:\webroot
Should be: c:/webroot

Make sure to clear your poller cache under utilities after making this change.

-Ian
Mike R.

Post by Mike R. »

raX wrote:This is confusing... I am using PHP's include_once() function everywhere, as to prevent this kind of error.

After getting this error, what happens if you point your browser to /index.php?

Also can some give me their:

1) cacti Web Root
2) Web Server Document Root

Normally this error will reveal where functions.php is being called from... I have no idea why it is not here. I am curious to see if it is the installer or a Cacti include causing this error.

-Ian
Pointing the browser to /index.php results in the same error. Actually, pointing the brower to any .php file in that directory gives the same error.

Cacti web root is /cacti
Web server document root is d:/apache/apache2/htdocs

Thanks!
Kluso
Posts: 2
Joined: Tue Jan 21, 2003 5:32 pm

Cannot redeclare title_trim()

Post by Kluso »

I checked my settings table and the values look correct but the problem persists.

Code: Select all

name	        value
-------------  --------------
path_webcacti  /cacti
path_webroot	C:/htdocs
blacksky

Fatal error: Cannot redeclare title_trim

Post by blacksky »

My settings table look ok also with the correct data.

Still same error...

Also what is poller cache and how can i clear it?

Thanks[/img]
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

This is weird... everyone can reproduce this error but me it seems. I am testing this on a Win2k box with Apache and PHP 4.3.2. Can someone send me their php.ini file?

-Ian
Mike R.

Post by Mike R. »

Just sent you a copy of my php.ini file....

Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests