Use of DEFAULT_PHP_VER in Makefile

Hi All,

General question about PHP versions stated in Port a Makefile. I understand that PHP 5.4 is EOL.

I also understand PHP 5.5 still has security support and PHP 5.6 is fully supported until the end of this year (2016) with security support until the end of 2018.

I also noticed that a port sysutils/loganalyzer has also been marked as DEPRECATED as PHP 5.4 is EOL; The port's Makefile only contains the following PHP related statements:
USE_PHP=  session pdo gd xml zlib

The Porters Handbook states that DEFAULT_PHP_VER can only be 4 or 5! (

As a converse example converters/php5-bsdconv which simply sets USE_PHP= yes has not been DEPRECATED.

Should DEFAULT_PHP_VER be set to 5, 56, or completely removed in the above example please?

Can someone help highlight the reasoning here please?

Kind regards to all,

When in doubt, check the source. In this case /usr/ports/Mk/

.if ${PHP_VER}  == 53
PHP_EXT_DIR=    20090626
PHP_EXT_INC=    pcre spl
.elif ${PHP_VER}  == 56
PHP_EXT_DIR=    20131226
PHP_EXT_INC=    pcre spl
.elif ${PHP_VER}  == 55
PHP_EXT_DIR=    20121212
PHP_EXT_INC=    pcre spl
.elif ${PHP_VER}  == 54
PHP_VER=        5
PHP_EXT_DIR=    20100525
PHP_EXT_INC=    pcre spl
PHP_EXT_DIR=    20100525
PHP_EXT_INC=    pcre spl
So, accepted answers are 53, 54, 55 and 56. Removing it would indicate the default and the default is 5.6.
Hi SirDice,


So for the example converters/php5-bsdconv no default is specified, so it will default to version 56 (in head) or 5 in your version of your mk file above.

My gripe is that in it specifies
DEFAULT_PHP_VER=N - Use PHP version N if PHP is not yet installed.
- So if PHP 5.6 is already installed then it should default to 5.6, even though 5.0 is specified as a default in the port?

So was sysutils/loganalyzer depreciated to due to the default specified or the dependancies? Either way, my understanding is that if you already had PHP 5.6 installed with the matched 5.6 dependencies, it would install against 5.6 and not 5.0, yet the port has been removed from head...

Still confused as to why sysutils/loganalyzer has been depreciated rather than updating origins and recompiling dependencies of previous versions of PHP...


(P.S. Your is a bit out of sync with head in your example)
Last edited by a moderator: