Oct 102013
 

As we are developing a php database interface for a project here at work and some related functions are being deprecated starting with php 5.5.x I considered upgrading our php installs on our servers and test if it works fine with our stuff.

As I’m using Slackware on my servers I managed to update the existing build scripts to build from a php 5.5.x tarball and I installed the new package on slackware64-14.0 and slackware64-current: in the next days some tests will be done with the new things we’re working on but, as for now, wordpress seems already to behave fine with it (also the plugins we use, but your mileage may vary).

If you want to test it yourself just get a copy of the sources from a slackware mirror: you will need two folders, source/n/alpine and source/n/php; then place the tarball (5.5.4 ATM) in the php folder, removing the old one.

To build it on the above platforms the needed modifications are very marginal and are listed in this diff

EDIT (23 november 2013): I just checked the current build scripts for 14.1/current (to build a newer version) and they have been adapted to build also php-5.5.x, so the modifications below aren’t needed anymore 🙂

--- php.SlackBuild.orig 2013-10-10 12:04:55.901416000 +0200
+++ php.SlackBuild      2013-10-10 11:15:59.859783000 +0200
@@ -24,8 +24,8 @@
 #  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-VERSION=${VERSION:-$(echo php-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-ALPINE=2.02
+VERSION=${VERSION:-$(echo php-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+ALPINE=2.03
 BUILD=${BUILD:-1}
 
 # Automatically determine the architecture we're building on:
@@ -65,16 +65,16 @@
 
 # we need to compile alpine to get c-client.a for IMAP support:
 IMAPLIBDIR=/usr/local/lib${LIBDIRSUFFIX}/c-client
-if [ -r $IMAPLIBDIR/lib${LIBDIRSUFFIX}/c-client.a ]; then
+if [ -r $IMAPLIBDIR/lib${LIBDIRSUFFIX}/libc-client.a ]; then
   echo "Using IMAP library:"
-  ls -l $IMAPLIBDIR/lib${LIBDIRSUFFIX}/c-client.a
+  ls -l $IMAPLIBDIR/lib${LIBDIRSUFFIX}/libc-client.a
   sleep 5
 else
   ( cd $CWD/../alpine ; ./alpine.SlackBuild || exit 1 ) || exit 1
   ( cd $TMP/re-alpine-${ALPINE}/imap/c-client
     strip -g c-client.a
     mkdir -p $IMAPLIBDIR/lib${LIBDIRSUFFIX}
-    cp c-client.a $IMAPLIBDIR/lib${LIBDIRSUFFIX}
+    cp c-client.a $IMAPLIBDIR/lib${LIBDIRSUFFIX}/libc-client.a
     mkdir -p $IMAPLIBDIR/include
     cp *.h $IMAPLIBDIR/include
   )

  3 Responses to “upgrading to php-5.5.x on Slackware”

  1. im on Slackware14.2 (PHP 5.6.23 (cli) (built: Jun 24 2016 17:18:09)
    Copyright (c) 1997-2016 The PHP Group
    ) & for 99% of the time default packages are more than adequate. However looking at trying to learn laravel has created an issue. Basically there seems to be a choice -either go for vagrant/homestead this means installing virtualbox & associated learning curve or valet for Linux https://github.com/jmarcher/valet-linux . The later needs PHP7 ; now i’m no slackware expert but i do know you just can not install a package & expect it to work . There are associated supporting library packages & worse -installing something may make other things not work. I found PHP7 https://slackware.pkgs.org/14.2/slackers/php7-7.1.6-x86_64-1cf.txz.html if I used this with your slackbuild script what else would i have to do to have an unbroken system using PHP7? The PC is not a server just my own home PC

    • this post is from 4 years ago, as you say on Slackware 14.2 there’s already php 5.6.23.
      if you want to upgrade to php-7.x you should be fine with Corrado’s package (the one you linked), just remove the php package in Slackware: notice that everything using php might not work well with the newer version, so be prepared to deal with it.

      • ok cheers I have put aside php-5.6.23-i586-1.txz so in theory taking into account slackware clean package system if i don’t like result of php7 i should be able to roll back to php-5.6.23-i586-1.txz

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)