Skip to main content
Post Closed as "Duplicate" by avpaderno
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
clarified, corrected spelling
Source Link

Using Drupal's session inside a phpPHP script

I need to pass parameters from a drupalDrupal page to a phpPHP script. There's notno way to get passedpass that directly and iI need to use SESSIONS. I've searched around and added this at the top of the script:

define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);

With that iI can use drupal'sDrupal's session but i'mI'm getting this error:

Warning: session_start(): Cannot send session cache limiter - headers already sent

ItsIt's not so bad since itsit's just a warning and iI can use cssCSS to make it not visible to the user. But iI was wondering if there is a cleaner way to do so...

Using Drupal's session inside a php script

I need to pass parameters from a drupal page to a php script. There's not way to get passed that and i need to use SESSIONS. I've searched around and added this at the top of the script:

define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);

With that i can use drupal's session but i'm getting this error:

Warning: session_start(): Cannot send session cache limiter - headers already sent

Its not so bad since its just a warning and i can use css to make it not visible to the user. But i was wondering if there is cleaner way to do so...

Using Drupal's session inside a PHP script

I need to pass parameters from a Drupal page to a PHP script. There's no way to pass that directly and I need to use SESSIONS. I've searched around and added this at the top of the script:

define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);

With that I can use Drupal's session but I'm getting this error:

Warning: session_start(): Cannot send session cache limiter - headers already sent

It's not so bad since it's just a warning and I can use CSS to make it not visible to the user. But I was wondering if there is a cleaner way to do so.

edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Loading
Source Link
doron
  • 427
  • 1
  • 6
  • 14
Loading