[Chameleon] Chameleon and Joomla!

Normand Savard nsavard at mapgears.com
Thu Feb 12 10:05:51 EST 2009


Bendaoud med wrote:
> hi,
>
> i'm trying chameleon with Joomla!. i put this code in Joomla! :
>
> <?php
> include("C:/ms4w/apps/chameleon/htdocs/chameleon.php");
> $szTemplate = "./mytemplate.html";
> $szMapFile = "../map/mymap.map";
>
> class MyApp extends Chameleon
> {
>   function MyApp()
>   {
>     parent::Chameleon();
>     $this->moMapSession = new MapSession_RW;
>     $this->moMapSession->setTempDir( getSessionSavePath());
>   }
> }
>
> $oApp =  new MyApp();
> $oApp->CWCInitialize($szTemplate,$szMapFile);
> $oApp->mnMinimumMaturityLevel = MATURITY_UNKNOWN;
> $oApp->CWCExecute();
> ?>
>
> but i get these errors :
>
> *Warning*: ini_set()
> [function.ini-set<http://localhost/spatialmining/function.ini-set>]:
> A session is active. You cannot change the session module's ini settings at
> this time. in *C:\ms4w\apps\chameleon\htdocs\common\session\session.php* on
> line *446*
> *Notice*: A session had already been started - ignoring session_start() in *
> C:\ms4w\apps\chameleon\htdocs\common\session\session.php* on line *509*
> *Notice*: Trying to get property of non-object in *
> C:\ms4w\apps\chameleon\htdocs\widgets\MapDHTML\MapDHTML.widget.php* on line
> *188*
> *Fatal error*: Call to a member function set() on a non-object in *
> C:\ms4w\apps\chameleon\htdocs\widgets\MapDHTML\MapDHTML.widget.php* on line
> *198*
>
> I am frustrated. Do you have some ideas? Thank you.
>
>   
Bendaoud,

I tested your code and I was able to display your page without error.  
What I did:

-I made a directory called "bug" on the same level as Chameleon
-I created a page called "index.phtml" with your code above within it
-I set $szTemplate to /path/to/chameleon/samples/sample_basic.html
-I set $szMapFile to /path/to/chameleon/samples/map/chameleon.map
-I opened your page in a browser and got no error

Norm





More information about the Chameleon mailing list