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 06-18-2013, 09:37 PM   #1
lpallard
Member
 
Registered: Nov 2008
Location: Milky Way
Distribution: Slackware (various releases)
Posts: 970

Rep: Reputation: 44
Upgrading PHP in slackware? Possible? how?


Hello,

I am currently using Horde Webmail (a php based groupware) at version 4.0.9. The newest version is 5.1.0 and I have been trying to upgrade for several weeks (if not months) and I cannot.

Basically, according to the Horde's website instructions to upgrade from 4.x to 5.x, I should only have to run

Code:
pear upgrade -a -B horde/webmail
But I get

Code:
horde/webmail is already installed and is the same as the released version 4.0.9
upgrade failed
Almost looks to me like "pear" couldnt see that there is a newest version out there.

From within the admin page of the application, I click the "Check for newer versions" button, and immediately it says

A newer version (5.1.0) exists.

SO I am heavily confused. I posted on the project's maillist, but did not get huge support. One of the devs suggested to upgrade php.

As a matter of fact, my slackware server still runs the stock 13.1 release of Slackware.

Pear
Code:
PEAR Version: 1.9.4
PHP Version: 5.2.13
Zend Engine Version: 2.2.0
(Why is pear reporting PHP as version 5.2.13 while Zend reports it as 5.3.3 ??? php -v reports also version 5.2.13 (cli)

Some of the server's info:
Code:
Zend Server Community Edition
Version 	5.0.3
 
PHP
Version 	5.3.3
 
PHP Configuration File 	/usr/local/zend/etc/php.ini
 
Web Server
Server Name 	localhost
 
Server Software 	Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8n PHP/5.3.3
 
OS Version 	Linux
 
Zend Framework
Version 	1.10.8
 
Installed Path 	/usr/local/zend/share/ZendFramework
 
Zend Data Cache
Version 	4.0
Status 	On
 
Zend Debugger
Version 	5.3
Status 	On
 
Zend Guard Loader
Status 	Not installed
 
Zend Java Bridge
Version 	3.1
Status 	Off
 
Zend Optimizer+
Version 	4.1
Status 	On
Anyways, suggestions are welcome as php and web stuff isnt my cup of tea!
Thanks!

Last edited by lpallard; 06-18-2013 at 09:39 PM.
 
Old 06-18-2013, 09:52 PM   #2
Peacedog
Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,292

Rep: Reputation: 167Reputation: 167
Hi lpallard, The 5.3.26 package is actually already built and ready for upgrade in the patches directory of the Slackware 13.1 file tree.Aside from that you should be able to upgrade php with the Slackware build script from the source directory. You may be required to upgrade some other packages based on the dependencies.

Good luck. ;-)
 
Old 06-18-2013, 10:26 PM   #3
lpallard
Member
 
Registered: Nov 2008
Location: Milky Way
Distribution: Slackware (various releases)
Posts: 970

Original Poster
Rep: Reputation: 44
Ok I went ahead and upgraded php package with the 5.3.26 from the patches folder from Slack's filetree..

immediately upon launching php to see if its all right, I get:

Code:
bash-4.1# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/dbase.so' - /usr/lib/php/extensions/dbase.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/lib/php/extensions/mhash.so' - /usr/lib/php/extensions/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: fileinfo: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: idn: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/xmlrpc.so' - /usr/lib/php/extensions/xmlrpc.so: undefined symbol: second_arg_force_ref in Unknown on line 0
PHP 5.3.26 (cli) (built: Jun  8 2013 20:10:47) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
Trying to compile it from sources gives me:
Code:
./php.SlackBuild: line 73: cd: /tmp/mount/php-5.3.26/../alpine: No such file or directory
./php.SlackBuild: line 73: ./alpine.SlackBuild: No such file or directory
Im not off to a good start eh... ! I think I'd rather upgrade using a package management tool such as slackpkg (if feasible) instead of trying manually to install hundreds of dependencies.. Possible?

Last edited by lpallard; 06-18-2013 at 10:36 PM.
 
