# PHP 5.4.39 when appears in the ports?



## bagas (Mar 24, 2015)

Hello.
PHP 5.4.39 when appears in the ports?


----------



## diizzy (Mar 24, 2015)

The maintainer is probably out of time at the moment but you can help by providing a patch for the port. You can also email and ask the maintainer *kindly* about it. Please remember that most people are doing work in their spare time.
//Danne


----------



## junovitch@ (Mar 24, 2015)

Updating the version to make a patch is very simple if you want to help contribute back.  Typically it's a matter of updating the Makefile, running a `make makesum` to update the checksum file, compiling/testing, and finally submitting per the Porter's Handbook guidelines.  It's easier than it sounds, take a look and give it a try.

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/port-upgrading.html#svn-diff

Also, PHP 5.6 has been made the default in ports and PHP 5.4 is only getting security updates for the next 5 months.  Unless your application requires 5.4, now is as good a time as any to upgrade to 5.6.

http://php.net/supported-versions.php


----------



## diizzy (Mar 25, 2015)

Actually that depends on which port you're talking about, php5-extensions is still using 5.4
//Danne


----------



## junovitch@ (Mar 25, 2015)

diizzy said:


> Actually that depends on which port you're talking about, php5-extensions is still using 5.4
> //Danne


True, that's a bit of a given since it's specific to lang/php5 and lang/php56-extensions is the one for lang/php56.  Mainly my thought is installing something like www/owncloud or any of the other suites in ports that use PHP mean you're going to get lang/php56 pulled in as a dependency.  It makes sense to keep things as simple as possible and use the default versions as that's what everybody using public package repos would be using.


----------



## bagas (Mar 26, 2015)

Version 5.6 raw!
Wait PHP 5.4.39.


----------



## bagas (Mar 26, 2015)

In the system Gentoo Linux there is also no update of PHP 5.4.39.


----------



## junovitch@ (Mar 28, 2015)

I've tested both buildtime and runtime of the port and the PR has been submitted for the PHP 5.4.39 update in PR 198993.  Please follow that link for progress updates.


----------



## bagas (Apr 21, 2015)

Hello.
Why are the ports on a FreeBSD system are created without enthusiasm and responsiveness?
Other distributions already have the patches for php 5.4.40.


----------



## kpa (Apr 21, 2015)

bagas said:


> Hello.
> Why are the ports on a FreeBSD system are created without enthusiasm and responsiveness?
> Other distributions already have the patches for php 5.4.40.



Would you like to volunteer as the port maintainer so that the requested features/new versions get into the tree quicker?

For the record, I'm being only mildly sarcastic here. FreeBSD is maintained largely by its users and if you want something to happen you make an effort yourself to make that thing happen. FreeBSD has very little central organization that could drive things forward. Don't expect the FreeBSD foundation to step in everytime there is an apparent lack of progress in some areas, it's up to the users to drive the development forward to the direction they would like.

Oh and FreeBSD is not a "distribution". "Distros" are a Linux thingy because Linux is only a kernel and the userland is just haphazard collection utilities and software that each distro happens to prefer. FreeBSD is a complete operating system with a kernel and a strictly defined userland known as "world".


----------



## bagas (Apr 22, 2015)

I understand everything, but in the past these delays patches to the ports was not!


----------



## SirDice (Apr 24, 2015)

bagas said:


> I understand everything, but in the past these delays patches to the ports was not!


If nobody submits patches the port won't be updated.

kpa already mentioned this but ports are mostly a user driven effort. The port maintainer (if the port has one) may be busy with other things. Nobody does this for a living, so it's all done in somebody's spare time.


----------



## bagas (Apr 25, 2015)

SirDice said:


> If nobody submits patches the port won't be updated.
> 
> kpa already mentioned this but ports are mostly a user driven effort. The port maintainer (if the port has one) may be busy with other things. Nobody does this for a living, so it's all done in somebody's spare time.


All bad!!!
In this case, have to sacrifice functionality in server, or to take risks and use insecure versions of programs!


----------



