views:

536

answers:

1

Hi friends,

serious problem with an angry client :(

i have an issue about "Cannot redeclare variable" etc. i had a website working on PHP4 then moved to PHP5 and i have this error:

Fatal error: Cannot redeclare CSQLAdmin::$functions in /blabla/lib/sqladmin.php on line 45

I tried to clear the second declaration at the file, and it fix this issue but then gives another errors. Obviously sth about php 5 is not accepting sth php 4 does...

I think i need to activate some php functions via .htaccess to make PHP5 to accept redeclaring, but how? or any setting at php.ini.

Appreciate so much!!!!!!!

+2  A: 

What value does $functions have? Could it be that you are simply declaring $functions() twice in the same file - something PHP4 quietly accepted, if I remember correctly?

Pekka
it is not about coding actually. it is working very well at PHP4. If i try to make code compatible for PHP5, it looks not possible :( many old type coding... it is opensource software. somehow I need to make PHP5 accept re-declaring.
artmania
Declaring a function twice in the same body is wrong. You can't make PHP5 accept that. YOu just need to remove the first function declaration - it is not being used anyway.
Pekka