Upload Scanned Images

esears1 wrote on Wednesday, December 07, 2005:

Hi.

I tried to upload a scanned image to a patients chart and it looked like the upload went fine (no errors ) but when i click on the link in the tree where I uploaded the file to, i’m not seeing the file.  It seems that the upload is not working, but no errors are showing to the screen. I checked the documents table and no entry.  Anyone have any tips/suggestions on making this work? 

p.s i am running 2.7.2 on mandrake.

thanks,

Edward

drbowen wrote on Wednesday, December 07, 2005:

Have you made writeable by your webserver (Apache?)?

~webroot/openemr/documents/

esears1 wrote on Wednesday, December 07, 2005:

yes… the directory is owned by apache and has full writes to it.

esears1 wrote on Thursday, December 08, 2005:

I tried looking at the php.ini and some other config files still no luck.  Do i have to create any directories under documents?   php accepts uploaded files in the ini so i’m not sure what’s up… Please help… i go live next week.

esears1 wrote on Thursday, December 08, 2005:

I turned on tracing in php and this is the error:

Warning: mkdir(/usr/local/apache2/htdocs/openemr/documents/19/): Permission denied in /usr/local/apache2/htdocs/openemr/controllers/C_Document.class.php on line 78

but I did a chmod apache:apache -R {the whole directory above} and made sure that it has privs plus made it global. does /usr /usr/local etc… need to be givin privs to apache???

sunsetsystems wrote on Thursday, December 08, 2005:

Did you mean chown instead of chmod?  What I suggest is:

chown -R apache:apache /usr/local/apache2/htdocs/openemr

– Rod
www.sunsetsystems.com

andres_paglayan wrote on Thursday, December 08, 2005:

check your apache2.conf or httpd.conf file to see  what user name apache is running under, this varies depending the distributions.

then chown -R thename:thename openemr/documents

esears1 wrote on Friday, December 09, 2005:

Yup… Fixed it… it turned out to be a permission problem like ya’ll said.  I had to reboot the machine then do the same command {chown and the chmod } and then it worked.  weird… Anyway thanks for ya’lls support.

esears1 wrote on Saturday, December 10, 2005:

well it’s back to the same problem… I’m not sure what’s causing it. I reboot the machine and then it doesn’t work, run the chmod and chown on it (not really changing anything new) and it’ll work

could it be my config files? any ideas?

esears1 wrote on Saturday, December 10, 2005:

i created a small php script file that just has mkdir function in it and this script file works it doesn’t have a problem with permissions. it creates the directory fine in the documents folder.

with openemr i’m not getting any kind of error, it’s just not creating the directory nor is it uploading the file.

esears1 wrote on Saturday, December 10, 2005:

After a few mountain dews and some oreo cookies, I was able to narrow it down to the following why it wont’ work.

It had nothing to do with permissions. As long as I do not restart the apache, the upload images will work.  If I restart the apache, something happens where it won’t allow any images to be uploaded.  Until I reboot the machine, it will not work.  Anyone know why this is?  I just don’t know much about the internals yet of how php and openemr work.

andres_paglayan wrote on Monday, December 12, 2005:

are you using apache2?
is php a module or cgi?
are you sure you only have one install of apache?
check for apache + apache2