Old 06-19-2013, 03:05 AM   #4
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
Well, I think that the easiest solution for you now is to do a fresh 14.0 installation.
If you want to stick with 13.1 wich I don't suggest setup /etc/slackpkg/mirrors file with a 13.1 mirror then do the usual things
Code:
slackpkg update
slackpkg install-new
slackpkg upgrade-all
slackpkg clean-system
And no, you can't put there a 14.0 mirror and upgrade to it with slackpkg
 
Old 06-19-2013, 04:18 AM   #5
ppr:kut
Member
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 356

Rep: Reputation: 91
Quote:
immediately upon launching php to see if its all right, I get:
You forgot to handle .new files. php.ini changed with the update, you need to have a look.
 
Old 06-19-2013, 08:14 AM   #6
lpallard
Member
 
Registered: Nov 2008
Location: Milky Way
Distribution: Slackware (various releases)
Posts: 970

Original Poster
Rep: Reputation: 44
Quote:
Well, I think that the easiest solution for you now is to do a fresh 14.0 installation.
If you want to stick with 13.1 wich I don't suggest setup /etc/slackpkg/mirrors file with a 13.1 mirror then do the usual things
I agree but unfortunately, this is a "production server" and no downtime (at least significant) is allowed for now since there is a lot of work to do.

The best I could have to rebuild the server with Slack 14 or another OS is about 2 days top...

I am not so sure I can migrate the complete machine to a different OS. Hell Im not even sure I can upgrade the machine without problems.

I guess for now I will wait for the next period until we dont really need the machine and wipe clean and reinstall fresh.

Lots of stuff has to be upgraded at this point. Most of the front end applications are being upgraded from time to time, but the backend apps such as php or apache, mysql, etc are from Stock 13.1 and date back to 2010..

This short experience with simply upgrading php has renewed the feeling that sooner or later, I will have to migrate away from slackware, unless other distros are not offering easier management tools. I simply dont see myself sitting in front of the server for a week rebuilding and reinstalling everything from scratch or sources. Thats why I am still using 13.1. The only reason why I initially opted for Slack for this server was the fact that I was using slack on other machines and it was the distro I knew best. I need an OS that I can easily patch and upgrade without running into a dependency hell and endless manual operations..
 
Old 06-19-2013, 09:03 AM   #7
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,189

Rep: Reputation: Disabled
Quote:
Originally Posted by lpallard View Post
This short experience with simply upgrading php has renewed the feeling that sooner or later, I will have to migrate away from slackware, unless other distros are not offering easier management tools.
A word of friendly advice - do not take this the wrong way. If you would have followed the Slackware security mailing list and had installed the Slackware 13.1 patches as they became available, you would already be running the desired PHP version.

One of your issues is that you attempted a software installation of Zend with apparently a separate version of PHP which now lives on your computer in /usr/local - which is the reason why Zend reports a different PHP version. Try to keep up to date with the Slackware official packages and patches, be very,very careful when upgrading individual pieces of Slackware-provided programs, and try to use SlackBuild scripts for all the additional software you install on a production server. That will make it easier to transition to a newer Slackware release or even to a newer custom software version.

Eric
 
1 members found this post helpful.
Old 06-19-2013, 09:09 AM   #8
lpallard
Member
 
Registered: Nov 2008
Location: Milky Way
Distribution: Slackware (various releases)
Posts: 970

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by Alien Bob View Post
A word of friendly advice - do not take this the wrong way. If you would have followed the Slackware security mailing list and had installed the Slackware 13.1 patches as they became available, you would already be running the desired PHP version.

One of your issues is that you attempted a software installation of Zend with apparently a separate version of PHP which now lives on your computer in /usr/local - which is the reason why Zend reports a different PHP version. Try to keep up to date with the Slackware official packages and patches, be very,very careful when upgrading individual pieces of Slackware-provided programs, and try to use SlackBuild scripts for all the additional software you install on a production server. That will make it easier to transition to a newer Slackware release or even to a newer custom software version.

Eric
Eric, I agree with you, this was one of the first slackware machine I was building.... I made a lot of mistakes by installing all kind of "crap" that was not necessary just because the readme or install instructions that came with the software I use required you to install the stuff... Zend is a good example. I am not even sure why I have this and quite frankly, I dont use it at all..

