Urgently require help with one error

innocuous wrote on Monday, September 26, 2005:

HI,
I have installed Openemr on Windows but I am getting this error. Everything else seems to be working fine. Can someone please help me as I have to give a demo to a group of doctors day after tomorrow!
Registering a new patient:
When I click on new patient, it opens the page asking for name etc, but when I click on New Patient file it gives the following error:
----------
Fatal error: Cannot redeclare strterm() (previously declared in D:\xampp\xampp\htdocs\openemr\interface\globals.php:159) in d:\xampp\xampp\htdocs\openemr\interface\globals.php on line 159
Can any php expert please help out? I am using the latest XAMPP version for the install on windows 2000 server
Thanks

spyrosm wrote on Monday, September 26, 2005:

hi,

I think this happens because globals.php is included twice in your php file (I wonder though why this happens - what version of openemr are you currently using?).

To resolve this, open D:\xampp\xampp\htdocs\openemr\interface\new\new_patient_save.php and check whether the globals.php inclusion line (usually the first line in your php file) is:
include_once("…/globals.php");

if it is different than the above - maybe something like include("…/globals.php") - , then it is wrong. replace it with the right one (include_once statement).

hope this helps

nahoj1976 wrote on Monday, September 26, 2005:

I suggest you install it on a linux-machine instead. Then you can connect to it from windows using internet explorer if your doctors are afraid of leaving windows. A good simple solution could be a server with clarkconnect home edition installed on the server (free of charge). Then you get a mailserver and a webserver at the same time and it works very well with openEMR. It’s a lot faster than trying to make an experimental install work… And you get a more stable and safe solution.

innocuous wrote on Monday, September 26, 2005:

Hi,
I am using the latest version 2.7.1. All the files have include_once only and NOT include, therefore I am stumped as to why the error is coming. They are all lowercase also, so no case sensitive issues also.
Nahoj, I have to give a demo to the doctors and have  a laptop running windows. The doctors do not have internet connectivity therefore I was trying to run in windows just for demo. The production server I can run on linux once the project is approved.
Any other suggestions please?

innocuous wrote on Monday, September 26, 2005:

Hi,
I am using the latest version 2.7.2. All the files have include_once only and NOT include, therefore I am stumped as to why the error is coming. They are all lowercase also, so no case sensitive issues also.
Nahoj, I have to give a demo to the doctors and have  a laptop running windows. The doctors do not have internet connectivity therefore I was trying to run in windows just for demo. The production server I can run on linux once the project is approved.
Any other suggestions please?

nahoj1976 wrote on Monday, September 26, 2005:

I might sound stubborn but as I am a doctor myself I know what bad situation you get in if you demonstrate a system that is not working.

I would suggest then that you made a dual-boot on the laptop and made a simple linux-install. It doesn’t take much time and the only thing to think of is to make sure it wont install php 5.0 If you choose e.g. suse it will install in less than an hour and then you can get it running.

Those ‘small’ errors could be very, very hard to solve. I struggled for quite some time, making adjustments until I thought everything worked fine in a system with php5 but then I opened a new module and nothing worked. And when I looked at the code it seamed to be compatible both for php4 and php5 but the errors where there…

In sweden we have a proverb saying: ‘Never despise small wounds or pour friends.’ I think one could add ‘… small errors.’ to that too…

Good luck!

drbowen wrote on Monday, September 26, 2005:

Dear Innocuous,

Have you converted the XAMPP to PHP 4?  The PHP 5 is not supported in Windows or in Linux.

The errors you are describing are more likely related to the way Windows treats the paths.  Debugging a Windows installation can take weeks to months.  The person who has done the most about this is Sankar Srivatsa. 

He has posted here frequently in the past with many of these same issues.  He was able to successfully get a Windows installation fully functional.  Most of the problems are getting the FreeB and SQL-Ledger working correctly.

These problems don’t happen in a Linux install.  If you are in a big time crunch you should seriously consider using a Linux server intall.  The demonstration can be executed from either  a Windows or Linux workstation.

The performance of the server is a lot better if the Xwindows is turned off.  This is not possible in MS Windows but is a routine thing for Linux/Unix servers.  So a client - sever install gives better performance  than a laptop installation which is running as both server and client.

spyrosm wrote on Monday, September 26, 2005:

frankly I am forced to disagree here :frowning:
I have managed to install version 2.7.2 on a WinXP professional machine in IIS 5.0.

It only needed a php4 installation (fairly easy), and some minor bug corrections (in terms of functionality) derived from the php code itself, and not from the Windows OS.

just make sure you follow ALL instructions contained in the INSTALL file.

Innocuous, if the includes are fine, then maybe this is an installation issue (maybe php version??- I currently  use php 4.4.0 ). Confirm one by one the instalaltion steps.

innocuous wrote on Monday, September 26, 2005:

