Installation - then what?

nursejeff wrote on Sunday, December 21, 2014:

I need help please.

I want to change my server to a Windows based server.

I bought a new computer with Win 7 Pro, lots of memory and storage etc.

I downloaded and installed OpenEMR 4.1.2 XAMPP Package Installation, did the upgrade and security fixes, etc.

Now on this computer I can go to http://localhost/openemr and OpenEMR works. Fantastic!

Can someone please guide me to the instructions to import the database (everything I need from the old to the new) I am presently using from my older Linux server?

Can someone please guide me to the instruction to set up this computer as the web server once all data is in place?

Thank you so much.

Jeff Guillory
NP Health Clinic
Lumberton, TX

nursejeff wrote on Sunday, December 21, 2014:

I followed the instructions found below at:

http://www.open-emr.org/wiki/index.php/Windows_OpenEMR_Restore_using_emr_backup.tar

but am getting the error code " #1045 Cannot log in to the MySQL server" when trying to log into phpMyAdmin.

Now stuck. Any suggestions?

Jeff

nursejeff wrote on Sunday, December 21, 2014:

Got it.

Removed the password completely.

By default, there is no password.

Jeff

nursejeff wrote on Monday, December 22, 2014:

Not able to import the database. First I got the error that database was too big. Added an UpLoadDir and then got the following error:

Error

SQL query:


– Table structure for table addresses

DROP TABLE IF EXISTS addresses ;

MySQL said: Documentation
#1046 - No database selected

I’ve been working on this for hours. Any help would be appreciated.

Jeff

nursejeff wrote on Monday, December 22, 2014:

OK success,! I thought. Went to localhost/openemr on browser and got this error:

ERROR: query failed: SELECT * FROM lang_definitions JOIN lang_constants ON lang_definitions.cons_id = lang_constants.cons_id WHERE lang_id=? AND constant_name = ? LIMIT 1

Error: Table ‘openemr.lang_definitions’ doesn’t exist

This error was in php_error_log:

[21-Dec-2014 19:11:51 America/Chicago] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 41602048 bytes) in C:\xampp\phpMyAdmin\libraries\Error.class.php on line 172

This is line 172: );

Any thoughts?

Jeff

nursejeff wrote on Monday, December 22, 2014:

Oh, by the way.

Here are a couple of errors I have made thus far:

1.  When logging into phpmyadmin, the user name should be root not admin and you will need the adminstrators password.   You can log into phpmyadmin with user "admin" without a password but you will not have access to what you need.
2.  When choosing the database you wish to import into, you have to click on the word, openemr, not the circle next to the word, openemr.  Clicking on the circle does not choose the database.

I hope this will help someone.

Jeff

visolveemr wrote on Monday, December 22, 2014:

Hello Jeff

Try changing the memeory_limit variable in your php.ini file as 512M from 128M. This could help in executing the import of database without errors.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com
Demo’s @ ViSolve Demo Library

nursejeff wrote on Monday, December 22, 2014:

Hi ViSolve,

I solved the memory problem by adding: $cfg[‘UploadDir’] = ‘c:\xampp\tmp’; to the config.inc.php file. I put the openemr.sql file in c:\xampp\tmp and it uploaded it.

I increased the memory in the php.ini file as you suggested above to 999M, but it still did not work, so I tried the other route.

I think I got it uploaded since there were no error messages but openemr would not open giving me the following error message:

ERROR: query failed: SELECT * FROM lang_definitions JOIN lang_constants ON lang_definitions.cons_id = lang_constants.cons_id WHERE lang_id=? AND constant_name = ? LIMIT 1

Error: Table ‘openemr.lang_definitions’ doesn’t exist
This error was in php_error_log:

[21-Dec-2014 19:11:51 America/Chicago] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 41602048 bytes) in C:\xampp\phpMyAdmin\libraries\Error.class.php on line 172

Will increasing the memory in the php.ini file to 999M cause any problems?

Jeff

fsgl wrote on Monday, December 22, 2014:

Does not appear that the sql dump file was properly imported.

To import via the command line, there are 3 options.

  1. if the MySQL root password, from the Linux database, is known; try this.
  2. if the MySQL root password has been lost, follow this to reset & try import again.
  3. if 1 & 2 failed, run these commands with username=openemr & password found in var/www/openemr/sites/default/sqlconf.php.

If there continues to be a fatal error message about allowed memory, take Visolve’s suggestion about 512M.

