Closed (duplicate)
Project:
Drupal core
Version:
7.12
Component:
php.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2012 at 04:26 UTC
Updated:
1 Mar 2012 at 06:06 UTC
After a upgrade from D6 to D7, newest versions as of today's date, the following errors return while the PHP Filter module in core is enabled:
Notice: Use of undefined constant user - assumed 'user' in eval() (line 2 of /Users/sean/dev/icateens_d7/modules/php/php.module(80) : eval()'d code).
Notice: Use of undefined constant user - assumed 'user' in eval() (line 2 of /Users/sean/dev/icateens_d7/modules/php/php.module(80) : eval()'d code).
Notice: Use of undefined constant user - assumed 'user' in eval() (line 2 of /Users/sean/dev/icateens_d7/modules/php/php.module(80) : eval()'d code).
I've got all the blocks and views disabled, all the contributed modules switched off, Bartik/Seven as the themes. I've certainly not got any special PHP code in the nodes that are active at this time and I've searched the node tables for PHP snippets that would demand weird stuff. I had this open, but have brought the issue here since it might get noticed better.
Comments
Comment #1
heine commentedComment #2
philsward commentedOk, so where the hell's the duplicate?
Comment #3
seaneffel commentedHeine means this one. Follow up there: http://drupal.org/node/1419936
Comment #4
philsward commentedSorry bout that being brash... This page is the one that appears to be SEO'd in google...
If you don't have any custom PHP filtering that you need to worry about, I think I figured out how to fix it. It has to do with the core "PHP Filter" module being enabled.
1) Go to "Configuration -> Content Authoring -> Text Formats"
2) Disable "PHP Code" (At least that's what I had)
That should fix the error! When I disabled the "PHP Code", it completely disappeared and all was right with the world.
For good measure, I disabled the "PHP Filter" module, uninstalled it and re-enabed it. IF YOU DO HAVE CUSTOM PHP CODE, you "might" try disabling the code thingy mentioned above, (backup your database) then enable the "PHP evaluator" or create a new php filter with the php evaluator enabled.