Forum
Adding assets causes me to log out
I'm having trouble adding assets within Perch. The behaviour of the Assets Apps suggests that something isn't configured right. Can you help?
So, I go to the Assets app. And under where it says "Listing all assets" there is nothing listed. I click "Add asset" and the box drops down. I drag my file into the box and for a split second the thumbnail appears. Then the box is empty. At this point I seem to have been logged out because if I click back to "Pages" or "Users" or whatever I am asked to log in again. If I check the default perch/resources directory the new file is in there.
So the assets are uploaded but not recorded? Any ideas? Thanks
Perch: 2.8.29, PHP: 5.3.29, MySQL: 5.6.22, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/ns/Dropbox/dev-server/od/1/perch
PERCH_CORE: /Users/ns/Dropbox/dev-server/od/1/perch/core
PERCH_RESFILEPATH: /Users/ns/Dropbox/dev-server/od/1/perch/resources
Image manipulation: GD
PHP limits: Max upload 128M, Max POST 128M, Memory: 128M, Total max file upload: 128M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: od
DOCUMENT_ROOT: /Applications/AMPPS/www/od/1
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Is there anything in your PHP error log?
Thanks Rachel,
It doesn't seem to be throwing any PHP errors.
But the server log says it's doing this:
That looks like your access log, which is possibly not the same place as PHP errors might be logged.
Do you have any other logs?
Hi Drew, there's nothing being reported in php_errors.log - no PHP errors as far as I can see.
The assets that I'm attempting to upload are all going in to the perch/resources folder successfully, but they aren't being listed in the Assets app. They should appear there right?.. if they're in the folder? I wondering if the app is looking in the wrong place. But that doesnt explain why I'm also being logged out.
If you're being logged out, you're certainly encountering an error of some sort. If nothing is being logged it's going to come down to guess work.
What size are the images?
only small - between 19 and 182k.
I run AMPPS on my local drive and then in /Applications/ampps/www I have an alias that points to a Dropbox folder where I keep the actual site. Could that be causing a problem?
It could be, yes. By alias do you mean an old school Finder alias, or a symlink or something else?
symlink.
I guess I could back everything up and then recreate the site in www and then install Perch again. I guess if this issue hasnt come up before then it's one way to find out.
Can you not just point the virtual host directly at your Dropbox folder?
Apparently so! I will try that. Will I need to run setup again to ensure Perch knows about the new paths?
No, you should be good if all the paths in your
config/config.php
file look to be accurate.ok I have reconfigured the domain to point directly to the Dropbox folder and so now my diagnostics are:
Everything is working as before but Assets App still not working. Still logging me out.
Should I update PHP: 5.3.29 ??
Just tried something else - looking at the console when I try to add an asset...
What does this mean?
Regardless of this error yes you should absolutely update PHP.
5.3 is end of lifed by a long way, gets no security updates, you don't want to be using it. As from Perch 2.9 we will require 5.4 as a minimum. Shop and Runway already require 5.4 (but don't go to 5.4 as that is also end-of-life) go to either 5.6 or ideally PHP 7.
Hi, ok will do. Thanks for you help on this.
Why would the "GET https://od/perch/?r=%2Fperch%2Fcore%2Fapps%2Fassets%2Fupload%2F" be giving a 403 error?
This seems like it might be the heart of the problem?
Hold up! Changed to PHP 5.6 and it worked :) Thanks so much.
HTTP 403 is "Forbidden" - for some reason you were being logged out. It could have been a PHP config issue with the sessions that switching to 5.6 happened to resolve.
PHP 5.6 is a much better place to be, so you win on both counts.