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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:26:36+00:00 2026-06-06T08:26:36+00:00

I have just moved the dev site over to my linux server for production

  • 0

I have just moved the dev site over to my linux server for production but the sessions don’t seem to be sticking for very long. I am guessing it is the server settings and not the php because it does the same thing with the plesk panel. Whenever a script is executed the sessions seems to get unset. I see nothing in the error log so not sure what it is. It all worked fine on wamp. Anyway I uploaded the php.ini file which was in the wamp server as it had all the settings i needed and all was working on localhost. Not sure what the problem is and this is the final thing that I have to sort out before going into production. And just too add the sessions are being started as they last for a little bit just don’t stick around long.

Here is the relevent part of my login script just in case there is something wrong with the code:

 // if login is ok then we add a cookie 
if($flag == 0) {
 $pass = htmlspecialchars(mysql_real_escape_string($_POST['pass']));
 $username = htmlspecialchars(mysql_real_escape_string($_POST['username']));



  $_SESSION['username']=$username;
  $_SESSION['password']=$pass;
  • 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-06T08:26:38+00:00Added an answer on June 6, 2026 at 8:26 am

    Please make sure you started the session using session_start() (just to be sure)

    You should look at the setting (PHP.ini/phpinfo()): session.cookie_lifetime
    It defines the lifetime for the cookie to keep track of the session

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

Sidebar

Related Questions

I have just moved a site from a dedicated server to a GoDaddy shared
I just moved from .net development to LINUX MONO development... and i don have
I have just moved a site from a Windows 2003, IIS6 SQL 2005 server
So i have just moved everything from my localhost to a new online server
I have the following error with my ASP.NET web site. I have just moved
I've just moved over to Ubuntu 8.10 as my dev box; it's my first
I've just upgraded my development machine and have moved over a website I was
I have just moved an old classic ASP site from a win2003 IIS6 box
I have just moved a database from our test server to the live server
I have just moved a customer's Classic ASP website to their own VPS server

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.