Smarty Error when accessing Practice Settings

hukutas wrote on Monday, April 03, 2006:

I am currently using

Win XP Pro
xampp-win32-1.4.13
OpenEmr 2.8.1
Mysql 4.1
PHP 5

I followed the install directions @
http://www.oemr.org/modules/wiwimod/index.php?page=MicrosoftWindows&back=WiwiHome

I did edit the php.ini file
magic_quotes_gpc = off

However when I select the "Practice Settings" link I receive the error

Warning: Smarty error: unable to read resource: "C:xampp\htdocs\openemr/templates/practice_settings/general_list.html"
in C:\xampp\htdocs\openemr\library\Smarty.class.php on line 1103

also when I go into a patient file I see

Medical Problems(More)
diabetes

Allergies(More)
penicillin

Medications(More)
Metformin

Surgeries(More)

Dental Issues(More)

Immunizations(More)

Prescriptions
Warning: Smarty error: unable to read resource: "C:xampp\htdocs\openemr/templates/prescription/general_block.html"
in C:\xampp\htdocs\openemr\library\Smarty.class.php on line 1103

What seems incorrect to me is the path "C:xampp\htdocs\openemr/templates/practice_settings/general_list.html"
However I am not sure how to correct this, any help would be greatly appreciated. As a note the path is correct
but the mix of forward and back slashes seems wrong to me.

Thanks for any help.

physmed wrote on Monday, April 03, 2006:

I have been using openemr on my WinXP machine for a few weeks now for testing purposes to see if I like it and I can tell you that you have to use the PHP set applet under XAMPP to reset the PHP version back to 4 before it will work properly under Windows.  Hope this helps.

hukutas wrote on Monday, April 03, 2006:

Yup, DId that with install as well, however I just tried to stop Apache and run it again to ensure I switched 4 and it is set to 4…

Still same issue, any other ideas?

(And Thanks for the post)

physmed wrote on Monday, April 03, 2006:

OK did you follow Sam Bowen’s install notes from XOOPS that says to turn off magic quotes in the php.ini file, generate 2 new directories, and lastly set $TABLE AS a,$CATTABLE AS b in the pnuserapi.php file to ($TABLE a, $CATTABLE b)which I picked up from another error thread of unknown column ‘a.pc_aid’ in ‘on clause’. I know that it seems arcane but those changes seem to work.

hukutas wrote on Tuesday, April 04, 2006:

YEah I followed that originally, I just follwed it again to make certian I did not typo or overlook anything. All seems to be compliant with the directions.
But I still get the same error in Practice Settings and all the Prescription fields.

Warning: Smarty error: unable to read resource: "C:xampp\htdocs\openemr/templates/practice_settings/general_list.html" in C:\xampp\htdocs\openemr\library\Smarty.class.php on line 1103

Everthing else seems to be working correctly.

drbowen wrote on Tuesday, April 04, 2006:

I am not sure but I think the:

set $TABLE AS a,$CATTABLE AS b in the pnuserapi.php file to ($TABLE a, $CATTABLE b)

was referring to a MySQL 5.0 fix?

Physmed - are you using OpenEMR 2.8.1?

I agree that the mixing of the MS Windows style and Unix style slashes does not look correct.  This may not be what is generating the error.  Do you know where the Apache error log is? Checking this log for PHP errors may be more informative.

Usually SmartyClass errors are related to the Calender and do not normally affect the Practice Settings and the Prescription areas.  This error may be occurring due to changes introduced in 2.8.1.

If Rod is listening in,  What code in the Practice Settings and the Prescriptions call a SmartyClass process?  (I thought we were getting away from SmartyClass calls?)

Sam Bowen

sunsetsystems wrote on Tuesday, April 04, 2006:

Several areas of OpenEMR have always been based on Smarty including prescriptions, practice settings, documents and some encounter forms.  There is some related code in the "controllers" and "templates" directories.

Nobody is writing new Smarty-based code, however the legacy remains.

By the way in the error messages mentioned above there seems to be a missing slash after "C:".  Perhaps $webserver_root in globals.php is missing this?

– Rod
www.sunsetsystems.com

physmed wrote on Tuesday, April 04, 2006:

In answer to Sam Bowens question yes I am using 2.8.1.  Rods thread about the global.php file may bear some fruit because I have inadvertantly found typos of my own doing that at first glance looked correct that were wreaking havoc with the settings.  By the way has anyone been able to successfully change the date format from year-month-day to the one we use by default in the US of month-day-year?  I tried changing the country code but that didn’t seem to have any effect at all.

sunsetsystems wrote on Tuesday, April 04, 2006:

Most places in OpenEMR that accept dates will understand month/day/year input format, or day/month/year format in the case of a non-US telephone country code in globals.php.

The display format of year/month/day is used because it is unambiguous regardless of locale; however it is certainly reasonable to add options for other display formats.

– Rod
www.sunsetsystems.com

hukutas wrote on Tuesday, April 04, 2006:

(By the way in the error messages mentioned above there seems to be a missing slash after "C:". Perhaps $webserver_root in globals.php is missing this?)

Yes funny thing about that, originally when I was editing the global.php file I did use the standard C:\ and the calendar didn’t work, some sort of openemr error, Then I tried Just C: without the slash and the calendar worked.

I will mess around with it a bit more, but that is why the error message above was missing the slash.

I will also check the logs, if I figure it our I will post it, however any additional ideas from anyone would be helpful.