The path to php.ini is different for Windows. Although this guide is for changing timezones, it can be used for memory_limit.

fsgl wrote on Monday, December 22, 2014:

Allura “decided” that I’m not a spybot after all.

Above post had been awaiting moderation.

nursejeff wrote on Monday, December 22, 2014:

I will change my memory from 999M to 512M and see if that does the trick.

Jeff

nursejeff wrote on Monday, December 22, 2014:

No, I still the the same:

ERROR: query failed: SELECT * FROM lang_definitions JOIN lang_constants ON lang_definitions.cons_id = lang_constants.cons_id WHERE lang_id=? AND constant_name = ? LIMIT 1

Error: Table ‘openemr.lang_definitions’ doesn’t exist

Please help.

Jeff

fsgl wrote on Monday, December 22, 2014:

Will try to delete redundant posts resulting from spybot problem.

fsgl wrote on Monday, December 22, 2014:

If the MySQL root password has been lost, do this to reset it; use the new root password to run the commands in the above post.

fsgl wrote on Monday, December 22, 2014:

Error correction.

Credentials are from Windows, not Linux.

visolveemr wrote on Tuesday, December 23, 2014:

Hello Jeff

  1. First you may need to check the number of tables in openEMR. There may be possibility that, the table(lang_definitions) is missing. For your information the total number of tables in 4.1.2(Patch 7) should be 169.

  2. Try running the following commands, to check for correct privliges:
    C:> cd “C:\Program Files\MySQL\MySQL Server 5.0”
    C:> bin\mysql -u root -p mysql
    mysql> SOURCE share/mysql_fix_privilege_tables.sql
    After this restart the mysql service.

  3. Ensure that the php version installed in new windows server is same as version installed in the older linux machine

  4. Need to ensure the php.ini requirement are correct for openEMR 4.1.2 according to this link

  5. If none of the solutions works, try reinstalling the whole setup including the XAMPP package and OpenEMR.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com
Demo’s @ ViSolve Demo Library

nursejeff wrote on Wednesday, December 24, 2014:

Hi Visolve,

Thank you and fsgl for your continuing input while I solve this issue.

  1. There were only 63 tables in my openemr database - A-F.

  2. I ran the 2 commands as you mentioned above and got an “access denied” response to them both.

  3. The MySQL version on my Linux machine is version 5.1.58. The recent install on my Windows computer is Server version: 5.5.32.

  4. php.ini requirements were the same except for the file size limits that I increased to 512M.

Can you see any problems I am facing and and work arounds to these issues?

By the way, my openemrsql file is 672,535 KB in size (665MB). Would I increase the upload max filesize to greater than this number? So far we have been discussing 512M, but is that enough if I’m working with a 665MB file?

Jeff

visolveemr wrote on Wednesday, December 24, 2014:

Hello Jeff

You have only 63 tables in your database. It seems, the upload of the database was not completed successfully.

Try restoring your openemr.sql file using command prompt. You can follow either of the below steps: (This will not consider the memory limit). Drop your database and create it newly before doing these steps.

a. In Your XAMPP Control Panel click the “SHELL” button, which will take you to the console.
Here run the following command to import your backup database. (Provided you should know your mysql username and password)

mysql -u {username} -p {databasename} < {exact path to openemr.sql file}

[OR]

b. Open Windows Command prompt.
Here run the following commands (Provided you should know your mysql username and password)

cd C:\xampp\mysql\bin
mysql -u {username} -p {databasename} < {exact path to openemr.sql file}

Both (a & b) methods will import your database correctly.

Also try checking your Older OpenEMR version, the number of tables it have and also check whether the export of its database was done properly.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com
Demo’s @ ViSolve Demo Library

nursejeff wrote on Thursday, December 25, 2014:

Hey guys,

I have been trying relentlessly using the above commands to import my openemr.sql database.

The best I get is an “access denied” message. I have tried every username I know of.

What can I try next?

On my linux system I was looking for how many tables I had in the database. I don’t know where to look to find the answer. I use Webmin.

I increased the allotted upload size to 512M then to 1024M and I could still only load 63 tables using myphpadmin.

I am about ready to uninstall everything and try again.

Got any other thoughts? My biggest concern is why I can’t import the database manually.

Help.

Jeff

nursejeff wrote on Thursday, December 25, 2014:

Oh, and Merry Christmas to all.

Jeff