Summary: | [Chameleon] New "php_chameleon.dll" extension | ||
---|---|---|---|
Product: | Chameleon | Reporter: | Daniel Morissette <dmorissette@mapgears.com> |
Component: | PHP-Ext | Assignee: | assefa yewondwossen <assefay@gmail.com> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jlacroix@mapgears.com |
Priority: | P2 | ||
Version: | 1.99 | ||
Target Milestone: | 2.2 | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 177 |
Assigned to Julien.
Setting target milestone to 1.99 RC1, same as dependent bug 177
Daniel, do we need a new cvs project for this? Or can we include the source inside chameleon (chameleon/ext)? It isn't really a problem to have the makefile include the source from a different cvs project (as we do with php_utils) but it does make it more difficult for cvs users to stay up to date ... we currently get problems reported because someone forgot to update php_utils (and this happens to me occasionally). Also, is there any difference between extensions for php4 and php5 in basic structure and design that would make a difference if we designed this module only for php5?
I thought about including the source under the chameleon CVS as well after writing the initial bug report... so I agree that could be a good idea. While we're at it, perhaps we could find a home for the rest of the C source that's going to be used by the extension and not just the wrappers. Maybe something like this: chameleon/ext/src/ -> The C source for a library of functions used by the PHP module and possibly by other external programs. chameleon/ext/wmsparse -> The new home of the wmsparse program. Actually just the main() function, the rest would be under ../src chameleon/ext/php -> Home of the PHP extension chameleon/ext/swig -> If we ever have swig wrappers??? etc...etc... About PHP4 vs PHP5, we're not doing anything fancy at this point so I wouldn't worry too much about that.
I've started to work on this. First step is to separate wmsparse. After I will do PHP extension. I will try to work with PHP5, but there should be no differences. The PHP5 README.EXT_SKEL still say: "First, change to the ext/ directory of the PHP 4 sources." :)
You might be better work with PHP4: there are more chances that a PHP4-generated extension will work in PHP5 than the reverse.
I just commited a new directory in Chameleon. ext/src/ => The home of libchameleon.a which is currently only the exposed wmsparse functionality. ext/wmsparse/ => The home of the wmsparse cgi. It's now only the main() function and it link to src/wmsparse.h. ext/php/ => The home of the php extension. It links to libchameleon.a. It creates chameleon.so. Two functions are available for now in the extension (see README.txt). Like the wmsparse cgi you have: wmsparse_add_server( string pszXMLDoc, string pszServerDB, string pszLayerDB, string pszBBoxDB, string pszStyleDB, string pszSRSFileName, string pszAbstractFileName, [int nServerID] ) Function to load WMS Server info in various DBF. pszXMLDoc is the XML file of the WMS capabilities. All other parameters are path to the dbf files containing the WMS informations. wmsparse_add_server_dir( string pszXMLDoc, string pszDirectory, int nServerID ) Function to load WMS Server info in various DBF. DBF Are located in pszDirectory. The names are: server.dbf, layer.dbf, bbox.dbf and style.dbf. pszXMLDoc is the XML file of the WMS capabilities. Reassigning to Assefa for the windows build.
I commited some modifications to the chameleon php extension. The main change is the error handling via the CPL library (from GDAL). Still assigned to Assefa to rebuild the windows build.
New windows binaries are on /netbin/private/php_chameleon_20050412.zip
Thanks Assefa. I have updated the chameleon/ext/README.txt file with more information on how to compile it on Linux. Marking as FIXED since this is completed. There's two new bugs for the MS4W package and the FGS packages. MS4W: Bug 1060 FGS: Bug 1061 Note that from now, the wms_parse_file configuration parameter can be empty.
Bug 177 raised a security issue related to the use of the 'wmsparse' external program on IIS servers. After further discussion of this specific issue and of the alternatives, it was decided to create a new "php_chameleon.dll" PHP DL extension to provide the 'wmsparse' services, and eventually provide any other low-level service that Chameleon may require. If anyone has a better name than "php_chameleon" for the extension then please speak up now. Tasks: - Created a new "PHP-Ext" component in bugzilla for this extension. (done) - Create new PHP extension, see README.EXT_SKEL in PHP source package - Extension will live in a new "php_chameleon" CVS project on maptools - The current wmsparse should continue to be available and supported. wmsparse.c will need to be split in two files: the main() and the utility functions. The PHP extension will simply be a wrapper on top of those functions. - Update the Chameleon code that currently calls wmsparse to first check and use the module if it is available. Julien is going to work on this later this week.