Thanks for the feedback. I installed the latest version of Xampp and chose php.4.4.0.
Everything else seems to work except this error.
I have even installed on shared linux hosting and that works perfectly.
I guess a dual boot option is what I will have to look for now since no solution seems coming for the redeclare error. We are looking to run the client and server both on the same machine, as internet connectivity is an issue here. Most of the clinics will be small, so even networking will just increase costs.  The main point of implementing an Open source EHR is to improve quality of healthcare AND decrease costs in the first place.
I still hope someone will be able to spot the error and rectify! :slight_smile:
Btw spyrosm, could you please forward me the link for the IIS install? I tried that initially but gave it up due to the inumerable errors that resulted!
Cheers

andres_paglayan wrote on Monday, September 26, 2005:

not sure if this will work as a quick fix since I haven’t tested it, but you could try turning buffering on on the php.ini file,
set output_buffering=On (about line 94)
and restart apache if php runs as a module,

innocuous wrote on Monday, September 26, 2005:

Unfortunately for me output_buffering is On already
:frowning:
I even tried doing a fresh install of xampp…no luck.

innocuous wrote on Monday, September 26, 2005:

Hi all!
Well I have tried to fix it by analysing what is being called and I did this:
1) To fix practice settings page showing blank:
In Controller.php
Replace
require_once(“library/classes/Controller.class.php”);
With
require_once ($GLOBALS[‘fileroot’] . “/library/classes/Controller.class.php”);
2)Reports link was giving sqlconnect error so I simply deleted the require once from the /reports/index.php file
REMOVE require_once (dirname(__FILE__) . “/…/…/library/sql.inc”);
3)To get the new patient to work I had to remove the globals.php include and replace with
$webserver_root = “d:/xampp/htdocs/openemr”;
$GLOBALS[‘srcdir’] = “$webserver_root/library”;
This was done in two files…new_patient_save and patient_file.php.
Now it seems to work
Billing is still showing sqlconnect error, but I guess I’ll be able to solve that too with a lil more time
I just hope this doesn’t create problems elsewhere!
Hope this helps someone out there who’s been having problems with Windows
Take care

drbowen wrote on Monday, September 26, 2005:

Dear spyrosm,

Do you have billing working with Microsoft Windows XP, XAMPP and IIS?

I have not tried connecting the Windows to SQL Ledger and had heard that we needed to use WAMP instead of XAMPP?

innocuous wrote on Thursday, September 29, 2005:

Another update,
I tried installing on Windows XP and everything worked right out of the box (doing the few minor changed for windows install)
I wonder why it works on XP and not on 2000 advanced server. Any ideas anyone?

drbowen wrote on Thursday, September 29, 2005:

Would it be fair to say in our installation materials that OpenEMR seems to install better on Windows 2003 server and XP but that installations on Windows 2000 server may be problematic?

When I installed on Windows 2003 everything seemed very smooth with no problems.  Though I did not test it fully the innocuous has has on 2000.

jimbo456 wrote on Thursday, September 29, 2005:

I think the biggest problem is most Developers don’t have dual servers to test on. ie Linux/Server 2003. (Could it be the price of an Windows Advanced 2003?) I will be freeing up an XP machine shortly to do Windows testing on but it still isn’t Advanced 2003. I believe the later versions of PHP and MySql were designed with XP and Server 2003 in mind. It would great if we could get the Windows version of rpm for install. The term excapes me but I have used one in the past for installing PHP ect. 

Jim

sankar1234 wrote on Thursday, October 06, 2005:

When I installed on 2000 and XP, I didn’t have any problems.  I haven’t tried on windows servers.

innocuous wrote on Wednesday, October 19, 2005:

XP Pro everything works perfectly…
XP home same redeclare errors
Any suggestions???

innocuous wrote on Wednesday, October 26, 2005:

I guess noone is interested in windows port.
Will try to solve on my own
Thanks neways

andres_paglayan wrote on Wednesday, October 26, 2005:

Hi,

Let me apologize if you felt abandoned in this one.

It is by quoting an excerpt from your posting: The main point of implementing an Open source EHR is to improve quality of healthcare AND decrease costs in the first place., that I would suggest you to buy a PIII Compaq Deskpro EN, they are selling in ebay for about $30. They are extremely Linux friendly and installing any distribution there is a breeze.

If you are new to Linux and that scares you a bit, let me say that today things are much easier than they where before. Any Ubuntu, Mandriva, Fedora, or Debian will install from a free download, or from a $3 CD [osdic.com] without any kind of problem in such machine.

Then, with this environment you will be able to use all features in OpenEMR.

If you don’t have networking just add a RJ45 Ethernet network switch for about $10 and up.

Total cost won’t exceed $50 for a fully working electronic medical record server, which is half the price of an XP home license. And you can even run scripts from the contrib folder that will automatically backup your system, send faxes and bulk email (feature in the CVS).

If you still don’t feel as tackling the Linux install, check for a Linux user group in your area, if you bring the machine to them, they will surely complete the install in half hour, and most of times for free.