[eluser]monkster[/eluser]
[quote author="tonanbarbarian" date="1199810775"]If you are including CI directly inside the other framework, like you seem to be in Joomla! then you should be able to just set the variables into the global scope in Joomla! and then grap them from the global scope in CI
Somewhere in Joomla!
Code:
global $myvar;
$myvar = 'something';
or
Code:
$GLOBALS['myvar']='something';
Anywhere in CI
Code:
global $myvar;
echo $myvar;
or
Code:
echo $GLOBALS['myvar'];
The one thing I will warn you about.
Joomla! uses quite a bit of memory by default 4-5Mb of Memory for an average page.
Add onto that Community Builder (which I noticed you are using from your other post) and it will b 6-7M (particularily because you are using plugins in CB)
This means that if you are running on a Linux box and PHP has --with-memory-limit enabled then by default in PHP 4 and PHP 5 you will be limited to 8M of memory (PHP 5.1 and 5.2 are limited to 12 I believe by default)
If you are running on windows you will not have a problem.
What this means is that you have to be very careful with your code if the site is going to run on linux because you may easily run out of memory. If that is the case you have several options
1. increase the memory in php (if you arer allowed to)
2. change your code to run in a seperate thread. i.e. curl or fsockopen to the page as a stand alone app
3. build the plugin in the CB/Joomla framework directly to save some memory
4. move onto a server with no memory limit in php
Kinda off topic i know but just wanted to warn you (have 3 years mambo/joomla experience and know a lot of the pitfalls)[/quote]
Thanks for the warning. This is valuable advice for me
I read from the CI user guide that "During system initialization all global variables are unset, except those found in the $_POST and $_COOKIE arrays. The unsetting routine is effectively the same as register_globals = off."
In that case I was not expecting any $GLOBALS to be present. Am I correct here?
offtopic: I already get a memory error while using CB stock... had to increase.