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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:31:42+00:00 2026-06-14T12:31:42+00:00

For a project, I am creating a web app, in which, login will be

  • 0

For a project, I am creating a web app, in which, login will be a paramount part. Unfortunately, I seem to be unable to get sessions to work properly, so the sign-ins do not last at all.
Here is some simple code I wrote on my Testing/experimentation/debugging page.

Here is the head of the testing page.

<? 
if(!isset($_SESSION)){
    session_start(); 
}
?>
<!DOCTYPE html>
...

Here is the code which uses session data.

$_SESSION[0] = $_SESSION[0] + 1;
echo($_SESSION[0]);

It’s supposed to increment with each, visit, but it hasn’t been doing so, as with the login system.

Here is session setting from the phpinfo() function if it helps.

Session Support enabled
Registered save handlers    files user sqlite
Registered serializer handlers  php php_binary wddx

Directive   Local Value Master Value 
session.auto_start  Off Off
session.bug_compat_42   On  On
session.bug_compat_warn On  On
session.cache_expire    180 180
session.cache_limiter   nocache nocache
session.cookie_domain   no value    no value
session.cookie_httponly Off Off
session.cookie_lifetime 0   0
session.cookie_path /   /
session.cookie_secure   Off Off
session.entropy_file    no value    no value
session.entropy_length  0   0
session.gc_divisor  100 100
session.gc_maxlifetime  1440    1440
session.gc_probability  1   1
session.hash_bits_per_character 4   4
session.hash_function   0   0
session.name    PHPSESSID   PHPSESSID
session.referer_check   no value    no value
session.save_handler    files   files
session.save_path   /tmp    /tmp
session.serialize_handler   php php
session.use_cookies On  On
session.use_only_cookies    On  On
session.use_trans_sid   0   0
  • 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-06-14T12:31:43+00:00Added an answer on June 14, 2026 at 12:31 pm

    You don’t need the !isset to check your session, just call session_start(); at the top of any page that deals with the session variable.

    Keys at the root level must be valid identifiers, so session[1] wouldn’t work, but session[‘1’] would.

    Session documentation there’s some interesting qualifiers.

    There’s also some more advanced examples in the comments:
    If you don’t have control of the register_globals setting: (isset($_REQUEST[‘_SESSION’])).

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

Sidebar

Related Questions

I try to run one program in myeclipse where after creating one web project
I am creating a small commercial web project running Apache/WSGI/Django/MySQL. I have a development
I have a project in which I'm accessing a MySql database on my web
As part of my Final Year Project I've developed a desktop application, which fits
Just creating my first IntelliJ web application that runs on tomcat. The project ran
I have a web app I'm creating, where I need to allow the user
I have a requirement in which , application will be referenceing a web service.
I have a new web app that is packaged as a WAR as part
I'm creating a web app that requires registration/authentication, and I'm considering using an email
I'm working on a web app for a class. It's basically a project management

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.