I received this error after importing the “scanned notes” folder into OEMR. I have 4.1.0 that I just installed a few days ago on a WAMP5 server. I did a search in the forums for this, but all the posts were old and on prior versions of OEMR. I took a peek at the code and it looks like the image directory is automatically created if it doesn’t exist (although I am not a programmer). Is this an issue with permissions? Am I supposed to put a path statement somewhere? Do I need to run a patch? What am I missing?
Yes most likely a permissions problem. The web server needs permission to create directories under sites/<site ID>/documents/ within the OpenEMR installation directory. By the way the software is named OpenEMR, not OEMR.
On researching the permissions issue, I have found that Windows, unlike Unix, doesn’t use permissions per se. I did, however, attempt to change the folder options (while logged into windows with admin privileges) for “sites/<site ID>/documents/” from “read only,” in folder properties both under the general tab as well as the security tab, but the changes revert back to read only (as in I can’t get the changes to save). I also tried changing the folder attributes via the command line, but this didn’t work either. I changed the sharing attributes for the folders as well-to include “read and write for everyone,” but this did nothing. Googling this issue revealed much frustration out there concering the inability to change folders from “read only” in Windows, but no workable solution. This is interesting, however, because multiple people are saying that permissions in Windows is a non-issue because windows doesn’t use them.
It is my understanding (although limited), that the <directory> commands in the Apache config file only limit access to directories for peeps logged on to the server, and do not affect the web server’s ability to create or write to a directory. Also, looking through the PHP.ini file didn’t turn up anything.
Any other suggestions?
BTW these forums are impressive. I haven’t had to wait for more than a few hours (usually less) for a response to a question.
Oh, Windows. The scanned_notes form does not seem to be Windows-friendly - specifically it invokes “mkdir” which is not a Windows command. You’ll need a developer to fix that for you.
Sorry, I should have said the mkdir command executed by the scanned_notes form is not valid for Windows. Maybe it will do something for someone, but on my Win 7 system it will fail for two reasons:
1. Use of forward slashes in the path.
2. “mkdir -p …” creates a directory named “-p”, and the second time you do that it will fail because that directory already exists.
Maybe you are executing mkdir from a Cygwin install?
Yes, I installed the example xml input file, communication_log.xml, using the xml form generator and it worked fine.
The steps I used were as follows:
1. copied the scanned_notes folder from the contrib/forms folder to interface/forms folder
2. Logged into OpenEMR and went to admin>other>forms
3. “Scanned Notes” appears under “Unregistered”
4. Clicked “register,” “Scanned Notes” now appears under “registered”
5. Clicked “install DB” followed by “disabled”
6. Under a New Encounter for a test patient, “Scanned Notes” appears under the “Miscellaneous” tab
7. Click “Scanned Notes” and bring up the Scanned Notes form.
8. Browse to a .pdf test file.
9. Click Save
10. mkdir rterned 1:
edit new.php file in the folder and replace the following section
// If the patient’s encounter image directory does not yet exist, create it.
if (! is_dir($imagedir)) {
$tmp0 = exec(“mkdir -p ‘$imagedir’”, $tmp1, $tmp2);
if ($tmp2) die(“mkdir returned $tmp2: $tmp0”);
exec(“touch ‘$imagedir/index.html’”);
}
// Remove any previous image files for this encounter and form ID.
With
// If the patient’s encounter image directory does not yet exist, create it.
if(!is_dir($imagedir))
{
if (!mkdir($imagedir, 0777, true))
{
die(‘Failed to create folders…’);
}
chmod($imagedir, 0777);
}
//---------------------------------------------
Actually, I posted here, but perhaps my post has mysteriously gone missing. The scanned notes form in the contrib folder is not functional. I don’t know what happened to it. I AM USING THE SCANNED NOTES FORM and have been, on a windows server2003 install, and testing it on XP daily.
Get the same version I am using here: http://starfrontiers.org/oemr/scanned_notes.zip. It is indeed different from what is in the contrib folder. I would not have much faith in things in the contrib folder.
Making your changes returned the following error:
“convert -density 96 ‘C:\wamp\tmp\phpEF9D.tmp’ ‘C:/wamp/www/sites/default/documents/2/encounters/6_2.jpg’” returned 4:
Incidentally I had also been trying out this form.
I downloaded above and replaced the non-working form with it.
I still does not work for me.
when I send I get
path to documents folder/####/encounters
at the browser window which is plain white and remains open instead of taking me back to the openemr fax/scan window.
the encounter folder does not get made.
In the patient chart, at the visit screen, under “scanned notes” it is just blank.
I would love to be able to use this tool, because I write my notes.
It is cumbersome for the other doctor in my practice to change to documents to open and read my previous notes then back to the visit to document his own note.