If I had to restart fresh with slack, I'd have to be very careful with what I install..

Now I am glad you said this:

Quote:
If you would have followed the Slackware security mailing list
I have registered 3 times to the maillist but never got any emails from it. I sent at least 5 emails to the maillist admins to inform them that something was wrong but didnt get any replies from them either. After about a year sporadically trying to register to that maillist, I gave up. You are a Slackware dev right? Can you help me with this? I can PM you.
 
Old 06-19-2013, 09:48 AM   #9
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,189

Rep: Reputation: Disabled
Quote:
Originally Posted by lpallard View Post
I have registered 3 times to the maillist but never got any emails from it. I sent at least 5 emails to the maillist admins to inform them that something was wrong but didnt get any replies from them either. After about a year sporadically trying to register to that maillist, I gave up. You are a Slackware dev right? Can you help me with this? I can PM you.
I help with maintaining the distro but I do not have access to the mailing list manager. You should send volkerdi at slackware dot com a message about this.

Eric
 
Old 06-23-2013, 09:15 PM   #10
lpallard
Member
 
Registered: Nov 2008
Location: Milky Way
Distribution: Slackware (various releases)
Posts: 970

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by ppr:kut View Post
You forgot to handle .new files. php.ini changed with the update, you need to have a look.
Ok after a system update with slackpkg, all is fine except the php errors I had..

ppr:kut, when you say that I forgot to handle .new files, I know that you are referring to the .old or .new files slackpkg creates if the config files had changed prior to upgrading the packages but I am not sure how to proceed with php in this case..

Can you explain how to proceed?

Thanks!
 
Old 06-23-2013, 09:28 PM   #11
lpallard
Member
 
Registered: Nov 2008
Location: Milky Way
Distribution: Slackware (various releases)
Posts: 970

Original Poster
Rep: Reputation: 44
Plain simple, I think that I may need to upgrade or install some extensions...

Rwading the output of "php -version", I see 3 different errors:

Code:
  • Unable to load dynamic library '/usr/lib/php/extensions/dbase.so' - cannot open shared object file: No such file or directory in Unknown on line 0
  • Unable to load dynamic library '/usr/lib/php/extensions/mhash.so' - cannot open shared object file: No such file or directory in Unknown on line 0
  • PHP Warning: PHP Startup: fileinfo: Unable to initialize module
  • PHP Warning: PHP Startup: idn: Unable to initialize module
  • PHP Warning: PHP Startup: imagick: Unable to initialize module
  • PHP Warning: PHP Startup: Unable to load dynamic library - /usr/lib/php/extensions/xmlrpc.so: undefined symbol: second_arg_force_ref in Unknown on line 0
I have looked around in the system, there is NO dbase.so neither there is mhash.so.. So I believe these extensions were never installed at first. COuld the previous php never had to use them?

"fileinfo", "idn" & imagick" are in /usr/lib/php/extensions but php cannot initialize them.. Perhaps upgrading them?

As for "xmlrpc.so", I dont know either but I belie also upgradint it could help? "Undefined symbol" almost sound to me like the current file is not compiled in accordance to what the new php expects..

EDIT: Googling a bit I have found a blog where someone suggested to comment out the relevant lines of dbase.so & mhash.so in php.ini but I am reluctant to do so because I dont know if I (or something else in the server) will need these extensions.. How do I know which extnsions to comment out? The fact that these extensions are not in the system tells me that I can safely comment out these extensions..

Last edited by lpallard; 06-23-2013 at 09:34 PM.
 
Old 06-24-2013, 01:44 AM   #12
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,189

Rep: Reputation: Disabled
lpallard,

Check the files "/etc/httpd/php.ini-*" which will have been installed by the upgraded php package. Check your existing php.ini for any modifications you have made in the past and copy the file to another name so it will not get overwritten. Select one of the two files php.ini-development php.ini-production - whatever suits your server best, usually that will be php.ini-production, and copy it to /etc/httpd/php.ini, overwriting your original.
Then merge the modifications you made to the original php.ini (you saved a copy).
That will get rid of the errors.

