Page 1 of 1
Home Inventory pictures
Posted: Mon May 04, 2009 2:24 pm
by Rogerrally
Hi
I am having an issue with the Home Inventory app.
I have entered several items into Home Inventory fine, but now i am trying to add images (.JPG).
I just get a message "Cannot upload file!"
This is the same for existing items and new items.
Any suggestions?
Many thanks
Roger
Re: Home Inventory pictures
Posted: Mon May 04, 2009 8:03 pm
by mciv
There was an issue with the initial install script that has since been fixed. If you've entered a bunch of items and don't want to reinstall I can explain how to fix it.
If you don't want to reinstall.
Re: Home Inventory pictures
Posted: Mon May 04, 2009 8:17 pm
by cpg
hmmm ... that's no good.
what do the error logs have to say?
probably in /var/hda/web-apps/homeinv/logs/error_log
---
update - never mind, mciv to the rescue with actual info

Re: Home Inventory pictures
Posted: Wed May 06, 2009 1:48 pm
by Rogerrally
Hi
Yes i would not mind attempting fixing, if i can avoid reinstalling the app.
There is nothing like a real issue for getting in under the hood and getting your hands dirty and learning.
I have checked the logs and this appears to be the relevant line
[Mon May 04 22:32:49 2009] [error] [client 192.168.1.40] PHP Warning: move_uploaded_file() [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: Unable to move '/tmp/php7ZKmNN' to '/var/hda/web-apps/homeinv/html/htdocs/images/items/mig.JPG' in /var/hda/web-apps/homeinv/html/environment.php on line 134, referer:
http://homeinv/editPicture.php?id=17
Many thanks
Re: Home Inventory pictures
Posted: Thu May 07, 2009 7:25 am
by mciv
The file in question is environment.php . Assuming you are having the problem I believe you are having which is a path issue you will need to go to line 125.
You should see
Code: Select all
$dir_name = SITE_PATH . "htdocs/images/$sDest/";
The fix is to simply remove htdocs so the lines reads as follows
Code: Select all
$dir_name = SITE_PATH . "images/$sDest/";
If this doesn't fix the problem let us know.
Re: Home Inventory pictures
Posted: Thu May 07, 2009 11:17 am
by Rogerrally
That was the problem and that has fixed it.
Much quicker and easier than re installing the app.
Many thanks for a quick and working fix, and a great application that is Amahi Home Server.
For those that find this post looking to fix their own Homeinv app the file is located at
/var/hda/web-apps/homeinv/html
Cheers
Roger