Thanks everyone for posting I really do appreciate everyones participation.

drbowen wrote on Tuesday, April 04, 2006:

I would not assume that the C:\ is an OpenEMR problem. Most of us that use Windows get OpenEMR working by changing obvious config.php settings without ever having to modify OpenEMR code even by one line.

In fact having to hack the OpenEMR code a lot usually (possibly always?) means that the Windows configuration is either missing something (Windows 2000, XP Home) or that the xampp, Mysql 4, PHP 4 setup has not been done correctly. 

sunsetsystems wrote on Tuesday, April 04, 2006:

By the way I believe you can use either forward slashes or backslashes in PHP as Windows path separators; however be careful to escape backslashes  (e.g. "C:\\path\\to\\something") that are in double quotes.

– Rod
www.sunsetsystems.com

drbowen wrote on Tuesday, April 04, 2006:

I checked the configuration on my Windows 2003 Server.

The C:\xampp\htdocs\openemr\interface\config.php line reads:

$webserver_root = "C:\XAMPP\htdocs\openemr";
$web_root = "openemr";

The C:\XAMPP\phpmyadmin\config.inc.php reads:

line
#

092  $cfg[‘servers’][$i][‘auth_type’] = ‘http’;
093  $cfg[‘servers’][$i][‘user’]      = ‘root’;
094  $cfg[‘servers’][$i][password’]   = ‘yourmysqlsecret’;

drbowen wrote on Wednesday, April 05, 2006:

excuse me:

The C:\xampp\htdocs\openemr\interface\globals.php

sunsetsystems wrote on Wednesday, April 05, 2006:

> $webserver_root = "C:\XAMPP\htdocs\openemr";

You’re lucky that this works!  Some sequences starting with a backslash have special interpretations; see table 11-1 at:

http://www.php.net/manual/en/language.types.string.php

– Rod
www.sunsetsystems.com

hukutas wrote on Wednesday, April 05, 2006:

I haven’t tried (“C:\\path\\to\\something”) everything else mentioned in the posts I have tried all producing different errors. I will continue to look into a solution.

Thanks again to everyone

hukutas wrote on Wednesday, April 05, 2006:

I was reading another post by drbowen

(FreeB/SQL Ledger/OPENEMR w/ XAMPP on WinXP)

He had typed a line

(Don’t do all this work on something you don’t intend to use in production.)

I am going to use Windows Server 2003 PRO as the production server, I was setting it up on my XP PRO SP2 box just to make config changes.

I do intend to use Freeb and sql ledger, so I think I am taking that advice. I am going to setup my Prod server and get things working on it instead of wasting additional time on the XP Pro issue.

drbowen could you please tell me what versions you are using successfully on your Win 2003 Pro server for XAMPP, freeb, sql ledger, and openEmr?

Thanks again everyone.

drbowen wrote on Wednesday, April 05, 2006:

Windows 2003 Server Enterprise Edition (     Windows NT 5.2 build 3790)
XAMPP Version 1.4.13
PHP: 4.3.11
Apache/2.0.53 (Win32)
   mod_ssl/2.0.53
   OpenSSL/0.9.7c
MySQL 4.*

I have not been using FreeB/SQL-Ledger to do billing so I have not installed these on the above system.

My production server is Slackware Linux.  Actually, a pair of Linux servers that I mirror over the network.

I have installed OpenEMR on Slackware, Fedora Core  SUSE (before the sale to Novell) and Windows 2003 Server (Enterprise Edition).

I try to install each new version on at least Slackware as we release them.  I have not yet tested the install of OpenEMR 2.8.1 on the Windows 2003 Server.

The main reason I install on so many different systems is to make it easier (and more realistic) when I write the installation documentation. I also understand how difficult (and sometimes frustating) these installations can be.

I’m getting the itch to re-install on Windows 2003 Server to make sure there are no bugs creeping into the system, largely because of the trouble that you have been having.

I remain committed to maintaining a cross-platform System because I know how many Windows users and systems are out there.

Sam Bowen, MD

hukutas wrote on Wednesday, April 05, 2006:

Thank You

I am going to try and setup openEmr 2.8.1 like this:

Windows 2003 Server Pro
XAMPP Version 1.4.13
PHP: 4.3.11
Apache/2.0.53 (Win32) 
mod_ssl/2.0.53 
OpenSSL/0.9.7c
MySQL 4.*

"If I can find these installs"

Then I will devote my effort to getting all features to function correctly on this server. When I run into snags I will post on the board under the topic Windows 2003 - OpenEmr 2.8.1.

I noticed earlier you said most work is done in config.php with out modifying the openEmr code.
After I get this installed and working there are changes I want to make which will require I enter the openEmr code.

For Example on the calendar when you select a status for a patient in office, late, in exam room and so on they are marked on the calendar as simple symbols like < > @ or something like that.Of course I will look for Mods available first and post Mods I make in this area if that is acceptable.

To be honest I have never used Open source code before, I have always written my own and not really sure what I am allowed and not allowed to change or post.

Thanks Again

drbowen wrote on Wednesday, April 05, 2006:

I think from your discription above this is the XAMPP release that you are already using.  The only difference is that you are using Windows XP Pro and I am using the Windows 2003 Server (Enterprise edition).

From earlier posts their have been others using Windows XP Pro successfully without modifying any OpenEMR code.

This is not true of of Windows 2000 Pro and earlier Windows release.

That’s why I want to try the OpenEMR 2.8.1 release myself.