Jump to content

WordPress sessions issue?


Go to solution Solved by SarahB12,

Recommended Posts

Hey guys!
 
I'm having an issue with (I believe) WordPress sessions.  I have a front-end user upload option that uses the WordPress media upload, which works flawlessly without https.  When I switch the site over to https and try to upload media, the async-upload.php file is called (when uploading) and I am immediately logged out of the site, before the upload completes.
 
Here is what I have in my wp-config file:

define('WP_HOME','https://www.domain.com');
define('WP_SITEURL','https://www.domain.com');
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);

Again, if I use http the upload works flawlessly, but as soon as I switch to https I'm logged out as soon as I initiate the upload.

 

Any help would be appreciated!

 

Thanks!

~Sarah

Link to comment
https://forums.phpfreaks.com/topic/302505-wordpress-sessions-issue/
Share on other sites

Use your browser's "developer tools" or whatever to look at the HTTP request made when uploading the file. Does the browser include a Cookie header with the request that matches the session cookie?

Yes, cookies are set until I begin to upload media and the async-upload.php file is called. As soon as the async-upload.php is called the cookies expire and I'm sent to the admin login screen.

Does the browser show any requests to any pages that aren't HTTPS? Do you have any custom code in place for the upload form, the upload process, or logging in?

I ran across this post: https://wordpress.org/support/topic/error-from-async-uploadphp-redirect-302-with-ssl-enabled/ This seems to be the exact same issue, but there isn't a solution posted.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.