Forum
Images aren't being written to resources folder
When I try and add an asset through either the Assets section of the admin area or from within my page template, the image (looks like it) uploads fine and then immediately disappears. When I check the resources folder on my server there is no file. From the extended report diagnostic report everything looks good as far as permissions and file size limits.
My Diagnostic report:
Perch: 2.8.13, PHP: 5.4.10, MySQL: 5.0.77, with PDO
Server OS: Linux, apache2handler
Installed apps: content (2.8.13), assets (2.8.13), categories (2.8.13), perch_events (1.8), perch_forms (1.8.2)
App runtimes: <?php include(PERCH_PATH.'/core/apps/content/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_events/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_forms/runtime.php'); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /mnt/Target01/334262/342689/www.aspensantafeballet.com/web/content/perch
PERCH_CORE: /mnt/Target01/334262/342689/www.aspensantafeballet.com/web/content/perch/core
PERCH_RESFILEPATH: /mnt/Target01/334262/342689/www.aspensantafeballet.com/web/content/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 10M, Max POST 8M, Memory: 128M, Total max file upload: 8M
Resource folder writeable: Yes
HTTP_HOST: www.aspensantafeballet.com
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
DOCUMENT_ROOT: /mnt/Target01/334262/342689/www.aspensantafeballet.com/web/content
Here is the page code :
<img src='<perch:content id="company_header_image" type="image" width="1000" height="400" crop="true" quality="100" label="Company header image" />' class="rounded" />
Is there anything in your server error log?
There is but I don't know what it means :)
here is the full log (feel free to delete this post if this is too much)
It looks like you've got all sorts of things missing. Did setup go ok? Is the site otherwise working normally?
A lot of the errors seem to repeats as I kept attempting the image upload
Is the site otherwise working normally?
The set up is fine and the other sections of the site work fine. The page I was working on looked good too except for the missing image region
So your pages are displaying content correctly?
Correct. The input fields for the page in the admin section for the page looked good and handled the text inputs well. Even the link to upload or choose an image worked ok. Only after I had selected the image to upload did it fail. I would see the image thumbnail and the green progress bar zip by and then the Asset area would reset and say there were no assets available. I tried having both a specified bucket for the image (which also didn't auto-create) and (as it stands now in my template) just attempting to upload to the default 'resources' folder.
What about your website pages, rather than the Perch control panel?
We had this issue a while ago. Have you checked to make sure the server has permission to write to the resources folder? Whenever this has happened to me in the past, that was almost always the root cause - especially when it appeared to upload but didn't throw an error.
The website pages using perch elements are displaying content correctly, seems to only be an issue with writing to the resources folder.
My diagnostic report says that the resources folder is writable though...
I tried uploading an image through the admin section again and the php log isn't showing any errors... but same result. A speedy green progress bar + thumbnail, then a refresh and then no image anywhere.
Can you try forcing the use of GD? In your config.php file:
added to my config.php file and diagnostic is showing GD as the image manipulator:
but same result when I tried uploading a file :(
Does this work locally in your dev environment?
I don't have a dev environment set up that I am running this site on. This was just an after the fact add on page for a live site.
Can you try reuploading the Perch
core
folder?I reuploaded and tried another file upload with the same results. Seems the resource bucket directory was written ok but no image file. I checked the php error log and got this list:
This is worrying:
Are you sure your permission are correct?
I am double checking on my permissions. Is there a reason that most of the Perch install would work fine and be writable but throw errors for image uploading? I will post a reply re: server permissions as soon as I hear back from the server management company.
Thanks Drew for your help so far :)
There's no reason for that other than permissions that I can think of.