[Chameleon] Problems with local settings and sample applications

Jacob Delfos jacob.delfos at maunsell.com
Thu Apr 7 20:47:56 EDT 2005


 Jussi,

You seem to lack the main htdocs directory. The htdocs directory (that contains chameleon.php) should be at the same level as the directory that you called "sample". But it doesn't exist. That is why your samples won't work. By trying your "Enhanced JSAPI" widget, you can actually see that error; it's looking for "../../htdocs/chameleon.php".  You probably placed your "htdocs" folder outside of your public area, but that means you'd have to move the samples too, or modify the, currently relative, paths in the phtml files.

Try extracting your installation package again with its original folder structure, and place the directory in the right place. Also, for security purposes, perhaps turn off directory browsing, although it served me well :-). (to do this, remove the "Indexes" value, after the "options" parameter of the web object, and of the "directory" object in the server configuration file (httpd.conf).

regards,

Jacob 



-----Original Message-----
From: chameleon-bounces at lists.maptools.org [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Paul Spencer
Sent: 8 April 2005 08:06
To: Jussi Rasinmäki
Cc: chameleon at lists.maptools.org
Subject: Re: [Chameleon] Problems with local settings and sample applications

weird.  Try adding

$GLOBALS['gszAppPath'] = '/path/to/your/app';

before you include chameleon.php

What version of php/apache are you using?

Paul

Jussi Rasinmäki wrote:
> Hi Paul,
> 
> I'm obviously doing something wrong, but can't quite figure out what it is.
> sample_basic_plainbuttons.phtml returns internal server error and the 
> Apache log has the following entry:
> Premature end of script headers: php, referer: 
> http://latitude.mmvar.helsinki.fi/webmap/sample/htdocs/
> 
> I've edited sample_basic_plainbuttons.phtml:
> include( "/opt/app/chameleon/htdocs/chameleon.php" );
> 
> and chameleon.xml:
>        <param-name>web_server_path</param-name>
>        
> <param-value>http://latitude.mmvar.helsinki.fi/chameleon/</param-value>
> ...
>        <param-name>mapscript_module</param-name>
>        <param-value>php_mapscript.so</param-value>
> ...
>        <param-name>button_cache_path</param-name>
>        <param-value>/tmp/ms_tmp/buttons</param-value>
> ...
>        <param-name>button_cache_web_path</param-name>
>        <param-value>/ms_temp/buttons</param-value>
> ...
>        <param-name>tmp_web_path</param-name>
>        <param-value>/ms_temp</param-value>
> ...
>        <param-name>tmp_img_path</param-name>
>        <param-value>/tmp/ms_tmp</param-value>
> 
> I guess it's something to do with finding the chameleon.php as my 
> earlier addition of app_path to the chameleon.xml got rid of the 
> internal server error but resulted in the app_context error.
> 
> Jussi
> 
> ----- Original Message ----- From: "Paul Spencer" <pspencer at dmsolutions.ca>
> To: "Jussi Rasinmäki" <jussi.rasinmaki at helsinki.fi>
> Cc: <chameleon at lists.maptools.org>
> Sent: Thursday, April 07, 2005 6:01 PM
> Subject: Re: [Chameleon] Problems with local settings and sample 
> applications
> 
> 
>> Opps, you are exactly correct.  I think that must have been a copy and 
>> paste error from a previous version.
>>
>> default_template and default_context are really intended to be in 
>> cwc2.xml as they only affect the 'Service Instance'.
>>
>> You do not need an app_path entry in the configuration file.
>>
>> The errors coming from app_context.php normally mean that the xml 
>> structure in chameleon.xml is invalid in some way ... can be very 
>> tricky to find.
>>
>> I would try replacing chameleon.xml with chameleon.xml-dist and 
>> starting over again without adding any new tags and see what happens.
>>
>> Cheers
>>
>> Paul
>>
>> Jussi Rasinmäki wrote:
>>
>>> 2.0
>>>
>>> ----- Original Message ----- From: "Paul Spencer" 
>>> <pspencer at dmsolutions.ca>
>>> To: "Jussi Rasinmäki" <jussi.rasinmaki at helsinki.fi>
>>> Cc: <chameleon at lists.maptools.org>
>>> Sent: Thursday, April 07, 2005 3:11 PM
>>> Subject: Re: [Chameleon] Problems with local settings and sample
>>> applications
>>>
>>>
>>>
>>>> Jussi,
>>>>
>>>> what version of Chameleon are you using?
>>>>
>>>> Paul
>>>>
>>>> Jussi Rasinmäki wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I've got problems with Chameleon's local settings on Linux. The
>>>>> InstallationGuide lists in Table 3 the local settings most likely to
>>>
>>>
>>> need
>>>
>>>>> changing. These are claimed to be in cwc2.xml. However, most of those
>>>
>>>
>>> can be
>>>
>>>>> found in chameleon.xml except for the app_path setting which I added.
>>>>> default_template and default_context settings are also missing from
>>>>> chameleon.xml. As I couldn't figure out what they mean, I've not added
>>>>> those.
>>>>>
>>>>> This gets me as far as getting the following output from
>>>>> sample_basic_plainbuttons.phtml:
>>>>>
>>>>> Notice: Undefined offset: 1 in
>>>>> /opt/app/chameleon/htdocs/common/appcontext/appcontext.php on line 208
>>>>>
>>>>> Notice: Undefined index: param-name in
>>>>> /opt/app/chameleon/htdocs/common/appcontext/appcontext.php on line 211
>>>>>
>>>>> Any pointers as to what's wrong would be greatly appreciated.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Jussi
>>>>>
>>>>> _______________________________________________
>>>>> Chameleon mailing list
>>>>> Chameleon at lists.maptools.org
>>>>> http://lists.maptools.org/mailman/listinfo/chameleon
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> Chameleon mailing list
>>> Chameleon at lists.maptools.org
>>> http://lists.maptools.org/mailman/listinfo/chameleon
>>>
>>
> 
> 
> 
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon

JACOB DELFOS
SPATIAL INFORMATION ANALYST
Maunsell Australia Pty Ltd
629 Newcastle Street, WA 6007
PO Box 81, WA 6902
Leederville 
Western Australia
ABN 20 093 846 925

Tel     + 61 8 9281 6185
Fax    + 61 8 9281 6297
jacob.delfos at maunsell.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20050408/ddcd4308/attachment-0001.html


More information about the Chameleon mailing list