## tobik@ (Apr 25, 2015)

Just set PORTVERSION to 5.4.40 in lang/php5's Makefile, run `make makesum`, install as you normally would and be done with it.

And when you get the time submit the changes, so that everyone can benefit.


----------



## bagas (Apr 25, 2015)

tobik said:


> Just set PORTVERSION to 5.4.40 in lang/php5's Makefile, run `make makesum`, install as you normally would and be done with it.
> 
> And when you get the time submit the changes, so that everyone can benefit.


I think this is wrong!


----------



## kpa (Apr 25, 2015)

bagas said:


> I think this is wrong!



Then please tell us whose "responsibility" it is to update the port?

Since you have expressed interest in having the port updated and you seem to be capable of doing it, why don't you do it mate?


----------



## bagas (Apr 25, 2015)

kpa said:


> Then please tell us whose "responsibility" it is to update the port?
> 
> Since you have expressed interest in having the port updated and you seem to be capable of doing it, why don't you do it mate?


Began to learn how to create a port.
But this is wrong, should bear the responsibility someone for the port, otherwise worthless system FreeBSD!
This is my opinion.


----------



## Remington (Apr 25, 2015)

You can compile your own PHP without using the ports.  I have web server and some of my clients require different PHP version 5.4, 5.5 and 5.6 in the same jail.  It's not that hard to do.  Also, it is not necessary to have the latest version unless if you have issues with the current version or serious security issues.


----------



## bagas (Apr 25, 2015)

Remington said:


> You can compile your own PHP without using the ports.  I have web server and some of my clients require different PHP version 5.4, 5.5 and 5.6 in the same jail.  It's not that hard to do.  Also, it is not necessary to have the latest version unless if you have issues with the current version or serious security issues.


Can provide instructions your method.
I have most of the projects in jail.


----------



## Remington (Apr 25, 2015)

Before you compile PHP, you need to install lang/gcc49 and devel/pecl-intl.

These are optional installs if PHP throws an error during configuration or compilation.

devel/libtool
devel/pcre
ftp/curl
print/freetype2
graphics/png
graphics/jpeg
mail/cclient
security/libmcrypt
devel/t1lib
multimedia/libvpx
devel/gettext
textproc/libxslt
devel/icu
devel/re2c
devel/oniguruma4
databases/mysql56-client
databases/sqlite3


Download the source code from PHP website.

You'll need to configure especially the directories before doing the `make` to compile them.


```
./configure CC=gcc49 CXX=g++49 --prefix=/usr/local/php/5.4.39 --sysconfdir=/usr/local/etc/php54 --with-config-file-scan-dir=/usr/local/etc/php54 --localstatedir=/var --with-bz2 --with-curl --with-freetype-dir --with-gd --with-gettext --with-jpeg-dir --with-kerberos --with-libxml-dir --with-mcrypt --with-mhash --with-mysql --with-mysqli --with-pear --with-pdo-sqlite --with-sqlite3 --with-iconv --with-iconv-dir --with-imap --with-imap-ssl --with-openssl --with-pcre-dir --with-pcre-regex --with-pdo-mysql --with-png-dir --with-fpm-user=root --with-fpm-group=wheel --with-regex=system --with-t1lib --with-xmlrpc --with-xpm-dir --with-xsl --with-zlib --with-zlib-dir --disable-all --disable-cgi --enable-bcmath --enable-calendar --enable-ctype --enable-dom --enable-exif --enable-fileinfo --enable-filter --enable-fpm --enable-ftp --enable-gd-native-ttf --enable-hash --enable-intl --enable-ipv6 --enable-json --enable-libxml --enable-mbstring --enable-mysqlnd --enable-pdo --enable-phar --enable-session --enable-simplexml --enable-sockets --enable-tokenizer --enable-wddx --enable-xml --enable-xmlreader --enable-zip
```


