LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-30-2018, 10:02 AM   #1
andrixnet
Member
 
Registered: Oct 2012
Location: Romania
Distribution: Slackware
Posts: 167

Rep: Reputation: Disabled
Post PHP-7.1 on Slack-14.2-stable


I am running several Slack-14.2-stable machines with some websites using PHP. I have received many requests to update from PHP-5.6 to PHP-7.1.

I presume Slack-14.2 will keep PHP-5.6 most likely until it's end of life, at the end of 2018, but I can't wait that long.
These are production systems I can't easily afford to reinstall (and rebuild all config) at moment's notice. Furthermore, the PHP apps are PHP-7.1 ready, but by no means 7.2 ready (yet).

I missed out when PHP-7.1 was in -current, as now it is 7.2.

Does anyone have working build scripts and instructions for PHP-7.1 useable on slack-14.2 ?

Thank you.
 
Old 01-30-2018, 11:50 AM   #2
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 484

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
Hi,

I have mine if you want. php-7.1 is installed in /opt/php71.
https://ftp2.halpanet.org/slackware/...-14.2/n/php71/ (slow ftp server).
 
3 members found this post helpful.
Old 01-30-2018, 05:47 PM   #3
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,498

Rep: Reputation: 8450Reputation: 8450Reputation: 8450Reputation: 8450Reputation: 8450Reputation: 8450Reputation: 8450Reputation: 8450Reputation: 8450Reputation: 8450Reputation: 8450
Here you go:

http://www.slackware.com/~volkerdi/php-7.1/
 
8 members found this post helpful.
Old 02-23-2018, 02:00 PM   #4
andrixnet
Member
 
Registered: Oct 2012
Location: Romania
Distribution: Slackware
Posts: 167

Original Poster
Rep: Reputation: Disabled
Post

Thank you all very much for the source build set.

As further reference I would like to add the following, for the unprepared ones (like I was):
  • building this package requires having also the alpine source package at the same directory level as php/
  • having X series of packages installed is a build requirement (depends on libXpm)

@volkerdi:
mod_php.conf.example needs to be updated to 7:
Code:
-LoadModule php5_module lib/httpd/modules/libphp5.so
+LoadModule php7_module lib/httpd/modules/libphp7.so
@ALL:
After compiling and building the package, when you install it, if upgrading from previous version, /etc/httpd/mod_php.conf retains the previous version configuration, and the corresponding file from the new package remains as ".example". doinst.sh is responsible for this part, probably based on similar intended logic such as .new files.
You need to replace mod_php.conf with the contents of the newly installed mod_php.conf.example

Furthermore, on a running system, you need to completely stop apache, then, after a few seconds, start it again.
A simple /etc/rc.d/rc.httpd restart is not enough when modules have changed, because it apparently does not do a complete stop.

Assuming there are no major changes between php-7.1.x versions, one can simply drop in the newer source archive and run the build script again.

While suing custom built php, if you are also using slackpkg to update your system, then you must add php to /etc/slackpkg/blacklist.

Hope all these will come in handy to other sysadmins and also when slackware-14.2 support will transition from 5.6 to 7.x after 5.6 support ends.

Again, thank you very much.

Last edited by andrixnet; 02-24-2018 at 07:38 AM. Reason: forgot important detail
 
2 members found this post helpful.
Old 03-02-2018, 05:49 AM   #5
andrixnet
Member
 
Registered: Oct 2012
Location: Romania
Distribution: Slackware
Posts: 167

Original Poster
Rep: Reputation: Disabled
Post PHP startup warnings

After building the package successfully and tested the presence of PHP7.1 module in Apache, doing some pre-production tests I discovered an error in the logs while doing tests with PHP and mysql.

Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/mysql.so' - /usr/lib64/php/extensions/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/mysqli.so' - /usr/lib64/php/extensions/mysqli.so: undefined symbol: mysqlnd_global_stats in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/pdo_mysql.so' - /usr/lib64/php/extensions/pdo_mysql.so: undefined symbol: mysqlnd_allocator in Unknown on line 0
Indeed, mysql.so does not exist in the specified path (in package and deployed installation).

First, care must be taken, the package deploys a /etc/php.ini.new which must be reviewed and it must replace /etc/php.ini manually.
This will take care of the first warning.

Second, there is a problem in the patch file php.ini-development.diff.gz (probably still at 5.x level).
Details are described here: https://www.linuxquestions.org/quest...so-4175618544/

While further downstream this has been fixed, for admins that specifically need 7.1 (as I do), either modify php.ini-development.diff.gz or the deployed php.ini.
 
1 members found this post helpful.
Old 05-20-2019, 05:35 AM   #6
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
Quote:
Originally Posted by volkerdi View Post
I tried to build it but I get this error message:

Quote:
checking for U8T_DECOMPOSE...
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
I think that I may need a package called libc-client but I cannot find it.
 
Old 05-20-2019, 05:52 AM   #7
ZhaoLin1457
Senior Member
 
Registered: Jan 2018
Posts: 1,016

Rep: Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207Reputation: 1207
I guess that is about putting "alpine" slackbuild from the Slackware sources on the same level as the "php-7.1" folder.

It is used as dependency by the PHP build script, from what I read.
 
1 members found this post helpful.
Old 05-20-2019, 09:44 AM   #8
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
Quote:
Originally Posted by ZhaoLin1457 View Post
I guess that is about putting "alpine" slackbuild from the Slackware sources on the same level as the "php-7.1" folder.

It is used as dependency by the PHP build script, from what I read.
You led me to the solution. I was running the slackbuild with fakeroot, and therefore I did not have enough permission for this:

Quote:
( cd $CWD/../alpine ; VERSION=${ALPINE} ; ./alpine.SlackBuild || exit 1 ) || exit 1
( cd $TMP/alpine-${ALPINE}/imap/c-client
strip -g c-client.a
mkdir -p $IMAPLIBDIR/lib${LIBDIRSUFFIX}
cp c-client.a $IMAPLIBDIR/lib${LIBDIRSUFFIX}
mkdir -p $IMAPLIBDIR/include
cp *.h $IMAPLIBDIR/include
)
Thank You. I ran the script as root and it worked. I was running the script while waiting for a flight. I regret to conclude that my lifestyle and Slackware do not always converge. Maybe I should try burnedoutware.
 
  


Reply

Tags
php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problems upgrading TQSL from 2.0.3 to 2.3.1 on Slack 64 14.2 stable digimaus Slackware 1 07-05-2017 05:29 PM
Anyone able to use an iPod with Slack stable?? devnull10 Slackware 11 01-04-2012 06:01 PM
Xfce 4.6.1 and Slack stable joutlancpa Slackware 11 05-02-2009 12:24 AM
Ramifications to testing 2.6.27.rc6 in my stable Slack BobNutfield Slackware 2 09-14-2008 11:55 AM
what is the current stable Kernel for Slack 10.2? alex1986 Linux - Kernel 4 08-01-2006 04:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration