I am using drupal 7 services module version 3.x. I do not want my session to be expired. I have set ini_set('session.gc_maxlifetime', 946080000); and ini_set('session.cookie_lifetime', 0);

This is working fine for me when I am using POSTMAN in my browser, it does not expire till I close all my browser tab and clear the cache.

When I login through mobile app my session expires after 24 hours and I receive 403 error. How can I stop my session to expire.

  • 1
    You can use jdrupal.js file for connection to your drupal site. Add Drupalsitename and endpoint of service to your mobile js file. You can refer this jdrupal. Then Session not expire until you close app.
    – amruta.k
    May 10, 2016 at 10:26
  • I do not want the session to be closed until user calls drupal logout service. I want it to get handled through Drupal end. Note: I am using drupal as backend and mobile app is used for accessing the drupal services only.
    – Anamika
    May 10, 2016 at 11:12
  • I am using drupal 7
    – Anamika
    May 10, 2016 at 11:19
  • 1
    You can try DrupalGap module. But I am sure about session storage till logout. You can use jdrupal and store user data in local storage. If local storage available then login again with user data else display login page. In this way session not expire.
    – amruta.k
    May 10, 2016 at 11:28
  • Thanks but I am just exposing drupal services to mobile app which are not in drupal and I can not add drupal code over there
    – Anamika
    May 10, 2016 at 12:09


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.