Last updated November 12, 2009. Created by kanani on July 4, 2006.
Edited by forestmonster, kenorb, Francewhoa, LeeHunter. Log in to edit this page.
When using Drupal your browser returns the following error
Fatal error: Cannot redeclare blah_function() (previously declared in /modules/blah.module:blah) in ...blah... on line blah
Often occurs on:
- admin/modules
- admin/themes
- after modifying module or theme files
- after duplicating module folder
- after upgrading the module and forgot to remove old files
To fix this, select one of the possible causes listed below.
Comments
This can also be triggered by
This can also be triggered by opcode cachers like APC and a restart of your httpd and or php-fpm is require to remedy it.
Got Fatal error: Cannot
Got
Fatal error: Cannot redeclare phptemplate_init() in /themes/engines/phptemplate/phptemplate.engine...after installing eAccelerator. Managed to solve the issue by settingeaccelerator.filter = "*.engine"in php.ini and restarting apache. This setting exludes *.engine files from caching.Thanks, that appeared to be
Thanks, that appeared to be it for me
-------------------------------
also known as peach
Still running SooperThemes Premium Drupal Themes
Another cause in my case
I got this error after upgrading from php 5.2 to php 5.3. However I forgot to also upgrade xdebug library. In fact I thought I removed it from my php.ini but it wasn't. I realized this was the issue when looking at /var/log/apache2/error.log.
Anyway, that error disappeared when I upgraded xdebug.
drush is case sensitive when it comes to paths (!)
Beware - if you navigate to the project folder ignoring case then drush will throw a wobbly.
Reference: https://network.acquia.com/node/1473655
Hope this will save you banging your head against a brick wall for several hours like I did.
Kester Hynds
www.komoko.co.uk