Install Mapserver Php Mapscript Ubuntu Download
I need to upgrade from Ubuntu 14.04 to 16.04 but php5 is not officially supported on Ubuntu 16. I install php5.5 by ondrej
repo https://askubuntu.com/a/756186/483814
but when I try to install php5-mapscript
on it i get error :
- Instructions on how to install python-mapscript on Ubuntu 14.04 (Trusty Tahr) using command-line.
- Links for php5-mapscript Ubuntu Resources. Php5-cgi module for MapServer. Download php5-mapscript.
- Php5-cgi module for MapServer. Links for php5-mapscript Ubuntu Resources: Bug Reports; Ubuntu Changelog. Download php5-mapscript.
Therefore i try to compile and install php-mapscript from scratch but i don't find any updated and working manual.
FGS Linux Installer The FGS Linux Installer is a self-extracting file that will install MapServer with PHP/MapScript and all of their dependencies on your Linux system. It provides a stand-alone environment with all the required software (incl. Apache and PHP) to run PHP/MapScript webmapping applications.
So if somebody done it before or have general knowledge about mapserver compilation or if know how to install it from repositories please help.
Answers 3
First answer
Don't try to compile Mapscript on Ubuntu 16.04 with PHP as long as your PHP version is not 5.x.
It will not work for the simple reason that supported PHP version in Ubuntu 16.04 is 7.0 and infortunately for you PHP 7 and MapScript are incompatible at the moment. You can see the related opened issue on the official MapServer Github repository.
The best solution IMO is simply to not upgrade: the support for 14.04 end in April 2019 (source)
Addition
You need when you compile to be sure to have PHP headers (the package is usually named php-dev
or php5.6-dev
) and to set the cmake option to support PHP like illustrated in the section http://www.mapserver.org/installation/unix.html#compiling
Solved: I installed many intel management engine interface drivers but none works on my PC So could you send me a link to driver? Will be - 6203917. Intel management engine interface dell.
Thanks to @ThomasG77 i did compile and install php5-mapscript of Mapserver7.0.2compiled and got loaded successfully:
The manual is based on mapserver general compile documentations:http://www.mapserver.org/installation/unix.html#compiling
Here is the manual I follow to compile [Ubuntu 16.04 /PHP 5.5.38-3+deb.sury.org~xenial+1]:
installing php5.5:
download and extract mapserver source and change directory:
install cmake
make
build
directory and change to it [~/mapserver-7.0.2/build]:install compile requirement
config , compile and install
See https://github.com/bjoernboldt/mapscript-php7 to compile MapScript with PHP7.
Related Questions
Error while compiling gdal 1.9.2 in Ubuntu16.04
Updated September 06, 2017 11:22 AMHow to compile/install php-mapscript with PHP7
Updated January 17, 2019 15:22 PMHow to compile or find PHP MapScript (MapServer) latest version for Windows?
Updated June 08, 2017 06:22 AMConfiguring MapServer on Ubuntu with Apache
Updated March 24, 2019 15:22 PMConfiguration of Apache Mapserver
Updated April 12, 2017 11:22 AMAlternative PHP-Mapscipt for PHP7 with the good old C-code from https://github.com/mapserver/mapserver
The MapScript support for PHP7 through SWIG is still in development. In the meantime I could not wait anymore and modified the old PHP5 stuff to PHP7. Tested on:
-- Ubuntu 14.04.5 LTS with PHP 5.5.9
-- Ubuntu 16.04.2 LTS with PHP 7.0.15
-- Ubuntu 16.04.2 LTS with PHP 7.1.6
-- Ubuntu 16.04.4 LTS with PHP 7.0.28
-- CentOS 7.4.1708 with PHP 7.2.3
-- Debian 9.4 with PHP 7.0.27
To compile with PHP7 you have to replace files in directory ~/mapserver/mapscript/php with this code or use the fork https://github.com/bjoernboldt/mapserver.
First compile MapServer with your desired options, then compile with the WITH_PHP option:
cd ~/mapserver
mkdir build
cd build
Php Mapscript
cmake -DWITH_PHP=1 .
make
Install Mapserver Php Mapscript Ubuntu Download
make install