Asked  9 Months ago    Answers:  5   Viewed   40 times

After validating user input and storing login credentials I start a session by calling session::start and then reload the index.php file by calling general::reload. The I use session::is_start() to determine which page to load from the index file.

I don't think this is working correctly as I always get the same page loaded - b1e.htm.

My concern is that my static class session does not maintain its value between the AJAX/PHP call and the reload index.php call.

Similar posting - here


  include 'b2.php'; 

    include 'b2e.htm';  // user is logged in
    include 'b1e.htm'; // user is not logged it

Snippet - session:start() and session::is_start();

class session
  protected static $ses_id ="";
  public static function start()
    self::$ses_id = session_start();
  public static function is_start()
    return self::$ses_id;
  public static function finish()
    self::$ses_id = 0;
    if (session_id() != "" || isset($_COOKIE[session_name()]))
      setcookie(session_name(), '', time()-2592000, '/');

Snippet - general::reload()

class general
  public static function reload()
    $uri = 'http://';
    $uri .= $_SERVER['HTTP_HOST'];
    header('Location: '.$uri.'/host_name');



You need to call your session_start(); to actually start the session on each page.

Wednesday, March 31, 2021
answered 9 Months ago

Finally I get old getOldCalculatedValue using loop.

$data = $this->excel->getActiveSheet()->toArray(null, true, true, true);

//This code add for some calculated cells were not reading in xlsx format
foreach ($data as $no => $row) {
    foreach ($row as $key => $value) {
        if (isset($value) && $value == '#VALUE!') {
            $data[$no][$key] = $this->excel->getActiveSheet()->getCell($key.$no)->getOldCalculatedValue();
Wednesday, March 31, 2021
answered 9 Months ago

the php-memcached extension supports session locking

the memcache and memcached extensions look syntactically similar so it may not be too much of a headache to give it a try. (memcached has a stable version 2.1.0 released 2012-08-07).

if you are set on using memcache 2.2.7 you will most likely have to implement the lock yourself by setting some "session_is_locked" variable in your session and then releasing/unsetting it when the script is done writing to the session. Then you'd always need to check if that variable is set before continuing with any scripts which write to the session.

Wednesday, March 31, 2021
answered 9 Months ago

Well, I guess I get to answer my own question today, because after stabbing at it over two and a half days, one of the things I tried seems to have worked. I'm just going to back away from it now and hope it keeps working.

Essentially, it looks like it comes down to -d system not actually working. So a lot of answers to other questions around here should probably be updated to reflect that.

security -v list-keychains -s "$KEYCHAIN" "$HOME/Library/Keychains/login.keychain"
security list-keychains # so we can verify that it was added if it fails again
security -v unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
codesign --sign "$SIGNER_IDENTITY" --force --signature-size 9600 
         --resource-rules src/AppResourceRules.plist --timestamp --verbose 
Wednesday, June 2, 2021
answered 6 Months ago

session_destroy() destroys the active session. If you do not initialized the session, there will be nothing to be destroyed.

Thursday, July 29, 2021
answered 4 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :