[Chameleon] chameleon install and logging problem

Jason Fournier jfournier@dmsolutions.ca
Wed Apr 7 19:28:48 EDT 2004


James,

The html template is one component of your application.  In order to 
initialize Chameleon to parse the template you use another file, 
normally called index.phtml, which contains paths to your template (eg, 
demo.html) and your mapfile.  Here is what a simple index file would 
look like:

------------------------------------------------------------------------------------------------

include( "/path/to/chameleon/htdocs/chameleon.php" );

$szTemplate = "demo.html";
$szMapFile = "/path/to/mapfile.map";

class test extends Chameleon
{
  function test()
  {
    parent::Chameleon();
    $this->moMapSession = new MapSession_RW;
    $this->moMapSession->setTempDir( getSessionSavePath());
  }

  function CWCInitializeMap()
  {
    parent::CWCInitializeMap();
  }

  function CWCLoadTemplate($szTemplateName)
  {
    $this->mszTemplate = implode("\n", file($szTemplateName));
  }
}

$oApp =  new test();
$oApp->CWCInitialize( $szTemplate, $szMapFile  );
$oApp->CWCExecute();

------------------------------------------------------------------------------------------------

Place this file in the same directory as your template.

Regards,
Jason





james cradock wrote:

>hello,
>
>sadly, my first post is an installation (or configuration) problem:
>
>i've installed chameleon on red hat linux. i'm running apache 2.0.48. php
>is running as a module, not as a cgi. here's my demo page:
>
>http://redington.me3.com/chameleon/htdocs/demo.html
>
>probably a common problem. what's the solution?
>
>i'm using the latest alpha of 1.1. followed all the instructions -- or
>*thought* i'd followed all the instructions -- in the somewhat outdated
>installation document.
>
>also, logging is not (logging). i'd normally tail the logs for activity or
>errors. i've asked chameleon to log everything (all), but i get nothing.
>logs directory is writeable by the apache user.
>
>thanks.
>
>jc
>
>-----
>james cradock
>jcradock@redington.me3.com
>_______________________________________________
>Chameleon mailing list
>Chameleon@lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/chameleon
>
>  
>

-- 
___________________________
Jason Fournier
DM Solutions Group
Application Developer
Ottawa, ON
613.565.5056 x 18
jfournier@dmsolutions.ca






More information about the Chameleon mailing list