[MS4W-Users] ms4w 4.0.0 PHP-Mapscript Test
ludwig at kni-online.de
ludwig at kni-online.de
Thu Feb 14 04:30:01 EST 2019
Hi Jeff,
I hadn't read the FM, now included the mapscript.php-File and tested again with partial success.
error 1 still exists
ms_ResetErrorList();
=> "Fatal error: Uncaught Error: Call to undefined function ms_ResetErrorList()",
error 2 disappeared
$ms_map_obj = new mapObj('e:\website\wver_ims_bak\mapserver\blank.map');
=> no error, a "print_r($ms_map_obj)" shows a valid resource:
mapObj Object
(
[_cPtr] => Resource id #3
[_pData:protected] => Array
(
)
)
But new error 3:
$ms_layer_obj = ms_newLayerObj($ms_map_obj);
=> Fatal error: Uncaught Error: Call to undefined function ms_newLayerObj()
I would keep on testing, but Mapserver without layer...
Ludwig
Gesendet: Montag, 11. Februar 2019 um 16:25 Uhr
Von: "Jeff McKenna via MS4W-Users" <ms4w-users at lists.ms4w.com>
An: ms4w-users at lists.ms4w.com
Cc: "Jeff McKenna" <jmckenna at gatewaygeomatics.com>
Betreff: Re: [MS4W-Users] ms4w 4.0.0 PHP-Mapscript Test
Hi Ludwig,
Thank you for your feedback.
As there are many changes as part of MS4W 4, be sure to always first
check the documentation that is part of your local install: eg. for
PHPmapscript see locally http://127.0.0.1/README_INSTALL.html#php
Make sure to follow all of the steps listed there, especially #5 to
include the required file; I will paste those steps here for you to follow:
MapScript configuration
=======================
PHP
---
.. WARNING::
As of the MS4W 4.0.0 release, PHPMapScript uses the `SWIG MapScript
API <https://mapserver.org/mapscript/mapscript.html[https://mapserver.org/mapscript/mapscript.html]>`__.
1. PHPMapScript dll is located in ``/ms4w/Apache/php/ext``
2. PHP's configuration file "php.ini" is located in ``/ms4w/Apache/cgi-bin``
3. PHPMapScript is loaded by default
4. As of the MS4W 4.0.0 release, the PHPMapScript extension uses the
SWIG MapScript API
(see SWIG MapScript API docs at
https://mapserver.org/mapscript/mapscript.html[https://mapserver.org/mapscript/mapscript.html])
5. All of your PHP scripts must now always first include the
``mapscript.php`` file
containing MapServer constants:
// required SWIG include (contains MapServer constants for PHP7)
include("C:/ms4w/apps/phpmapscriptng-swig/include/mapscript.php");
6. Test this syntax with the provided quickmap.php file at
``/ms4w/Apache/htdocs/quickmap.php``
(see usage instructions in the top of that file)
Thank you for your interest in MS4W.
-jeff
On 2019-02-11 6:09 AM, ludwig--- via MS4W-Users wrote:
> Hi List,
> I installed a fresh version ms4w_4.0.0_beta1, Apache starts, phpinfo
> shows "MapServer version 7.4.0-dev (MS4W 4.0.0)", looks fine, but the
> first test of php-mapscript-functions had no success:
> ms_ResetErrorList();
> => "*Fatal error*: Uncaught Error: Call to undefined function
> ms_ResetErrorList()"
> $ms_map_obj = new mapObj('e:\website\wver_ims_bak\mapserver\blank.map');
> => *"Fatal error*: Uncaught Error: Class 'mapObj' not found"
> Stopped further testing. Allthough phpinfo says, mapscript is available,
> the mapscript-functions and -classes aren't recognized.
> By the way, same Scripts on debian (PHP 7.2 and MapScript MapServer
> version 7.3-dev) run without problems...
>
> _
--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/[https://gatewaygeomatics.com/]
_______________________________________________
MS4W-Users mailing list
MS4W-Users at lists.ms4w.com
https://lists.ms4w.com/mailman/listinfo/ms4w-users[https://lists.ms4w.com/mailman/listinfo/ms4w-users]
More information about the MS4W-Users
mailing list