SimplePortal
Support => English Support => Topic started by: Aw06 on November 03, 2008, 08:51:04 PM
-
Getting this error in error logs .. it seems to be recent ...
8: Undefined index: color
File: /home/adrianw/public_html/forum/Themes/default/SPortal.template.php (eval?)
Line: 468
SP 2.0.4
SMF 1.1.6
Any ideas ?
can i just go delete line 468?
-
/me passes out
An undefined index?
Well, that's an eval error:
At times of debugging, errors come from files do not contain the said error in your Forum Error Log. This is caused by eval().
eval() is a PHP command that evaluates a string as PHP code. Since file_get_contents() (a function that is similar to file(), except that it returns the file in a string) returns the contents of a file as a string, SMF is granted accesability to pin down the specific syntax that is causing a parse error, and consequently outputs an error message showing you the code that is producing the problem.
eval() by default is turned on. The downside to that is PHP does not know where an undefined error occurred as the entire file was allocated as a string. By switching eval() off, SMF uses require() (or, more often, require_once()) to get the template file. This in turn lets PHP report the exact location of the error.
To disable eval(), open phpMyAdmin (refer to: What is phpMyAdmin? (http://www.simplemachines.org/community/index.php?topic=21919.0)) and click the SQL tab and use the following query:
REPLACE INTO smf_settings VALUES ('disableTemplateEval', 1);
By disabling eval(), the errors that have already occurred need to be propagated once again. The new errors that have appeared in the error log contain the correct file that PHP had a problem with.
To reactivate eval(), use the following query:
DELETE FROM smf_settings WHERE variable = 'disableTemplateEval';
This is what we call live testing Help Squad docs >:-D
-
Getting this error in error logs .. it seems to be recent ...
8: Undefined index: color
File: /home/adrianw/public_html/forum/Themes/default/SPortal.template.php (eval?)
Line: 468
SP 2.0.4
SMF 1.1.6
Any ideas ?
can i just go delete line 468?
Good Luck to find that line ;).
Did this error only appear once? Or did it appear from time to time? :)
Bye
DIN1031
-
by default, SimplePortal does not include a 'color' index in its codes. it would be better if you paste here the codes you use in your custom PHP blocks.
-
Good Luck to find that line ;).
Did this error only appear once? Or did it appear from time to time? :)
Bye
DIN1031
Happening since im running a php calender block, happens everytime someone looks at the portal
by default, SimplePortal does not include a 'color' index in its codes. it would be better if you paste here the codes you use in your custom PHP blocks.
hmmm, i think you right .. im running a calender php block ...
i cant post the code as its over the 2000 charactor limit ... but you can see the code im using HERE (http://www.tinyportal.net/index.php?PHPSESSID=4b256fb55d0a34bb21246a7d1ddcd900&topic=700.msg209073#msg209073)
-
site is being moved to another server from what i see. check the calendar block here (http://simpleportal.net/index.php?topic=89.msg4384#msg4384). i believe they are the same, but the one here is fixed.
-
Why are you using TinyPortal code?
-
it is just php codes. php block codes will work for everything that parses php.
-
site is being moved to another server from what i see. check the calendar block here (http://simpleportal.net/index.php?topic=89.msg4384#msg4384). i believe they are the same, but the one here is fixed.
ok thanks, works , will watch to see if errors go away .. gonna also post for help as i need the calender to show events and holidays as well
edit ........
error logs clean once again ..
-
Last update for this? Should we mark this as solved?
-
Last update for this? Should we mark this as solved?
yeah, pretty much solved