OpenEMR 2.8.1 + XAMPP on WinXP Pro Problem

ajonate wrote on Thursday, April 17, 2008:

I have been working on developing a recipe for installing OpenEMR 2.8.1 + XAMPP 1.4.16 on Windows XP Pro. I appear to have overcome the last of the installation issues, primarily due to inherent XAMPP 1.4.16 problems (virus payload, fouled-up paths in conf files, etc.).

At any rate, OpenEMR seems to be operating just fine for the most part, except for when I click on either "billing" or "reports" on the main page, in which case I get the following error (identical error for both billing and reports):

Fatal error: Cannot redeclare sqlconnect() (previously declared in c:\xampp\htdocs\openemr\library\sql.inc:24) in C:\xampp\htdocs\openemr\library\sql.inc on line 24

I’m also getting a different error when I try to add a new patient. I guess my install is worse than I thought. Here’s the error:

Fatal error: Cannot redeclare strterm() (previously declared in C:\xampp\htdocs\openemr\interface\globals.php:165) in c:\xampp\htdocs\openemr\interface\globals.php on line 165

ajonate wrote on Saturday, April 19, 2008:

In another attempt I tried to install OpenEMR 2.8.3 + XAMPP 1.4.14, still on WinXP Pro. The reason I selected XAMPP 1.4.14 is because it matches the exact Apache & MySQL versions used in the 2.8.3 Virtual Machine (Apache-2.0.54 and MySQL-4.1.12).

Again the installation seemed to go fine, creating the databases with no errors. This time I couldn’t even get the login page. I received the same error I was getting above instead of the login page.

Fatal error: Cannot redeclare sqlconnect() (previously declared in C:\xampp\htdocs\openemr\library\sql.inc:24) in c:\xampp\htdocs\openemr\library\sql.inc on line 24

ajonate wrote on Sunday, April 20, 2008:

Never mind. I figured it out.

drbowen wrote on Monday, April 21, 2008:

Dear ajonate:

I have posts similar to this 12-18 months ago.  I thought it had to do with the path (Windows sometimes needs double slashes to read this path correctly.)

Generally the exact versions of Apache, PHP, MySQL don’t matter that much and OpenEMR runs with any of them.

Would you post your solution here for those who may have a similar problem in the future?

Sam Bowen, MD

ajonate wrote on Monday, April 21, 2008:

Thank you for your reply.

Indeed, I believe you are correct about the path. Instead of using double back-slashes in the globals.php file for the $webserver_root path, use single forward-slashes to make the path work properly.

The recipe for Windows Server 2003 posted at the oemr.org Windows howto page is much closer to the mark than the original Windows XP howto. By gleaning a little information from both howto guides I eventually found a way to make it work, but my ultimate goal was to create an “idiot proof” install script that can install OpenEMR on Windows XP Pro quickly and easily. I believe I have finally done that. I have created a CD that installs Apache, MySQL, and OpenEMR 2.8.1 on Windows XP Pro automatically in less than 10 minutes using a single batch file. I haven’t tested my CD on Windows Server 2003, but since Server 2003 has file permission and native web server issues that don’t exist on Windows XP, I suspect that adjustments would need to me made to make it work for Server 2003.

The problems with xampp 1.4.16 are severe, but not insurmountable. The first problem with xampp 1.4.16 is that by default the installer will place xampp in the “c:\program files” directory, but the conf files for Apache expect to find Apache in the “c:\xampp\apache” directory. The result is that the Apache service can’t start when using the default path that’s provided during installation. The installer also won’t allow the c:\ directory to be specified without putting a space after it (like "C:\ "), but it will work fine with the space. I toyed with the idea of modifying the Apache conf files instead, but it soon became apparent that it was going to be a lot easier to simply change the install directory.

Another problem with xampp is that the 1.4.16 and 1.4.15 xampp files at SourceForge contain a virus payload. AVG Antivirus reports that the phpcli.exe file located in the \xampp\php\php4\ directory carries the PSW.Legendmir trojan. That’s a password logger that’s not particularly dangerous from a damage standpoint, but it is a security risk. The good news is that AVG can heal it, leaving behind a phpcli.exe file that still works well. Therefore, I didn’t use the xampp installer for my CD, since I needed to heal the virus before CD distribution.

