No documents

duanemorrow wrote on Tuesday, March 13, 2007:

Upgrading from 2.8.2-dev to 2.8.2

Have the system up except for patient documents are not showing up in openemr.
The files are in the documents dir, and the info is in the database.

made backup                    mv openemr openemr282
installed the new openemr
restored mysql openemr database
removed new documents dir       rm -r /var/www/localhost/htdocs/openemr/documents
moved backup documents dir   mv /var/www/localhost/htdocs/openemr282dev/documents /var/www/localhost/htdocs/openemr/documents

all the documents are now in openemr/documents
the documents table has the files listed  for example
id=3327
url=file:///var/www/localhost/htdocs/openemr/documents/90/xr001.jpg
foreign_id=90

If I go to patient 90 there is no associated listed document.

andres_paglayan wrote on Tuesday, March 13, 2007:

it might be not enough info,
what about permissions?

duanemorrow wrote on Tuesday, March 13, 2007:

I set chown apache:apache -R openemr/documents
I set chmod -R 755 openemr/documents

andres_paglayan wrote on Tuesday, March 13, 2007:

can you manually link to the document?
i.e. http://yourserver/openemr/documents/90/xr001.jpg

duanemorrow wrote on Wednesday, March 14, 2007:

yes I can manually link to them.

duanemorrow wrote on Wednesday, March 14, 2007:

when I restored the openemr database from backup I deleted openemr and then created a db named openemr, and then restored the database  mysql -uXXX -pXXX openemr < openemrbackup.sql

Is there any stored procedures/triggers etc that are new to the mysql 5 version of openemr?

andres_paglayan wrote on Wednesday, March 14, 2007:

no, no stored proceures,
did you change mysql version or is the same it was running on?

another thing to try
is re-downloading files from openemr cvs repository,
this will not be the first time some files come corrupted from the download,

andres_paglayan wrote on Wednesday, March 14, 2007:

also try turning warnings (not very sueful) and errors on,
but log them instead of sending them to the screen,
this is very self-explanatory in the php.ini file,
change the values, re-start apache,
go to the documents section, and send the php error log,

duanemorrow wrote on Wednesday, March 14, 2007:

To clarify. The documents are not listing in the treeview.

duanemorrow wrote on Wednesday, March 14, 2007:

I downloaded the current tarball from sourceforge, not from cvs.

duanemorrow wrote on Wednesday, March 14, 2007:

This was an update from mysql 4 to mysql 5

andres_paglayan wrote on Wednesday, March 14, 2007:

then guys, can you help?
I don’t remember if the mysql 5 buy was fixed in “documents”
duanemorrow, did you get any error log?

duanemorrow wrote on Wednesday, March 14, 2007:

I edited /etc/php/apache2-php5/php.ini and /etc/php/cli-php5/php.ini

both files had display_errors=on and log_errors=off
I changed to display_errors=off and log_errors=on

No errors were displaying
after restarting apache I get no errors logged.

bo2999 wrote on Wednesday, March 14, 2007:

There was a discussion on this topic here

http://sourceforge.net/forum/forum.php?thread_id=1607819&forum_id=202506

As I know, there was some problem with MySQL5 because of poorly written data querry in the CategoryTree.class.php. MySQL 4 somehow overlooked it, but MySQL 5 picks this up. TG (TekknoGenius) has fixed the problem if you download the file from CVS.

Cheer,
Bo

andres_paglayan wrote on Wednesday, March 14, 2007:

as quick calrification,
you don’t need to download the whole thing from cvs
just that file

bo2999 wrote on Thursday, March 15, 2007:

that’s right.

Bo,

duanemorrow wrote on Thursday, March 15, 2007:

Working.

Downloaded openemr from cvs.
Copied over CategoryTree.class.php
didn’t work until I modified databases based on 2_8_2-to-2_8_3_upgrade.sql to get the CategoryTree to work.

vanasq wrote on Saturday, March 17, 2007:

OpenEMR 2.8.2; Original SQL query is wrong. Change it to read :

class CategoryTree extends Tree {

$sql = "SELECT c.id, c.name, d.id AS document_id, d.type, d.url FROM (categories AS c LEFT JOIN categories_to_documents AS c2d ON c.id = c2d.category_id), documents AS d WHERE c2d.document_id = d.id";

Cheers

sunsetsystems wrote on Sunday, March 18, 2007:

Yes it looks like Tekkno fixed this SQL about 10 days after 2.8.2 was released.

Rod
www.sunsetsystems.com