[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

substitute for $_SESSION?

Posted on 2016-09-27
4
Medium Priority
?
61 Views
Last Modified: 2016-09-29
I am working in a WordPress environment where the host does not support $_SESSION vars based on caching & speed issues.

I have been doing php development for a long time & I use $_SESSION for a lot of things, in this PARTICULAR case for passing a logon id in a session var so I can determine if a user properly logged on, as opposed to someone just going to www.oursite.com/user-page-docs/, for example.

I am trying to think of another easy but safe way to do this, so far can't think of any.

Most of the pages that "cascade" forward from the login are accessed via the $_GET method; e.g., oursite.com/some_page.php?a=A&b=B

where a & b further describe the parameters of action on the page. I thought about adding the userid there as well, then it is visible in the url, but of course only to the already successfully logged in user, so maybe not an issue?

Some have said use the database, I don't see how to do that.

Suggestions?
0
Comment
Question by:Richard Korts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1600 total points
ID: 41818875
I never heard of such a thing.  I'd change hosting.  Most of my 'serious' code uses $_SESSION variables and wouldn't work at all if they were not available.
0
 

Author Comment

by:Richard Korts
ID: 41818881
Dave,

That's what I thought, my usual problem though, the customer is in love with the host.

FYI, the host is WPEngine

Richard
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41818895
From the questions you've posted... I would never use them.  Try to get the customer interested in a web site and a business that actually works.
0
 
LVL 59

Assisted Solution

by:Julian Hansen
Julian Hansen earned 400 total points
ID: 41819536
I think this article at WPEngine explains the situation

https://wpengine.com/support/cookies-and-php-sessions/

They say under sessions that you should use cookies and under cookies warn you they may not work.

Basically what they are saying is that you need to do your session handling through AJAX requests.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question