MapTools.org

[Chameleon] Re: Problem runnig chameleon demo

Paul Spencer pagameba@magma.ca
Fri, 10 Oct 2003 07:05:52 -0400 (EDT)
Hi,

I'm not exactly sure what the problem is.  PHP is complaining because it cannot find the
class definition for Chameleon, which is defined in chameleon.php.  According to what you
have told me below, this should be in

d:/ms4w/apps/chameleon/htdocs

i.e.

include_once( "d:/ms4w/apps/chameleon/htdocs/chameleon.php" );

Your apache alias should have no bearing on this particular error since it is not a
web-related problem, just a file path problem.

As a side note, it is recommended that you use two aliases in this kind of setup:

/chameleon/ => d:/ms4w/apps/chameleon/htdocs

- and this web path would also need to be put into the chameleon configuration file

/chameleon_sample/ => d:/ms4w/apps/chameleon_sample/htdocs

that way you access your app throught http://localhost/chameleon_sample/.  Not only is it
shorter, but it is more secure since you are only exposing the htdocs directory to web
surfers, and the other potentially sensitive directories are kept hidden.

Cheers,

Paul

On Oct 10, "BAUD remi" <remi.baud@eivd.ch> wrote:
> 
> Hi,
>  
> I got a problem when I run: <a
href='http://localhost/ms4w/apps/chameleon_sample/htdocs/index.phtml'>http://localhost/ms4w/apps/chameleon_sample/htdocs/index.phtml</a>
> the fatal error is:
> 
> Fatal error: Class sampleapp: Cannot inherit from undefined class chameleon in
D:\ms4w\apps\chameleon_sample\htdocs\index.phtml on line 14
> 
> My directories configuration is: D:\ms4w\apps and then I place the two directories
chameleon and chameleon_sample.
>  
> when I set (in index.phtml : include( /ms4w/apps/chameleon/htdocs/chameleon.php <<a
href='http://localhost/ms4w/apps/chameleon/htdocs/chameleon.php&gt;'>http://localhost/ms4w/apps/chameleon/htdocs/chameleon.php></a>
" ); It fails to open chameleon.php
> but if i set include( "<a
href='http://localhost/ms4w/apps/chameleon/htdocs/chameleon.php&#34;'>http://localhost/ms4w/apps/chameleon/htdocs/chameleon.php"</a>
); there is no problem.
> (Just the fatal error)
>  
> I've set in http.conf (for apache) an Alias for   "D:\ms4w\"       as     /ms4w/
> Was it the right thing to do??
>  
>  
>  
> Best Regards !
>  
> 
> 


This archive was generated by Pipermail.