Upgrade instructions

gutiersa wrote on Tuesday, September 13, 2011:

I believe there is an error in the install file in the openemr directory:

Upgrading OpenEMR is currently done by replacing the old openemr directory with
a newer version. Copy the following file from the old version to the new
version:

  openemr/library/sqlconf.php to openemr/sites/default/sqlconf.php
openemr/includes/config.php to openemr/sites/default/sqlconfig.php

Ensure you copy your settings from the following old openemr
files to the new configuration files (we do not recommend simply
copying the entire files):

  openemr/interface/globals.php
  openemr/includes/config.php (if you have modified it)

I had I hard time upgrading cuz each time it kept sending me to the setup file, i actually some data (not much)

bradymiller wrote on Wednesday, September 14, 2011:

hey,

Here are upgrade instructions:
http://www.oemr.org/wiki/Linux_Upgrade_3.2.0_to_4.0.0

Note steps 4,5, and 8 which state to copy over the settings into the new sqlconf.php and config.php files (ie. do not recommend copying the entire file). Also note step 5 covers how to not get sent to the setup file after the upgrade.

(of course, the ubuntu packages will do this all for you automatically :slight_smile: )

-brady

gutiersa wrote on Wednesday, September 14, 2011:

I see, ty. cuz of the changes to oemr.org page I no longer know how to find above instructions. so I followed INSTALL file found in the openemr folder.

gutiersa wrote on Wednesday, September 14, 2011:

ty for the clarification

sandra

gutiersa wrote on Wednesday, September 14, 2011:

yes I should have checked the link above. It would have saved me a lot of time

I had already set up some of the globals stuff via admin

thanks again

sandra

bradymiller wrote on Wednesday, September 14, 2011:

Hi Sandra,
Thanks for pointing out the INSTALL file (I forgot about it). I just updated the INSTALL file and committed the changes to sourceforge.
-brady

OpenEMR

drjohnloes wrote on Wednesday, November 09, 2011:

I am a newbie trying to upgrade from 4.0 to 4.1 on xamp.  On step 4, I can’t find the variables to copy. when I open htdocs\openemr\library\sqlconf.php I get the following:

_<?php
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.

//  OpenEMR
//  MySQL Config
//  Needed by sql.inc

// Database parameters are now site-specific.
// $GLOBALS is set in interface/globals.php.
require_once $GLOBALS . “/sqlconf.php”;
?>
_

This is exactly the same as htdocs\openemr\sites\default\sqlconf.php  I must be doing something wrong pretty basic.

Also, on step 6 and 7, I do not get an option to “upgrade the data base”.  They are opening in notebook.  Again, probably basic mistakes.

Thanks, John

bradymiller wrote on Thursday, November 10, 2011:

Hi,

I am assuming you are using the following steps:
http://open-emr.org/wiki/index.php/Windows_Upgrade_4.0.0_to_4.1.0

Sorry, that was a error in step #4, it should be:
4. Record the openemr/sites/default/sqlconf.php file variables from your old 4.0.0 version, and type these into the openemr/sites/default/sqlconf.php file in new openemr version