I don’t have a good explanation for the radical behavior differences between the oemr.org Windows howto pages and the reality of xampp 1.4.16 today, but it’s evident that the xampp 1.4.16 files at  SourceForge today are not the same files that used to be there. However, by healing the virus and installing in the proper directory, xampp 1.4.16 works well and is probably the most stable solution for OpenEMR 2.8.1.

Once everything (including OpenEMR) is installed and running properly, the entire c:\xampp directory structure  can be saved for the purpose of copying it to a different computer to create another server machine. After copying the directory structure to a new machine only a couple of things need to be done to get it running.

1) Install mysql-connector-odbc-3.51.12-win32
2) Run the service installation batch file in c:\xampp\apache
3) Run the service installation batch file in c:\xampp\mysql\

The batch file I’ve written automates the copy process and the above tasks. The batch file also copys a shortcut for the xampp-control program and a “getting started with OpenEMR” help file to the desktop. The batch file includes a number of comments as well, so when the install process is finished the user is instructed to open his web browser, navigate to http://localhost/openemr, and login using the default username & password.

From the reading I’ve done it’s become clear to me that practitioners are faced with the choice of either becoming Linux jocks themselves or paying thousands to a consultant for an OpenEMR installation. The Virtual Appliance is a terrific product from an installation standpoint, but still no escape from Linux and a terribly bloated environment. The install I propose only uses about 250 megs of hard drive space, about 50 megs of memory (7 for MySQL + 40 for Apache), and runs nicely on even a 1 GHz Pentium III machine. Moreover, anyone with minimal computer experience can administrate a Windows XP OpenEMR server, and it really isn’t too much to ask to expect an office receptionist or nurse to do so.

Now that I have a simple OpenEMR install method, it would be extremely valuable to find a way to include FreeB and SQL-Ledger in a Windws XP installation. In the meantime Windows users are stuck with an OpenEMR-only installation and need to locate a third-party billing product.

drbowen wrote on Tuesday, April 22, 2008:

Dave Kennerson has been working on this as well:  http://sourceforge.net/forum/forum.php?thread_id=1985042&forum_id=202506

When I wrote the Windows 2003 Server HOWTO I did not have any trouble with file permissions.  All I had to do was to turn off IIS.  This was necessary because both web servers want to use port 80.

Generally, after having installed OpenEMR over, and over, and over again, I have not found an OS that I could not install OpenEMR and get it working (This excludes Microsft “Home” versions since they don’t have the drivers to run Apache or PHP).

I have not tried OpenBSD, but it has been a challenge for others before for the same reason, many of the drivers have been left out (albeit for significantly different motivations).

We are trying hard to get rid of FreeB.  There is only one more piece that needs to be completed before FreeB is totally obsolete, the code needed to generate paper claims on a HCFA 1500.  I would not spend a lot of time trying to solve this because FreeB will go away.

We are trying to maintain compatibility with SQL-Ledger to maintain backwards compatibility for those who have used SQL-Ledger in the past.  The current goal is to move forward with an Apache, MySQL, PHP practice management module inside of OpenEMR without resorting to third party solutions like SQL-Ledger.

Getting SQL-Ledger working means installing PERL, PostgreSQL and SQL–Ledger.  In particular, PostgreSQL is usually the most difficult to get installed and working.  The need to install and maintain two different SQL databases is at best "a pain." Solutions proposed previously revolved around creating a Windows installer with Cygwin then add all of the pieces.  However, this is not an easy task.

The addition of an Apache, MySQL, PHP practice management module inside of OpenEMR would mean that you have already solved the Windows installation problem.

OpenEMR was created by Linux idealists who want to convert the world to Linux.  The fact that OpenEMR works just fine on Windows has more to do with the strength of the Apache, MySQL and PHP development teams.  The are a huge number of MS Windows users out there who would love to have easy access to OpenEMR. 

The biggest factor that has slowed down this type of deployment is that there just haven’t been as many quality MS Windows admins who are willing to support OpenEMR in the Windows world.  There have been MS Windows admins who can and do install on Windows servers but there has been a serious derth of sysadmins who can and will provide commercial support.

Sincerely,

Sam Bowen, MD
http://www.oemr,org/