Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 594405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:56:59+00:00 2026-05-13T15:56:59+00:00

Throughout our site we have a login button, whenever someone logs in the button

  • 0

Throughout our site we have a login button, whenever someone logs in the button changes into “log out” and the users name is displayed next to it. Our server setup uses Varnish so we devised a way where a bit of javascript does a POST and we check if the user is Authenticated.

To avoid server overhead I thought it would be simple to just create a script that sits in the website root /checkuser.php and try and read the session variables there (we let Varnish not cache this file). This way we can bypass all the classes that need to be loaded just to check this users session.

However, long story short, the sessions in checkuser.php are always empty. If I check with $user->getAttribute it works. Now what?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:57:00+00:00Added an answer on May 13, 2026 at 3:57 pm

    Okay, I got it. Symfony uses its sessions under its own name. If you want to use sessions from outside your app (or framework) you can get the sessions like so:

    session_name('symfony');
    session_start();
    var_dump( $_SESSION );
    

    Provided of course that you didn’t rename the session name in factories.yml

    thx prodigitalson for the help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an ASP.NET application that uses Forms Auth. When users log in, a
I have a site that enables users to post messages to a forum. At
I have search throughout this site to find a answer to my problem and
On various pages throughout my PHP web site and in various nested directories I
I have a number of icons used throughout an application - let's take ok/cancel
Note: Our site is built in PHP and uses MySQL databases. I already manage
All throughout an application wherever error messages (or other user messages) are used I
I was overseeing branching and merging throughout the last release at my company, and
When you lock an object is that object locked throughout the whole application? For
I'm trying to use stl algorithm for_each without proliferating templates throughout my code. std::for_each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.