ابحث في الدعم

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 has this problem
  • 11 views
  • آخر ردّ كتبه fpbosmans

more options

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)

more options

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
more options

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

more options

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.

more 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

more options

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?

more options

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.

more options

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!