Page 1 of 1

Fatal error: Using $this when not in object context ....

PostPosted: 24. August 2005 06:56
by reenyg
Hi,

The following error shows up while testing OpenEMR 2.7.2 ( http://sourceforge.net/projects/openemr/ ) on XAMPP 1.4.14

Code: Select all
Fatal error: Using $this when not in object context in /opt/lampp/htdocs/openemr/interface/main/calendar/modules/PostCalendar/pnincludes/Smarty/plugins/function.eval.php on line 23


Any help to solve this problem will be greatly appreciated.

Thanks

Reeny

PostPosted: 24. August 2005 14:34
by Dave_L
Are you running PHP 5? PHP 5 is stricter than PHP 4 about the use of $this.

I downloaded OpenEMR 2.7.2, and saw that it's using a very old version of Smarty (2.3.1, released 2002-11-19), which probably isn't compatible with PHP 5. The current version of Smarty is 2.6.10.

You can determine the Smarty version by looking at the value of $_version in Smarty/Smarty.class.php.