Opened 8 years ago

Closed 7 years ago

#74 closed task (fixed)

Include PHP 5.6 in next stable release

Reported by: Jeff McKenna Owned by: Jeff McKenna
Priority: critical Milestone: 3.2.0 release
Component: MS4W - PHP Version: 3.1.4
Keywords: Cc: TC Haddad
Blocked By: Blocking:

Description

Include PHP 5.6 series in the next MS4W stable release (likely named "MS4W 3.2.0"), as the PHP team will continue to release security releases for the 5.6 branch until Jan 2019. http://php.net/supported-versions.php

This will give time for projects to adapt to PHP 7.

Change History (13)

comment:1 by Jeff McKenna, 8 years ago

From Tanya: Joomla's PHP usage stats https://developer.joomla.org/about/stats.html

comment:2 by Jeff McKenna, 8 years ago

Status: newaccepted

comment:3 by Jeff McKenna, 8 years ago

I've begun this process for PHP 5.6, where the compiler will have to be switched to Visual Studio 2012, and all MS4W libraries will have to be recompiled with this "new" compiler. I also had to uninstall Visual Studio 2015, because of errors having both installed on the same server.

comment:4 by Jeff McKenna, 8 years ago

Progress update so far, as of today:

  • rebuilt JPEG support with Visual Studio 2012 compiler
  • rebuilt zlib support with Visual Studio 2012 compiler
  • upgraded libPNG support to 1.6.24 with Visual Studio 2012 compiler
  • upgraded libTIFF support to CVS-head-08082016 with Visual Studio 2012 compiler
  • rebuilt PROJ.4 support with Visual Studio 2012 compiler
  • upgraded GeoTIFF support to SVN-trunk-08082016 with Visual Studio 2012 compiler
  • upgraded Expat support to 2.2.0 with Visual Studio 2012 compiler
  • upgraded Xerces support to 3.1.4 with Visual Studio 2012 compiler
  • rebuilt SZIP support with Visual Studio 2012 compiler
  • upgraded HDF5 support to 1.8.17 with Visual Studio 2012 compiler
  • upgraded HDF4 support to 4.2.12 with Visual Studio 2012 compiler
  • rebuilt MrSID support with Visual Studio 2012 compiler
  • upgraded PostgreSQL support to 9.5.4 with Visual Studio 2012 compiler
  • upgraded MySQL support to 5.7.14 with Visual Studio 2012 compiler
  • upgraded GEOS support to SVN-trunk-0812016 with Visual Studio 2012 compiler
  • upgraded SQLite support to 3.14.1 with Visual Studio 2012 compiler
  • rebuilt ICONV support with Visual Studio 2012 compiler
  • rebuilt FreeXL support with Visual Studio 2012 compiler
  • upgraded libxml2 support to 2.9.4 with Visual Studio 2012 compiler

comment:5 by Jeff McKenna, 8 years ago

One major issue, is compiling Python with the Visual Studio 11 [2012] compiler (which is required for PHP 5.6). Compiling Python requires:

  • Visual Studio 14.0 (2015) for Python 3.5
  • Visual Studio 10.0 (2010) for Python 3.3, 3.4
  • Visual Studio 9.0 (2008) for Python 2.6, 2.7, 3.0, 3.1, 3.2

Read more at:

Yikes, so PHP 5.6 supports only one compiler, and Python doesn't support that compiler.

This really needs more thought. Full stop. If anyone has ideas please let me know.

I wonder if there is any way for PHP 5.6 to compile with Visual Studio 2015; I believe the answer is 'impossible' though (see https://wiki.php.net/internals/windows/compiler).

This is a tough one.

comment:6 by Jeff McKenna, 8 years ago

A workaround could be to use the Visual Studio 2012 compiler just for PHP 5.6 compile, and then use Visual Studio 2015 for everything else (MapServer, GDAL, Python3, mapscript); downside is that MS4W users will need to install both the 2012 and 2015 redistributables. Hmmm. Will do some compiling and testing....

comment:7 by TC Haddad, 8 years ago

This looks like a potentially useful resource:

http://p-nand-q.com/python/building-python-27-with-visual_studio.html

comment:8 by Jeff McKenna, 8 years ago

Good find, thanks.

comment:9 by Jeff McKenna, 8 years ago

The issue with Python, is that you must use the exact supported compiler for the Python version, if you want to use the compiled Python module (such as mapscript) in your own installed Python (see table at https://wiki.python.org/moin/WindowsCompilers). This means, that since PHP 5.6 can only be compiled with Visual Studio 2012 (v11), that if MS4W contains a Python module, or even Python itself, compiled with Visual Studio 2012 (v11), then MS4W users can not use their regular Python environment (popular commands such as 'pip' or 'easy_install' would pull in modules that are built with wrong compiler and therefore cause crashes). That is a potential disaster. (remember that many Python mapscript users count on MS4W for their Python mapscript module, to use in their own Python environment)

So, technically MS4W can be built to contain PHP 5.6 and Python 3, but Python users will not be able to make any changes to that Python instance, cannot add any other modules (and it would run separate from their own installed Python). Is this acceptable, do you think? Might be a good short-term solution, until MS4W 4.0 can be released (with PHP7mapscript).

comment:10 by Jeff McKenna, 8 years ago

In other words, the Python mapscript module will not be able to run with their existing Python installations (MS4W users have always just pointed to mapscript, and their Python environment works with that module); if we go with PHP 5.6, Python mapscript will no longer work for all those users (well, it 'can' work, if we package all of Python and mapscript, inside MS4W, but that will be a very limited Python instance).

comment:11 by TC Haddad, 8 years ago

Interesting problem. I think if the limited python instance can work with the other Python web apps you might have for MS4W (e.g. pycsw, others?) then that could be a workable short term solution.

I guess we don't know the range of things people might be doing with python in the MS4W environment? I would think that the things that are most important to keep support for are those things that are relevant in a web server environment (as that is what MS4W is, and that is how php in MS4W is used as well). Supporting general desktop python uses might be considered secondary priority, but I really can't say.

It occurs to me that maybe you can quiz the list of MS4W users to see how they currently use the python inside of MS4W, so see if significant web use cases that we aren't thinking of would be harmed.

One last thought: is it not already common to have more than one Python instance in a Windows environment? e.g. People who have ESRI Arcmap and QGIS on the same system, each comes with it's own python, so would MS4W just be another case of this (with a set of functionality specifically limited to the web apps MS4W supports)?

comment:12 by TC Haddad, 8 years ago

Just a quick note to say that the latest 5.6.x release was Oct 14th, and was a security release: http://php.net/ChangeLog-5.php#5.6.27

comment:13 by Jeff McKenna, 7 years ago

Resolution: fixed
Status: acceptedclosed

PHP 5.6.30 is available in the MS4W 3.2.0 release http://www.ms4w.com/release/

Note: See TracTickets for help on using tickets.