[TYPO3] Accessing $GLOBALS['TSFE'] from other PHP scripts
John Nicholas
typo3user at mobosplash.com
Thu Feb 2 19:54:03 CET 2006
S. Teuber wrote:
> Hi John,
>
>> I am writing a set of flash remoting services that will be used by
>> flash movies on my site. I'd like for those remoting scripts to have
>> access to some of the data in the TSFE object. What is the simplest
>> way to get access to the $GLOBALS['TSFE'] from a non-plug-in php
>> script? It's
>
> Global variables are created during runtime of a PHP script and are
> "global" (=available) to that script only. The fact that
> $GLOBALS['TSFE'] is available in every extension of TYPO3 is related to
> the fact that all those extensions are included by a single "master" PHP
> script, thus they are all just one script which is build from many
> files. After the execution of that script, $GLOBALS['TSFE'] is deleted
> and no more available.
>
> If it wasn't the case that every PHP-script has it's own $GLOBALS, we
> had a lot of trouble mixing up variables when many users access a
> PHP-driven website simultaneously. ;)
>
> There is no way to get variables from another script instance without
> putting them in a database or filesystem.
I understand all of that. What I am trying to determine is what is the
easiest way for my script that is not running under typo3 to have access
to the login information that typo3 uses. The goal is for users to login
to the typo3 front end and for these flash services to be aware of that
same login information.
Unfortunately the more I dig through class.t3lib_userauth.php and
class.tx_sv_authbase.php the more it looks like they are so integrated
into the rest of the typo3 code that I won't be able to do what I
thought. I assumed that most of the user information was stored in
sessions so that I could just access that information. It looks like
typo3 loads the data in from the database every request. I can hit the
same tables but I was hoping I could do it without recreating that
database code.
More information about the TYPO3-english
mailing list