PHP extension 'MapScript' only runs in Apache DSO
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mapserver (Baltix) |
New
|
Undecided
|
Unassigned | ||
mapserver (Debian) |
Fix Released
|
Undecided
|
Unassigned | ||
mapserver (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: php5-mapscript
The PHP5 MapScript extension (from the UMN MapServer project) does not work when PHP5 is running in either CGI/FCGI or CLI modes. For example, when trying to use the MapScript extension in a PHP5 script run from the command line, the following error message is emitted:
"This build of mapscript can't be load as a 'cli' module for stability reason, but only with php as an apache DSO."
I have examined the package source, and I have isolated the cause of this bug. There is a specific patch in the Debian build source for package 'php5-mapscript' that inserts a check in the startup code for the PHP/MapScript extension. The inserted code checks the sapi_module name, and if it is 'cli', 'cgi', or 'cgi-fcgi', the extension emits the above error message, and exits.
Specifically, the patch is: mapserver-
(As I write this, ${version} == "4.10.2".)
Whatever the reason for forbidding the use of the PHP/MapScript extension in CGI/FCGI or CLI modes, I believe that it is no longer valid. In fact, the MapServer documentation recommends running PHP/MapScript in CGI mode, in preference to DSO.
See: http://
Specifically, this FAQ appears there:
Q: Does PHP/Mapscript have to be setup as a CGI? If so, why?
A: Yes, please see the [link]PHP/Mapscript CGI page[/link] in the Mapserver Wiki for details.
I feel that the simplest and best remedy for this bug is to remove the above patch ('20_php_
For convenience, I have attached a copy of '20_php_ build.dpatch' from the 'debian/patches' directory of the 'mapserver' package. As mentioned in my bug report, I am requesting that this patch be removed from the package source.