Eric
 
Old 06-24-2013, 02:50 AM   #13
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
I don't think you are skilled enough to be a system administrator of a production server. That's not the end of the world of course and that doesn't mean that you can't try. Maybe you'll find debian or ubuntu even simpler at first but in my experience that kind of systems gets really messy really soon if you don't take care and that's what happened to your slackware server that imho is less prone to this.
Again if you can move the server even temporarily and reinstall slackware to the newest stable version (and keep it update) that's is the way to go.
If you don't have the hardware you can rent a server for a moth or so, to keep it blindly going is just the way to disaster.
 
Old 06-24-2013, 08:33 AM   #14
lpallard
Member
 
Registered: Nov 2008
Location: Milky Way
Distribution: Slackware (various releases)
Posts: 970

Original Poster
Rep: Reputation: 44
Quote:
I don't think you are skilled enough to be a system administrator of a production server. That's not the end of the world of course and that doesn't mean that you can't try. Maybe you'll find debian or ubuntu even simpler at first but in my experience that kind of systems gets really messy really soon if you don't take care and that's what happened to your slackware server that imho is less prone to this.
Again if you can move the server even temporarily and reinstall slackware to the newest stable version (and keep it update) that's is the way to go.
If you don't have the hardware you can rent a server for a moth or so, to keep it blindly going is just the way to disaster.
Yeah. This server is for my personal usage mainly and some other people I work with, but nothing big leagues. You see, I cannot spend countless hours sitting in front of a computer just to make it work. I have other responsibilities in my life which are much more important than running a computer. That being said, I acknowledge my lack of skills because I never really had time to study it and understand it well. Perhaps in the future I will have some more time to spend? Who knows. I agree, except running my little box for every day use and this server I have managed to make work, my skills are limited, but everything I do I try to remember how to do it, what it does, how to replicate and what are the pros & cons.

Now a word of advice, I didnt take it personally because I see you are from Italy, and English *may* not be your primary language, but when you first throw a sentence like "I don't think you are skilled enough to be a system administrator of a production server." it may be taken personally and insulting to someone

I once said something similar on another forum trying to be polite and make a constructive remark because the person I tried to help didnt even understand the concept of package dependencies and was trying to build a multi media machine I was burnt alive by other members just because my remark was not well understood.

Anyways, all that being said, I agree I need to sit down and rebuild this machine from scratch. Its necessary for several reasons, the machine architecture is obsolete (hardware specs), partition scheme is also not very efficient, I am using multi volume VG's to store terabytes of data, I have about 60 custom scripts running everywhere in the machine.. Its a wonder that it ran flawlessly for almost 3 years!

Something to remember: when I initially purchased the parts and built this machine, I only had in mind a NFS storage to remedy for the small laptop's HDD I had at that time. From a NFS mount to Sickbeard, CouchPotato, apache, MySQL, a document management system, a groupware, etc.. it evolved into more or less a server that we rely to store our data and databases...

Long story short, I will continue working on it for now and some day sooner than later I will rebuild from slack 14 or whatever will be released at that time (15 perhaps

Last edited by lpallard; 06-24-2013 at 08:35 AM.
 
Old 06-25-2013, 02:47 AM   #15
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
Quote:
Originally Posted by lpallard View Post
Now a word of advice, I didnt take it personally because I see you are from Italy, and English *may* not be your primary language, but when you first throw a sentence like "I don't think you are skilled enough to be a system administrator of a production server." it may be taken personally and insulting to someone
English is not my first language and I'm sorry it sounded insulting. I'm trying to improve it.
 
  


Reply


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
PHP error after upgrading to latest version of PHP Skillz Programming 3 08-17-2012 08:02 PM
PHP Warning after upgrading from PHP 5.2.1 to 5.3.1 on CentOS rossie Linux - Newbie 4 12-20-2009 02:18 PM
Upgrading php? rickycen Linux - Newbie 4 09-02-2005 08:24 PM
Upgrading PHP?!? gldfngr Linux - Software 1 08-25-2005 09:32 AM


All times are GMT -5. The time now is 07:07 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration