Site management using php Login system solution?How can I prevent SQL injection in PHP?Deleting an element from an array in PHPHow do I get PHP errors to display?How do you parse and process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?PHP Session login crossing between sites on same serverPHP login system sessionAdvanced Login on Symfony 2

Optimization terminology: "Exact" v. "Approximate"

Using Newton's shell theorem to accelerate a spaceship

Cracking the Coding Interview — 1.5 One Away

Why was hardware diversification an asset for the IBM PC ecosystem?

Single word for "refusing to move to next activity unless present one is completed."

What's the minimum number of sensors for a hobby GPS waypoint-following UAV?

How to properly say "bail on somebody" in German?

Are there any sports for which the world's best player is female?

Old Conner IDE hard drives that are mistakenly detected as being 2TB, how do I connect to and image them?

Is there any word for "disobedience to God"?

Print the last, middle and first character of your code

Should disabled buttons give feedback when clicked?

How would vampires avoid contracting diseases?

What's the point of having a RAID 1 configuration over incremental backups to a secondary drive?

RPI3B+: What are the four components below the HDMI connector called?

Was I subtly told to resign?

Mathematica notebook opening off the screen

How to md5 a list of filepaths contained in a file?

Why isn't pressure filtration popular compared to vacuum filtration?

Is a 10th-level Transmutation wizard considered a shapechanger for the purpose of effects such as Moonbeam?

If a non-friend comes across my Steam Wishlist, how easily can he gift me one of the games?

Why queuable apex accepts sobjects where as future methods doesn't?

How is angular momentum conserved for the orbiting body if the centripetal force disappears?

Making polynomials representing frequency of a character in a list



Site management using php Login system solution?


How can I prevent SQL injection in PHP?Deleting an element from an array in PHPHow do I get PHP errors to display?How do you parse and process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?PHP Session login crossing between sites on same serverPHP login system sessionAdvanced Login on Symfony 2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Imagine that I have a website xyz.com with several subdomains like site1.xyz.com [ a drupal site ] , site2.xyz.com [a symfony site] , site3.xyz.com [ a laravel site ] and so on.


I would like to create a php login system which will be on xyz.com. A user will login to xyz.com and then be able to access any of the subdomains mentioned above. After set time, session will timeout and bring the user back to login screen.



Is this possible with the php login system or any other javascript or java framework ?



I have already implemented the php login system but SESSION thing is not working with all of sites mentioned above. I tried to create a sample inside.php with SESSION, it didn't work.



Do I need to put this code in each of the subdomains site1.xyz.com that needs to be controlled by the php login system ?



if (!isset($_SESSION['userId']) || !isset($_SESSION['userUid']))


echo '<p class="login-status">You are logged out.. </p>';
header("Location: ../index.php");
exit();





Results: Even if the SESSION : userId and userUid was NOT set, it would still display the page.










share|improve this question




























    0















    Imagine that I have a website xyz.com with several subdomains like site1.xyz.com [ a drupal site ] , site2.xyz.com [a symfony site] , site3.xyz.com [ a laravel site ] and so on.


    I would like to create a php login system which will be on xyz.com. A user will login to xyz.com and then be able to access any of the subdomains mentioned above. After set time, session will timeout and bring the user back to login screen.



    Is this possible with the php login system or any other javascript or java framework ?



    I have already implemented the php login system but SESSION thing is not working with all of sites mentioned above. I tried to create a sample inside.php with SESSION, it didn't work.



    Do I need to put this code in each of the subdomains site1.xyz.com that needs to be controlled by the php login system ?



    if (!isset($_SESSION['userId']) || !isset($_SESSION['userUid']))


    echo '<p class="login-status">You are logged out.. </p>';
    header("Location: ../index.php");
    exit();





    Results: Even if the SESSION : userId and userUid was NOT set, it would still display the page.










    share|improve this question
























      0












      0








      0








      Imagine that I have a website xyz.com with several subdomains like site1.xyz.com [ a drupal site ] , site2.xyz.com [a symfony site] , site3.xyz.com [ a laravel site ] and so on.


      I would like to create a php login system which will be on xyz.com. A user will login to xyz.com and then be able to access any of the subdomains mentioned above. After set time, session will timeout and bring the user back to login screen.



      Is this possible with the php login system or any other javascript or java framework ?



      I have already implemented the php login system but SESSION thing is not working with all of sites mentioned above. I tried to create a sample inside.php with SESSION, it didn't work.



      Do I need to put this code in each of the subdomains site1.xyz.com that needs to be controlled by the php login system ?



      if (!isset($_SESSION['userId']) || !isset($_SESSION['userUid']))


      echo '<p class="login-status">You are logged out.. </p>';
      header("Location: ../index.php");
      exit();





      Results: Even if the SESSION : userId and userUid was NOT set, it would still display the page.










      share|improve this question














      Imagine that I have a website xyz.com with several subdomains like site1.xyz.com [ a drupal site ] , site2.xyz.com [a symfony site] , site3.xyz.com [ a laravel site ] and so on.


      I would like to create a php login system which will be on xyz.com. A user will login to xyz.com and then be able to access any of the subdomains mentioned above. After set time, session will timeout and bring the user back to login screen.



      Is this possible with the php login system or any other javascript or java framework ?



      I have already implemented the php login system but SESSION thing is not working with all of sites mentioned above. I tried to create a sample inside.php with SESSION, it didn't work.



      Do I need to put this code in each of the subdomains site1.xyz.com that needs to be controlled by the php login system ?



      if (!isset($_SESSION['userId']) || !isset($_SESSION['userUid']))


      echo '<p class="login-status">You are logged out.. </p>';
      header("Location: ../index.php");
      exit();





      Results: Even if the SESSION : userId and userUid was NOT set, it would still display the page.







      php web frameworks






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 2:14









      qw008qw008

      11 bronze badge




      11 bronze badge






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348915%2fsite-management-using-php-login-system-solution%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348915%2fsite-management-using-php-login-system-solution%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript