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 6852315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:21:21+00:00 2026-05-27T01:21:21+00:00

PROBLEM I’ve got an admin panel. Currently only Mozilla is able to process log

  • 0

PROBLEM


I’ve got an admin panel. Currently only Mozilla is able to process log ins. Browsers like Chrome, IE, Opera won’t even show any message carried through sessions thus no one is able to log in any browser but Mozilla.

SOME INFORMATION


  • I’m using PHP 5.3.6 on my server, PHP 5.3.5 on my local
    computer.
  • My code is Object Oriented.
  • ini_set("session.use_only_cookies", 1); and
    ini_set('session.cookie_secure', 1); are used in construction method
    of my session class.
  • This website on SLL

Login process: First I gather all information from form, validate and gather data. After validation if everything is right, I send this data to login method in my session class.

public function login ($user) {
        global $siteSettings;
        if ($user) {            
            $this->id          = $_SESSION['id']          = $user->id;
            $this->username    = $_SESSION['username']    = $user->username;
            $this->fullName   = $_SESSION['fullName']   = $user->fullName;
            $this->group_id    = $_SESSION['group_id']    = $user->group_id;
            $this->groupName    = $_SESSION['groupName']      = $user->groupName;
            $this->lastLogin   = $_SESSION['lastLogin']   = $user->lastLogin;
            $this->isAdmin   = $_SESSION['isAdmin']   = ($user->admin == 1) ? true : false;
            $this->isAgent   = $_SESSION['isAgent']   = ($user->agent == 1) ? true : false;
            self::$language   = $_SESSION['language'] = ($user->language != "" || $user->language != NULL) ? $user->language : self::$language;
            if ($user->language != "" || $user->language != NULL) {
                $_SESSION['language'] = $user->language;
            }else {
                if (!defined(DEFAULT_LANGUAGE)) {
                    $browserLang = "|".$_SERVER["HTTP_ACCEPT_LANGUAGE"];
                    $browserLang = getStringBetween($browserLang, "|","-", FALSE);
                    if (!file_exists(LANGUAGES.$browserLang.".php")) $browserLang = FALSE;
                }
                $_SESSION['language'] = ($browserLang) ? $browserLang : DEFAULT_LANGUAGE;
            }


            # When 2 Update session_id
            $date = new DateTime("now");
            $UpdateTime = $siteSettings->session->timeOut * 60;
            $date->add(new DateInterval("PT".$UpdateTime."S"));

            $_SESSION['SIDUpdateTime'] = $date->format("Y-m-d G:i:s");

            # UPDATE LAST LOGIN & ADD SESSION ID
            # Clear Fields
            members::clearFields();
            members::$fields['id'] = $_SESSION['id'];
            members::$fields['lastLogin'] = date("Y.m.d G:i:s");
            members::$fields['lastLoginIP'] = $_SERVER['REMOTE_ADDR'];
            # GET THE SALT
            $saltInfo = members::getData("id", "salt", members::$fields['id']);

            # SETTING SESSION ID ENCRYPTION
            crypt::setKey($saltInfo->salt);
            members::$fields['sessionID'] = crypt::encode(session_id());
            members::$fields['sessionIP'] = $_SERVER['REMOTE_ADDR'];
            members::$fields['sessionAgent'] = $_SERVER['HTTP_USER_AGENT'];
            members::save();

            $this->loggedIn = true;
            var_dump($_SESSION);
        }
    }

When I dumb the data I can see $_SESSION got some values.

Just to test it, I stopped the script where after var_dump($_SESSION); (added die();) I created test.php file and tried this;

<?php
ob_start();
session_start();

echo '<pre>';
var_dump($_SESSION);
echo '<pre>';

ob_end_flush();
?>

Output is array(0) {}

But when I try exactly the same thing with Mozilla, output of test.php is the way it should be (matching with login method’s result in my session class).

  • I have tried from my local computer and I don’t experience the same
    problem.
  • I disabled all java script and jquery codes from the page just to
    have no ‘maybe’ in my mind.
  • After dumping the data, script is stopped. That’s why $_SESSION variable shouldn’t change. For some reason when it is on the server only Mozilla is able to show expected result while other browsers shows NULL.

At this point I really don’t know what to think of about this problem to try to solve it. All I can think of is, this problem is possibly related to server configuration. But then, PHP is server side programming. PHP shouldn’t display different behavior for browsers like Jquery, CSS, HTML…

I’m sorry, I can’t provide admin panel link. Considering this is an active admin panel. If necessary I could install it on another domain to let you try but I believe the information I gave above explains everything.

Thank you for your help in advance.

  • 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-27T01:21:22+00:00Added an answer on May 27, 2026 at 1:21 am

    It turns out Mozilla FireFox is able to process some data but other browsers I tried with are not and therefore they reset the whole session with each page load.

    I had no problem with my local computer but on the server I had sessions problem. I don’t know why session_set_cookie_params(); and setcookie(); didn’t work on the server so I had to code longer version;

    private static function sessionLifeTime() {
    global $siteSettings;
    # HOW LONG WE WANT SESSIONS
    $lifeTime = intval($siteSettings->session->timeOut) * 60;
    
    if (isset($_SESSION['id']) && isset($_SESSION['lastActivity']) && (time() - $_SESSION['lastActivity'] > $lifeTime) ) {
    // SEND INFORMATION TO USER
    self::logout();
    }
    $_SESSION['lastActivity'] = time();
    }
    

    Replacing my method with the code above solved the problem.

    Thank you all for your time, concern and interest.

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

Sidebar

Related Questions

Problem is like this: I have two winapi application's. There is only one way
Problem is very very simple: When clicking on red red red in browsers: Chrome
Problem Language: C# 2.0 or later I would like to register context handlers to
Problem is like this: Suppose there are records in dataTable with FruitType as A
Problem: Find people whose birthdays are tomorrow (table a), who havent got a record
I am currently running into a problem where an element is coming back from
Problem description is here : http://www.spoj.pl/problems/FASHION/ Process : Took two lists as input ,
Problem: I have an address field from an Access database which has been converted
Problem: I have two spreadsheets that each serve different purposes but contain one particular
Problem (simplified to make things clearer): 1. there is one statically-linked static.lib that has

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.