[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/lib/ -> cookieless.php (summary)

Enable cookieless sessions by including $CFG->usesid=true; in config.php. Based on code from php manual by Richard at postamble.co.uk Attempts to use cookies if cookies not present then uses session ids attached to all urls and forms to pass session id from page to page. If site is open to google, google is given guest access as usual and there are no sessions. No session ids will be attached to urls for googlebot. This doesn't require trans_sid to be turned on but this is recommended for better performance you should put : session.use_trans_sid = 1 in your php.ini file and make sure that you don't have a line like this in your php.ini session.use_only_cookies = 1

Author: Richard at postamble.co.uk and Jamie Pratt
License: http://www.gnu.org/copyleft/gpl.html GNU Public License
File Size: 136 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 5 functions

  sid_ob_rewrite()
  sid_ob_rewrite_absolute()
  sid_rewrite_link_tag()
  sid_process_url()
  sid_start_ob()

Functions
Functions that are not part of a class:

sid_ob_rewrite($buffer)   X-Ref
You won't call this function directly. This function is used to process
text buffered by php in an output buffer. All output is run through this function
before it is ouput.

param: string $buffer is the output sent from php
return: string the output sent to the browser

sid_ob_rewrite_absolute($buffer)   X-Ref
You won't call this function directly. This function is used to process
text buffered by php in an output buffer. All output is run through this function
before it is ouput.
This function only processes absolute urls, it is used when we decide that
php is processing other urls itself but needs some help with internal absolute urls still.

param: string $buffer is the output sent from php
return: string the output sent to the browser

sid_rewrite_link_tag($matches)   X-Ref
A function to process link, a and script tags found
by preg_replace_callback in {@link sid_ob_rewrite($buffer)}.


sid_process_url($url)   X-Ref
You can call this function directly. This function is used to process
urls to add a moodle session id to the url for internal links.

param: string $url is a url
return: string the processed url

sid_start_ob()   X-Ref
Call this function before there has been any output to the browser to
buffer output and add session ids to all internal links.




Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7