[Chameleon] PHP5 and Chameleon

Delfos, Jacob jacob.delfos at maunsell.com
Wed Mar 2 19:01:29 EST 2005


Hi Bart,

Thanks for giving those instructions. I'll try it out soon.
I did some testing with DLL dependencies, and found that many DLL's have to
be in the system directory. Even if they are in your PATH, it is not
sufficient. This is quite annoying, because I was trying to do things the
'clean' way, to avoid conflicts, by having my DLL's sorted in separate
directories.

Regards,

Jacob
 

-----Original Message-----
From: bartvde at xs4all.nl [mailto:bartvde at xs4all.nl] 
Sent: 2 March 2005 22:54
To: Delfos, Jacob
Cc: chameleon at lists.maptools.org
Subject: RE: [Chameleon] PHP5 and Chameleon

Hi Jacob,

I think the difference between php.exe and php-cgi.exe is that php.exe is
supposed to be used from the command-line only. It used to be one
executable, but I think they separated the two. See also install.txt:

   |-php-cgi.exe          -- CGI executable
   |
   |-php-win.exe          -- executes scripts without an opened command
prompt
   |
   |-php.exe              -- CLI executable - ONLY for command line
scripting

I did not get any error messages with the ROI sample, the only problem I
had was with the sample application finding chameleon.php.

I changed my include_path in php.ini:

include_path = ".;/ms4w/apps/chameleon/htdocs"

And used in the phtml file:

include( "chameleon.php" );

For the whole module thing I had to do the following:

For PHP4 (with PHP5 this is not necessary because they changed the
directory structures):
copy everything from dlls and sapi to the php root directory.

The following config in httpd.conf:

##
## PHP 4 Module config
##
#AddType application/x-httpd-php .php4 .php3 .phtml .php
#LoadModule php4_module "C:/ms4w/Apache/php/php4apache2.dll"
#PHPIniDir "/ms4w/Apache/php/"

##
## PHP 5 Module config
##
AddType application/x-httpd-php .php4 .php3 .phtml .php
LoadModule php5_module "C:/ms4w/Apache/php5/php5apache2.dll"
PHPIniDir "/ms4w/Apache/php5/"

I did move some of the dll's mapscript depends on, into the system32
folder, but I don't know if this is necessary. I guess not, but I was just
lazy ...

Best regards,
Bart

> Bart,
>
> I just gave it a quick try. I'm running apache 2.52 on Windows XP. I
> normally use PHP4.3.8 as a CGI, with php_mapscript_44. I changed to php
> 5.0.3 CGI, with php_mapscript_45. I did not measure things as you did, but
> I
> noticed a slight drop in performance (roughly 25%). I haven't tried it as
> a
> module (never got that to work).
>
> I got a few errors when using php5, in my Apache error log:
>
>
> starting with:
> [Wed Mar 02 09:12:55 2005] [error] [client 172.21.40.93] PHP Notice:
> Trying
> to get property of non-object in
> C:\\chameleon\\epra\\htdocs\\widgets\\Widget.php on line 386, referer:
> http://auper1pc487/chameleonepra/index.phtml
>
> then one of these lines for every layer turned on:
> [Wed Mar 02 09:12:56 2005] [error] [client 172.21.40.93] msDrawMap():
> Layer
> 9 (Localities), 0.203s\r, referer:
> http://auper1pc487/chameleonepra/index.phtml
>
> ending with:
> [Wed Mar 02 09:12:56 2005] [error] [client 172.21.40.93] msDrawMap():
> Drawing Label Cache, 0.000s\r, referer:
> http://auper1pc487/chameleonepra/index.phtml
>
>
> What is the difference in PHP5 between php.exe and php-cgi.exe? It didn't
> work using normal php.exe.
>
> Regards,
>
> Jacob
>
>
> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org
> [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of
> bartvde at xs4all.nl
> Sent: 1 March 2005 23:23
> To: chameleon at lists.maptools.org
> Subject: [Chameleon] PHP5 and Chameleon
>
> Hi list,
>
> today I have done a little testing using the sample_roi application on
> Windows using Mapserver/Mapscript current CVS version.
>
> First of all, I tested with PHP 4.3.10 as a CGI:
> I got 31/32 hits in a minute.
>
> After that I tested with PHP 4.3.10 as a module
> 34 hits in a minute.
>
> I had expected a higher increase in performance.
>
> Then I compiled php mapscript for PHP5, and switched my MS4W environment
> to use PHP 5 as an Apache 2 module. The results here quite astonish me:
> only 13 hits in a minute
>
> Did anybody else use PHP5? And experience this drop in performance?
>
> Any thoughts appreciated.
>
> Best regards,
> Bart
>
> _______________________________________________
> 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
>



More information about the Chameleon mailing list