```
./configure CC=gcc49 CXX=g++49 --prefix=/usr/local/php/5.5.23 --sysconfdir=/usr/local/etc/php55 --with-config-file-scan-dir=/usr/local/etc/php55 --localstatedir=/var --with-bz2 --with-curl --with-freetype-dir --with-gd --with-gettext --with-jpeg-dir --with-kerberos --with-libxml-dir --with-mcrypt --with-mhash --with-mysql --with-mysqli --with-pear --with-pdo-sqlite --with-sqlite3 --with-iconv --with-iconv-dir --with-imap --with-imap-ssl --with-openssl --with-pcre-dir --with-pcre-regex --with-pdo-mysql --with-png-dir --with-fpm-user=root --with-fpm-group=wheel --with-regex=system --with-t1lib --with-xmlrpc --with-xpm-dir --with-xsl --with-zlib --with-zlib-dir --disable-all --disable-cgi --enable-bcmath --enable-calendar --enable-ctype --enable-dom --enable-exif --enable-fileinfo --enable-filter --enable-fpm --enable-ftp --enable-gd-native-ttf --enable-hash --enable-intl --enable-ipv6 --enable-json --enable-libxml --enable-mbstring --enable-mysqlnd --enable-opcache --enable-pdo --enable-phar --enable-session --enable-simplexml --enable-sockets --enable-tokenizer --enable-wddx --enable-xml --enable-xmlreader --enable-zip
```


```
./configure CC=gcc49 CXX=g++49 --prefix=/usr/local/php/5.6.7 --sysconfdir=/usr/local/etc/php56 --with-config-file-scan-dir=/usr/local/etc/php56 --localstatedir=/var --with-bz2 --with-curl --with-freetype-dir --with-gd --with-gettext --with-jpeg-dir --with-kerberos --with-libxml-dir --with-mcrypt --with-mhash --with-mysql --with-mysqli --with-pear --with-pdo-sqlite --with-sqlite3 --with-iconv --with-iconv-dir --with-imap --with-imap-ssl --with-openssl --with-pcre-dir --with-pcre-regex --with-pdo-mysql --with-png-dir --with-fpm-user=root --with-fpm-group=wheel --with-regex=system --with-t1lib --with-xmlrpc --with-xpm-dir --with-xsl --with-zlib --with-zlib-dir --disable-all --disable-cgi --enable-bcmath --enable-calendar --enable-ctype --enable-dom --enable-exif --enable-fileinfo --enable-filter --enable-fpm --enable-ftp --enable-gd-native-ttf --enable-hash --enable-intl --enable-ipv6 --enable-json --enable-libxml --enable-mbstring --enable-mysqlnd --enable-opcache --enable-pdo --enable-phar --enable-session --enable-simplexml --enable-sockets --enable-tokenizer --enable-wddx --enable-xml --enable-xmlreader --enable-zip
```

To compile the code:
`make install clean`

You will have to configure your Apache or Nginx to use the specific PHP version.


----------



## bagas (Apr 25, 2015)

Remington said:


> Before you compile PHP, you need to install lang/gcc49 and devel/pecl-intl.
> 
> These are optional installs if PHP throws an error during configuration or compilation.
> 
> ...


Thank you, but I know this method.
Do not want to put the program from source, on top manager ports / packages.
I'll wait for the appearance of an updated port.


----------



## junovitch@ (Apr 25, 2015)

The work is in progress.  See PR 199585.  As said above this is a community effort.  The maintainer may have been very busy lately as it does seem like the PHP ports have been slow to get updates.  I don't know what has been going on but the maintainer doesn't have to be a single point of failure.  When life does take priority, that's precisely when we should be stepping in to help out and reduce some of that burden.


----------



## bagas (Apr 26, 2015)

junovitch said:


> The work is in progress.  See PR 199585.  As said above this is a community effort.  The maintainer may have been very busy lately as it does seem like the PHP ports have been slow to get updates.  I don't know what has been going on but the maintainer doesn't have to be a single point of failure.  When life does take priority, that's precisely when we should be stepping in to help out and reduce some of that burden.


This is good!
Such cases should be done quickly.
That's because of such delay and the popularity of FreeBSD falls.


----------

