Changes between Initial Version and Version 1 of MapGuideRfc138


Ignore:
Timestamp:
Sep 2, 2013, 3:04:17 AM (11 years ago)
Author:
jng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc138

    v1 v1  
     1
     2= !MapGuide RFC XYZ - Upgrade Apache, Tomcat and PHP =
     3
     4This page contains a change request (RFC) for the !MapGuide Open Source project.
     5More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page.
     6
     7
     8== Status ==
     9
     10||RFC Template Version||(1.0)||
     11||Submission Date||2 Sep 2013||
     12||Last Modified||2 Sep 2013||
     13||Author||Jackie Ng||
     14||RFC Status||draft||
     15||Implementation Status||pending||
     16||Proposed Milestone||2.6||
     17||Assigned PSC guide(s)||(when determined)||
     18||'''Voting History'''||(vote date)||
     19||+1||||
     20||+0||||
     21||-0||||
     22||-1||||
     23||no vote|| ||
     24
     25== Overview ==
     26
     27This RFC proposes to upgrade Apache, Tomcat and PHP to the latest versions:
     28
     29 * Apache: 2.4.6
     30 * Tomcat: 7.0.42
     31 * PHP: 5.5.3
     32
     33== Motivation ==
     34
     35We are currently building against what is now very old versions of Apache and PHP, which is not a good thing from a security standpoint.
     36
     37In addition, we should ideally move to a version of Apache and PHP that is built off of the same Visual Studio 2012 C++ compiler, since the MapGuide codebase has already migrated to this compiler.
     38
     39Moving to Apache httpd 2.4.x and PHP 5.5.x solves both of these issues:
     40
     41 * Apache 2.4.6 is the latest stable version of Apache. http://www.apachelounge.com offers VC11 builds of Apache 2.4.x.
     42 * PHP 5.5.3 is the latest stable version of PHP. VC11 is also the official windows compiler used to build the 5.5.x series of PHP
     43
     44== Proposed Solution ==
     45
     46Upgrade Apache to 2.4.6
     47Upgrade Tomcat to 7.0.42
     48Upgrade PHP to 5.5.3
     49
     50Update the PHP generation code in our custom build of SWIG to address any API changes caused by moving to PHP 5.5
     51
     52Update our zip distributions of Apache, PHP and Tomcat under Installer\Support to these new versions
     53
     54For this upgrade, we will also streamline the build system and reduce the checkout footprint as follows:
     55
     56 * For Windows/Linux: Do not check in a full unpacked source distribution of PHP into Oem. Instead check in the PHP 5.5.3 tarball under Oem\LinuxApt
     57 * For Windows: Also we only check-in 32-bit/64-bit php5ts.lib and any modified headers (for ACE compatibility) under Oem\php
     58 * For Windows: Also check-in 32-bit/64-bit libs for httpd and any modified headers (for ACE compatibility) under Oem\httpd
     59 * For Windows: Add a new prepare_webtier_components.bat to extract these tarballs (if necessary) and overlay our checked-in lib/header files on top.
     60 * For Windows: Modify setenvironment.bat/setenvironment64.bat to define the following environment variables:
     61    * PHP_SRC - The path to do the extracted PHP source
     62    * PHP_LIB - The path to where php5ts.lib is located
     63    * HTTPD_SRC - The path to the extracted httpd source
     64    * HTTPD_LIB - The path to where the httpd lib files are located
     65 * For Windows: Modify the include/linker paths of the following projects to point to these environment variables:
     66    * Oem
     67       * SQLitePhpApi
     68    * WebTier
     69       * ApacheAgent
     70       * PhpApi
     71       * PhpMapGuideApiEnvConfig
     72 * For Linux: Check in tarballs of apr and apr-util under Oem\LinuxApt, which is now needed to build httpd 2.4 with the existing {{{--with-included-apr}}} option.
     73 * For Linux: Modify the root configure.in to parameterize the httpd and php source directories (as {{{$(httpd_src)}}} and {{{$(php_src)}}} respectively). If desired, such paths can be overridden with {{{--with-httpd=/path/to/httpd/source}}} and {{{--with-php=/path/to/php/source}}} parameters to the main {{{./configure}}} script.
     74 * For Linux: Modify include/library paths in Makefile.am to use these new path variables
     75 * For Linux: Oem\LinuxApt\build_apt.sh will be modified to:
     76    * Also build PHP from the checked-in tarball
     77    * Only start httpd and tomcat if the {{{--start-httpd}}} and {{{--start-tomcat}}} switches have been passed along to build_apt.sh
     78
     79By using environment variables for Apache and PHP, it will make future Apache/PHP upgrades simpler and allows for Linux builds the opportunity to compile and link against the system
     80installed versions of Apache and PHP if available (an important consideration should we ever want to re-introduce MapGuide into the OSGeo LiveDVD where disk space is a premium)
     81
     82These environment variables must be set (manually or by setenvironment.bat/setenvironment64.bat) before any of the aforementioned projects can be built in the Visual Studio IDE. This is already the case with the JavaApi and JavaApiEx projects in the WebTier (which require JAVA_HOME to be set), so this should not be anything new.
     83
     84With everything in the MapGuide stack (including FDO) now built under the same compiler, we should also now be able to stop bundling and requiring installation of the Visual C++ 2008 and 2010 runtime libraries as pre-requisite installations for smaller installer size. Further testing will reveal if this is the case.
     85
     86== Implications ==
     87
     88The MapGuide API itself will not change with this upgrade, but there are underlying changes in the Apache/PHP platform that users/developers should be aware of
     89
     90Developers of MapGuide PHP applications that are using custom/external PHP 5.3 extensions (ie. Not included with the MapGuide installer) will need to look for PHP 5.5 supported equivalents.
     91
     92PHP developers should be mindful about what has changed in the PHP platform itself since 5.3 and make any changes in their application code. Migration guides for (5.3 to 5.4) and (5.4 to 5.5) are included below for reference:
     93
     94 * http://php.net/manual/en/migration54.php
     95 * http://php.net/manual/en/migration55.php
     96
     97Similarly, any custom configuration modifications to httpd.conf may need changes/migrations to ensure compatibility with httpd 2.4
     98
     99 * https://httpd.apache.org/docs/2.4/upgrading.html
     100
     101== Test Plan ==
     102
     103Build and run on Windows and Linux. Ensure the PHP and Java AJAX viewers function as before.
     104
     105Verify all tests pass with the existing MapGuide API PHP test runner.
     106
     107== Funding / Resources ==
     108
     109Community