OK, I am a Dummy. But

ideaman911 wrote on Wednesday, March 04, 2009:

I have posted a bunch of helpfuls.  It’s my turn.  In looking through the phpmyadmin stuff, as well as the …/openemr/sql/ stuff, it appears that each of the …_upgrade.sql files is a script.  I fully recognize that I can do all the steps shown manually.  But why would the “#If” and “#EndIf” statements be there?  Looking at the phpmyadmin html FAQ’s it says in the 6.?? (I can’t remember - gettin’ old :wink: to put an xx.sql file into the “Browse” box after selecting any database within the Admin - Database area, at the bottom of the “structure” display.

But I get errors immediately because the first instruction was already done in making 2.9.1 from 2.9.0 (I should note here that I am trying an "interim" version 3.0 as a Windows install, and the _upgrade.sql file still says 2_9_0-to-2_9_1_upgrade.sql, but it has some stuff which 2.9.1 does not have).

I know I am tripping over the solution, but I am blind to it.  Is there a simple PHP which can be called in the browser to run the .sql file(s), which should work in Windows?  Help.  I continue to learn, but I am losing a lot of time.

Joe Holzer

sunsetsystems wrote on Wednesday, March 04, 2009:

Yes, run sql_upgrade.php.  It greatly simplifies the upgrade process, and the #If and #Endif lines are in there to give it information that it needs.  As far as MySQL syntax is concerned, those are comments.

I have not tested it with WIndows, bit don’t see why it would not work.

Rod
www.sunsetsystems.com

ideaman911 wrote on Thursday, March 05, 2009:

Rod;

I will do so happily.  Where is it?  I cannot find it in any search of Xampp and its subdir’s.

Joe Holzer

sunsetsystems wrote on Thursday, March 05, 2009:

Should be in the openemr base directory.  I checked in it on 2008-12-18.

Rod
www.sunsetsystems.com

ideaman911 wrote on Thursday, March 05, 2009:

Rod;

Thanks, found it in the pre-3.  It somehow got left out of 2.9.1dev.

But it seems to me that process would need to be to run that with the new _upgrade.sql file but in the 2.9.1 setup, then copy all the mysql/data/gacl & openemr folders from 2.9.1 to the fresh install of 3.0.  Otherwise, where does it look for the existing data?  What do you do when asked for "existing" vs "create new", which crashed when I tried to go from 2.9.0 to the 2.9.1dev?  I also see no way the 2.9.1 databases would have problems with the added fields, tables, etc.

Still foggy.  But I’ll do some testing.  I gotta understand to help clients.

Thanks again.

Joe Holzer

sunsetsystems wrote on Thursday, March 05, 2009:

Not sure I got all that… but if you are upgrading, you generally don’t run setup.php.  The drill is something like this:

1. back up mysql, just in case
2. rename the old openemr directory to openemr.old
3. unpack the new release as openemr
4. copy over the old library/sqlconf.php
5. manually configure interface/globals.php and, if needed, includes/config.php and library/acl.inc
6. run sql_upgrade.php via the web browser
7. run acl_upgrade.php if you are using phpgacl
8. run sl_convert.php if you are converting from sql-ledger

I hope this helps…

Rod
www.sunsetsystems.com

rayaz wrote on Tuesday, March 10, 2009:

Hi

I followed all the steps Rod outlined but no success. I get locked out with "unauthorized login" at the login screen.
How do I get past that?

Rayaz

bradymiller wrote on Tuesday, March 10, 2009:

hey,
Could be related to php-gacl, which is now embedded in OpenEMR.  What version you upgrading from.  Did you have php-gacl installed in your previous version?
It should be simple to deal with if i know above information.  You can either turn php-gacl off or install with a couple commands on commandline in linux.  (I’d recommend installing it)
-brady

rayaz wrote on Tuesday, March 10, 2009:

Hi

I am upgrading from openemr 2.9.0, and I do have phpgacl 3.3.7 installed.

Thanks
Rayaz

bradymiller wrote on Tuesday, March 10, 2009:

hey,
I forgot to ask:
What version you were upgrading to (current cvs, rc1 etc.)?
OS is linux or windows?

Check out the header of your openemr/library/acl.inc file.  IF you have the following stuff there, then follow the instructions for an "external" version of phpgacl:

// php-GACL access controls are included in OpenEMR. The below
// function will automatically create the path where gacl.class.php
// can be found. Note that this path can be manually set below
// for users who are using an external version of php-GACL.
// Also note that php-GACL access controls can be turned off
// below.
if (isset ($GLOBALS[‘fileroot’])) {
  //normal use during OpenEMR
  $phpgacl_location = $GLOBALS[‘fileroot’] . “/gacl”;
}
else {
  //special case during OpenEMR and php-GACL install/upgrade scripts,
  //which are run from main OpenEMR directory.
  $phpgacl_location = “gacl”;
}
//
// If using an external version of phpGACL, then uncomment the following
// line and manually place the path below.  IN THIS CASE YOU MUST ALSO
// COMMENT OUT BOTH $phpgacl_location ASSIGNMENTS ABOVE, OR BACKUPS WILL
// NOT RESTORE PROPERLY!
//
//$phpgacl_location = “/var/www/gacl”;
//
// If you want to turn off php-GACL, then uncomment the following line.
// IN THIS CASE YOU MUST ALSO COMMENT OUT ALL $phpgacl_location ASSIGNMENTS
// ABOVE, OR BACKUPS WILL NOT RESTORE PROPERLY!
//
//unset($phpgacl_location);
//

rayaz wrote on Wednesday, March 11, 2009:

Upgrading to 3.0. Funnily enough, after mucking around, I can login using a regular user account but am locked out of an admin login!

ideaman911 wrote on Wednesday, March 11, 2009:

Riaz;

I think you can turn off all the GACL stuff, since the file locations and directory names may be different from your 2.9.0 setup.  The 3.0 has GACL as a sub to OpenEMR, whereas you may have defined as phpGACL and placed yours elsewhere.

Go to …/openemr/library/acl.inc  and comment out (//) the two lines which start with "  $phpgacl_location =  ", which will turn off your GACL for the time being.  Then assure you can login as an admin in OpenEMR.  If you cannot see all the headings except “ACL” from the Admin radio button, you will want to set the same acl.inc near line 106 to read " ‘write’ " instead of “0” for the “Super”.  That should allow you full access in OpenEMR without the overhead control of GACL.

Lastly, run …/gacl/admin/acl_admin.php to be certain you have someone defined there as an administrator who has login capability to OpenEMR.  Once that has been done, return to acl.inc and remove the (//) from the two lines.  You should now have the ability to maintain the ACL priveledges ONCE YOU HAVE CREATED A USER IN GACL from within OpenEMR.  Hope that helps.

Joe Holzer

rayaz wrote on Wednesday, March 11, 2009:

Commenting out the lines still doesn’t allow me admin login!

Rayaz