So, check the openemr/sites/default/sqlconf.php from your previous 4.0.0 version and then bring over the variables to the openemr/sites/default/sqlconf.php script in the new 4.1 version. The file should look like this (note, your variables will likely be different:

<?php
//  OpenEMR
//  MySQL Config
//  Referenced from /library/sqlconf.php.
global $disable_utf8_flag;
$disable_utf8_flag = false;
$host	= 'localhost';
$port	= '3306';
$login	= 'openemr';
$pass	= 'openemr';
$dbase	= 'openemr';
$sqlconf = array();
global $sqlconf;
$sqlconf["host"]= $host;
$sqlconf["port"] = $port;
$sqlconf["login"] = $login;
$sqlconf["pass"] = $pass;
$sqlconf["dbase"] = $dbase;
//////////////////////////
//////////////////////////
//////////////////////////
//////DO NOT TOUCH THIS///
$config = 0; /////////////
//////////////////////////
//////////////////////////
//////////////////////////
?>

Steps 6 and 7 will not work until you are done with steps 4 and 5.

-brady
OpenEMR Project

bradymiller wrote on Thursday, November 10, 2011:

Also, I changed the error in the upgrade instructions at:
http://open-emr.org/wiki/index.php/Windows_Upgrade_4.0.0_to_4.1.0

drjohnloes wrote on Thursday, November 10, 2011:

Hello, Thanks for the clarification.  Actually, when I opened openemr/sites/default/sqlconf.php, I got identical variables as you.  However, when I opened the clinic specific file: openemr/sites/ my clinic name/sqlconf.php I got a differrent variable for $pass.  Which I then copied to the 4.1 openemr/sites/default/sqlconf.php and then set $config = 1.

All is well until step 6. I was able to open sqlconf.php in mozilla but the only item listed in the drop-down menu for version choice was “$version” which  I could not  change to “4.0.0”.  I did see the upgrade button, which was great cuz it felt that I might be actually getting somewhere.  Interestingly, opening the file in IE (as I had been trying to do for the better part of a day) just defaulted to notepad and no drop-down menus or upgrade buttons.

Where do I go from here?

Thanks,
John

bradymiller wrote on Friday, November 11, 2011:

Hi John,

Sounds like a little bit of damage control may be in order here :slight_smile:

Since you are not using the ‘default’ directory, upgrading is a little different:
http://open-emr.org/wiki/index.php/OpenEMR_Multiple_Sites_Module#Upgrading

So I would revert openemr/sites/default/sqlconf.php back to its default values and then place the variables in openemr/sites/ my clinic name/sqlconf.php instead.

And now step 6 and 7 will be replaces with the following step from the above wiki page(note site_id is the my clinic name portion from above openemr/sites/ my clinic name/sqlconf.php:

Open admin.php in web browser (http://<server_name>/openemr/admin.php)
--If displayed, click 'Upgrade Database' for each site (and follow instructions)
Update the ACL access controls for each site:
--http://<server_name>/openemr/acl_upgrade.php?site=<site_id>

-brady

bradymiller wrote on Friday, November 11, 2011:

Hi,
To avoid this issue in the future, when have time, plan to incorporate this into the main upgrade instructions on the wiki.
-brady

bradymiller wrote on Friday, November 11, 2011:

Hi,
Also think it will be helpful to somehow incorporate all the upgrade_mysl/upgrade_acl/patch mechanisms and tracking into the admin.php script. This should avoid issues that seem to be arising with users that are not using the sites/default path on their installations.
-brady

drjohnloes wrote on Saturday, November 12, 2011:

Hi,
If anyone can tell me why I am not able to “see” my current version of openemr (4.0.0) as a selection option in openemr/sql_upgrade.php I would greatly appreciate it.
Thanks,
John

bradymiller wrote on Saturday, November 12, 2011:

Hi,
Are there any other options?
-brady

drjohnloes wrote on Saturday, November 12, 2011:

Hi,
Well I am not using a clinically active program, but I was trying to get a better handle before implementing the “real deal” in the clinic.  It’s just frustrating that I’ve tried everything I know how to do and still no go.  I did check out  version.php and the
$v_major, minor and patch  seem to be correct, ie =4,0,0 respectively.    Also, $v_database = 19 if this means anything? Actually tried a lot of things, but at the limit of what I know how to do (actually past the limit a bit, not too hard for me! :slight_smile:

If no one knows why $_version does not default to 4.0.0 , I will let it drop and move on, but I get kind of stubborn sometimes!

Thanks to all who got me this far!,
John

bradymiller wrote on Saturday, November 12, 2011:

Hi,

What xamp version are you using? (and are you using the xamp-openemr package?)

Also, are you seeing any other version options in the sql_upgrade.php or just $version?

-brady

bradymiller wrote on Saturday, November 12, 2011:

Hi,

Also, just FYI. The way that upgrade script works is that it scans the sql/* directory for the upgrade scripts to figure out which versions to offer to upgrade from. Doesn’t use the version.php script at all.

-brady

drjohnloes wrote on Saturday, November 12, 2011:

Hello,
Apache Friends XAMPP (Basis Package) version **1.7.3 **

  + Apache 2.2.14 (IPV6 enabled)
  + MySQL 5.1.41 (Community Server) with PBXT engine 1.0.09-rc
  + PHP 5.3.1 (PEAR, Mail_Mime, MDB2, Zend)
  + Perl 5.10.1 (Bundle::Apache2, Apache2::Request, Bundle::Apache::ASP, Bundle::Email, Bundle::DBD::mysql, DBD::SQlite, Randy Kobes PPM)
  + XAMPP Control Version 2.5.8 (ApacheFriends Edition)
  + XAMPP CLI Bundle 1.6
  + XAMPP Port Check 1.5
  + XAMPP Security 1.1
  + SQLite 2.8.17
  + SQLite 3.6.20
  + OpenSSL 0.9.8l
  + phpMyAdmin 3.2.4
  + ADOdb v5.10
  + FPDF v1.6
  + Zend Framework 1.9.6 Minimal Package (via PEAR)
  + Mercury Mail Transport System v4.72
  + msmtp 1.4.19 (a sendmail compatible SMTP client)
  + FileZilla FTP Server 0.9.33
  + Webalizer 2.21-02 (with GeoIP lite)
  + apc 3.1.3p1 for PHP
  + eAccelerator 0.9.6-rc1 for PHP
  + Ming 0.4.3 for PHP
  + PDF with pdflib lite v7.0.4p4 for PHP
  + rar 2.0.0-dev for PHP
  + Xdebug 2.0.6-dev for PHP
  + libapreq2 v2.12 (mod_apreq2) for Apache

Just $version
-John

bradymiller wrote on Saturday, November 12, 2011:

Hi,

Xampp 1.7.3 should be fine. Did you use the xampp/openemr package or install the xampp separately?

Looks like weirdness is happening (perhaps not compiling/executing) the php code or something like that.

What do you see when you go to directory above openemr. For example, instead of http://<server_name_or_ip>/openemr, go to http://<server_name_or_ip>/

Also, after you try to run the sql_upgrade.php script, what do you see on the last twenty or so lines in the following error log:
\xampp\apache\logs\error.log

-brady

-brady