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

  • Home
  • SEARCH
  • 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 6853079
In Process

The Archive Base Latest Questions

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

I am trying to start session this way: session.auto_start = 1 I set it

  • 0

I am trying to start session this way:

session.auto_start = 1

I set it this way. The session doesn’t start. I changed start in my php as the following:

ini_set("session.use_only_cookies",true); 
session_save_path(dirname(__file__)."/../User");

Basically, I dont see any file created in that folder.

Also when I do this:

$id=session_id();

I get $id=0;

Why all those mistakes happen?

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

    I am trying to start session this way:

    session.auto_start()

    Where and how do you do that? Not in code I hope? It’s a php.ini setting, and if you want to enable it, you have to do it there.

    I changes start in my php as the following:

      ini_set("session.use_only_cookies",true); 
      session_save_path(dirname(__file__)."/../User");
    

    Basically, I dont see any file created in that folder.

    Does the user as which PHP runs have permissions on that folder? Haven’t you got your PHP files sorted in deeper folders, where “(directory)../User” doesn’t exist? Have you tried echoing the path to see where it points? Have you tried manually writing a file there? What about using realpath()?

    Also when I do this:

    $id=session_id();
    

    I get id=0;

    That’s a symptom. Your session doesn’t start, so you can’t get a session ID.

    $os=$_SERVER[‘SERVER_SOFTWARE’];
    I am trying to get the operating system and I get nothing.

    What do you get? Tried var_dump($os)?

    and when I try to do this: $browser= $_SERVER[‘HTTP_USER_AGENT’]; I get weird browser.

    Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2

    That “Weird Browser” is Chrome 15. What’s weird about that?

    And please enable error reporting since I’m sure there’ll be a few hints there.

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

Sidebar

Related Questions

Getting the following error when trying to start a session: Warning: session_start() [function.session-start]: Node
I have this session variable which i am trying to set to an access
I'm trying to set up a simple way of decorating methods in my CherryPy
I need a way to tell ASP.NET Kill the current session and start over
I'm trying to unset a certain value in a session array in php. I
I'm trying to start the session in a header page in my webiste. But
I'm trying to create a dynamic webpage using include() in PHP. This PHP page
When trying to start my JUnit-Test out of Eclipse, I get a ClassNotFoundException. When
I'm trying to start a service as a user and things work fine, until
I am trying to start a service from the command line using net start

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.