Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

start_session / session variable in PHP not read by Firefox

  • 7 பதிலளிப்புகள்
  • 1 இந்த பிரச்சனை உள்ளது
  • 11 views
  • Last reply by fpbosmans

I have som PHP pages with session variables. It works (still) fine in Chrome and Microsoft Edge and until a few days ago it also worked fine in Firefox. All of a sudden Firefox doesn't get the value of the variables anymore.

Anyone any suggestions?

I have som PHP pages with session variables. It works (still) fine in Chrome and Microsoft Edge and until a few days ago it also worked fine in Firefox. All of a sudden Firefox doesn't get the value of the variables anymore. Anyone any suggestions?

All Replies (7)

Hi fpbosmans, your server processes your PHP script and sends browsers standard HTML, CSS, and JavaScript. You can see what the server is sending by calling up View Source on your page in Firefox. Either:

  • Ctrl+u
  • right-click a blank area of the page > View Page Source
  • menu button > Web Developer > Page Source
  • (menu bar) Tools > Web Developer > Page Source

Does the source show the values that you expect?


Firefox can be very tenacious with cached data, so if the page is showing obsolete date, try reloading the page bypassing the cache. Either:

  • Shift+click the Reload button
  • Ctrl+F5
  • Ctrl+Shift+r

No this doesn't work. Firefox doesn't read the session variables (refreshing the page doesn't help either). I'm guessing it has something to do with security settings.

Try this: http://dietrich.soundtoll.nl/public/index.php?periode=_vroeg

periode=_vroeg is saved as a session variable and should be available. But when you (I?) chose one of the options it has gone away and showing the page without 'periode' set. As I said: it wordkes before and it works in other browsers

Hi fpbosmans, your link gives me this red text on the page:

"Database 1: 668.565 registrations; years 1497 - 1633."

Clicking Years after 1633 gives me:

" Database 2: 1.484.051 passages; years 1634 - 1857."

Clicking Years before 1634 switches it back.

I'm not sure what you mean by this part:

But when you (I?) chose one of the options it has gone away and showing the page without 'periode' set. As I said: it wordkes before and it works in other browsers

When I click Statistics, the red text is carried over to stats.php. I don't know whether that is what you meant by options.

Thanks for your patience! That is exactly what should happen, the red text should stay the same! The new page reads the session variable to get the correct period. Only on my computer it all of a sudden doesn't work anymore, the session variable comes up empty. (And as I said not with other browsers.) Frank

Actually, Firefox doesn't have access to session variables, those are stored in memory on the web server. Firefox sends the PHP session cookie to the server with each request, and that allows the PHP script to use the session variables. Can you think of any reason that Firefox would not be setting or returning cookies to your server?

You can check the HTTP request headers in the Network Monitor to see what is send to the server if you click a link or button.

In the end the solution was very simple: I have deleted all saved cookies and now it's working again!

Thanks for your help, your answers set me on the right track!