1

Topic: Issues with photos

I recently moved our website onto a server that we have more control over, however this seems to have caused a few teething problems.
When a user uploads a photo (on the Casual records form), the photo does not appear after the upload completes. If they ignore this anomaly and hit save regardless, then the photo does appear on the home page and is attached to the record if viewed from the 'My Records' page or the 'My Photos' page.

I have also been told that photos area also not viewable on the iRecord verification pages, although the test I just performed contradicts this report.

In case they are relevant, when I edited the test record I did get the following errors.
On Edit:
    Warning: unlink(sites/all/modules/iform/client_helpers/upload/o_1b5jfku6b1qc11fcg841bsq1j8h8.jpg): Permission denied in helper_base::purgeFiles() (line 2312 of D:\Websites\sewbrec\sewbrecord.org.uk\www\sites\all\modules\iform\client_helpers\helper_base.php).
    Warning: unlink(sites/all/modules/iform/client_helpers/upload/o_1b5jflarksikde11nigtj1umth.jpg): Permission denied in helper_base::purgeFiles() (line 2312 of D:\Websites\sewbrec\sewbrecord.org.uk\www\sites\all\modules\iform\client_helpers\helper_base.php).
    Warning: unlink(sites/all/modules/iform/client_helpers/upload/o_1b5jgg9mieb91kivknb43d8hl8.jpg): Permission denied in helper_base::purgeFiles() (line 2312 of D:\Websites\sewbrec\sewbrecord.org.uk\www\sites\all\modules\iform\client_helpers\helper_base.php).
    Warning: unlink(sites/all/modules/iform/client_helpers/upload/o_1b5jfku6b1qc11fcg841bsq1j8h8.jpg): Permission denied in helper_base::purgeFiles() (line 2312 of D:\Websites\sewbrec\sewbrecord.org.uk\www\sites\all\modules\iform\client_helpers\helper_base.php).
    Warning: unlink(sites/all/modules/iform/client_helpers/upload/o_1b5jflarksikde11nigtj1umth.jpg): Permission denied in helper_base::purgeFiles() (line 2312 of D:\Websites\sewbrec\sewbrecord.org.uk\www\sites\all\modules\iform\client_helpers\helper_base.php).
    Warning: unlink(sites/all/modules/iform/client_helpers/upload/o_1b5jgg9mieb91kivknb43d8hl8.jpg): Permission denied in helper_base::purgeFiles() (line 2312 of D:\Websites\sewbrec\sewbrecord.org.uk\www\sites\all\modules\iform\client_helpers\helper_base.php).

And on Save:
   Warning: unlink(sites/all/modules/iform/client_helpers/upload/o_1b5jfku6b1qc11fcg841bsq1j8h8.jpg): Permission denied in helper_base::purgeFiles() (line 2312 of D:\Websites\sewbrec\sewbrecord.org.uk\www\sites\all\modules\iform\client_helpers\helper_base.php).
    Warning: unlink(sites/all/modules/iform/client_helpers/upload/o_1b5jflarksikde11nigtj1umth.jpg): Permission denied in helper_base::purgeFiles() (line 2312 of D:\Websites\sewbrec\sewbrecord.org.uk\www\sites\all\modules\iform\client_helpers\helper_base.php).
    Warning: unlink(sites/all/modules/iform/client_helpers/upload/o_1b5jgg9mieb91kivknb43d8hl8.jpg): Permission denied in helper_base::purgeFiles() (line 2312 of D:\Websites\sewbrec\sewbrecord.org.uk\www\sites\all\modules\iform\client_helpers\helper_base.php).

The record and photo successfully deleted after this process.

I am guessing it is something to do with permissions on the new server, but any pointers would be gratefully received.
Dave

Dave Slade
Senior IT & Records Officer,
15 Talbot Road, Talbot Green, Pontyclun, CF72 8AD
www.sewbrec.org.uk, www.sewbrecord.org.uk

2

Re: Issues with photos

Does your web server have permissions to add and delete files in iform/client_helpers/upload?

This is an interim folder to which files are uploaded prior to forwarding them to the warehouse. Once the record has been saved then the copy of the file on the warehouse is referenced by pages which show files.

Jim Bacon

3

Re: Issues with photos

I don't think it did initially, but this was one of the things that I fixed the day after the move. There are currently images in that folder so it does appear to be working now. Perhaps the problems arose from that period before I updated these permissions.

Does the fact that the photo is not appearing properly on the form between upload and save indicate a permission problem persists?

Dave Slade
Senior IT & Records Officer,
15 Talbot Road, Talbot Green, Pontyclun, CF72 8AD
www.sewbrec.org.uk, www.sewbrecord.org.uk

4

Re: Issues with photos

If I remember rightly, when you select a photo it uploads to your server via some ajax on the client side so you should be able to see that network traffic via browser tools. Then, on the server-side, PHP receives the upload in to a temporary folder and then moves it to the upload folder when the file has been fully received. The thumbnail shown on the client is obtained from the upload folder on your server. Only on submission is the photo sent on to the warehouse.

I'd be looking for the upload network traffic and watching the upload folder to see if images appear there when selected on the client form. Maybe you'll see some errors and get some clues. Check the PHP error log too.

Jim Bacon.