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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:35:07+00:00 2026-06-09T17:35:07+00:00

I am checking if the cookie exists or not. Code run perfect on localhost

  • 0

I am checking if the cookie exists or not. Code run perfect on localhost but not working on server.

if(!isset($_COOKIE['checkuser']))
{
  // Create a cookie
}
else
{
  // do other other action
}

page is not being load on if accessing from webserver. but on localhost its work fine. is there is some setting that I need to do for this ?

  • 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-09T17:35:09+00:00Added an answer on June 9, 2026 at 5:35 pm

    If your error is “the page is not loading” then it is almost certainly not related to the code you posted. You mention in a comment that you’re doing some database calls in code you didn’t post – that’s far more likely to cause trouble than an isset() call.

    What error are you seeing? If you are seeing just a blank page, that’s likely a syntax error which is being logged to the server’s error log rather than to the screen, for security purposes. Check your server’s error logs for an associated message.

    It’s likely your server is running either a different version of PHP or a different security level (PHP safe mode, for instance) which is causing it to fail on the server but not on your machine. Alternatively, it may be failing to connect to the server’s database.

    Please update your question with more information (more code and/or the exact error message would be a good start) if this isn’t enough information to solve your problem.

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

Sidebar

Related Questions

Hello I currently have this code checking if a cookie exists, it works all
Checking for cookies with code below if (!isset($_COOKIE['auth'])) { header('Location:' . wsurl); } My
i'm setting a cookie using this code: setcookie(Blah,user,time()+86400); i'm then checking that cookie on
Checking to see if __name__ == '__main__' is a common idiom to run some
Checking the datagrid example here http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html see the datagrid section It says that if
Just checking my JS and I have an error, but I cannot see where.
when checking the source code of a site on firefox I got this on
I have at condition checking to see if user has a cookie like this:
I've seen some limited resources on checking for cookies with Nginx, but I couldn't
I have a null check in code that is checking to see whether a

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.