LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-12-2017, 07:37 AM   #1
mraidanpreston
LQ Newbie
 
Registered: Apr 2017
Posts: 1

Rep: Reputation: Disabled
Need help changing version of PHP apache uses - Ubuntu 12.04


Hi,

Apologies if this is in the wrong place - but I have a ubuntu 12.04 server running PHP 5.6 - However when I run a phpinfo() it shows as 5.3?

Any help would be great!

I'm a total linux noob.

Aidan
 
Old 04-12-2017, 07:42 AM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
you'd need to give more information than this, do you know how PHP is being loaded, is it mod_php, fcgi, php-fpm, etc? The phpinfo page should indicate what it is. And how do you have PHP 5.6 installed?
 
Old 04-12-2017, 07:51 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Welcome.

One of your highest priorities should be to plan a migration and then migrate that server to Ubuntu 14.04 LTS or 16.04 LTS. The version you have, 12.04, will reach end of life in a few days: https://wiki.ubuntu.com/Releases

After that, it will get no more support, not even security patches. So it will be rather important to see to the upgrade if you plan to keep the server around past the end of the month. On the way, the PHP version will be replaced with a newer version as part and parcel of the upgrade.
 
Old 04-12-2017, 08:17 AM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Quote:
Originally Posted by Turbocapitalist View Post
Welcome.

One of your highest priorities should be to plan a migration and then migrate that server to Ubuntu 14.04 LTS or 16.04 LTS. The version you have, 12.04, will reach end of life in a few days: https://wiki.ubuntu.com/Releases

After that, it will get no more support, not even security patches. So it will be rather important to see to the upgrade if you plan to keep the server around past the end of the month. On the way, the PHP version will be replaced with a newer version as part and parcel of the upgrade.
But also, you will now be confronted with PHP 7!
 
Old 04-12-2017, 08:25 AM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Quote:
Originally Posted by sundialsvcs View Post
But also, you will now be confronted with PHP 7!
I'm not sure how to port PHP5 to Ubuntu 16.04 LTS. PHP is just all-around painful.

https://eev.ee/blog/2012/04/09/php-a...of-bad-design/

However, Ubuntu 14.04 LTS has PHP5 and still has a few years left on it.

Regardless, the upcoming EOL is something that can be planned for. There are two work weeks left, in practice, to figure something out.
 
Old 04-12-2017, 01:24 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by mraidanpreston View Post
I have a ubuntu 12.04 server running PHP 5.6 - However when I run a phpinfo() it shows as 5.3?
personally, i'd say: if phpinfo says 5.3, that's what is running atm.
maybe you installed 5.6, but it's not running?
more info.

anyhow, i think the other posters already nailed what the real problem is here.
 
Old 04-12-2017, 03:15 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
I know that 16.04 has neither PHP5 nor, so far as I can see, packages by which to install it.

The basic problem is that, with PHP-7, the authors rather-indiscriminately "deprecated" a whole bunch of things. It didn't seem to occur to them, for example, that production code might still be using the "old" regular-expression functions: out they go! (Until you write a very simple module to re-implement them.)

The original mysql interface functions are simply ... gone. There are two replacements and, as far as I can tell, one of them doesn't work. Neither one is plug-compatible with the old. (Until you write another not-quite-so-simple module to re-implement them, too.)

You'll be doing a lot of that kind of rework, and you'd better plan and budget for it. You'd better set up a virtual machine running this new version and see how your existing software base works blows-up with it.
 
Old 04-12-2017, 10:17 PM   #8
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Given the short amount of time left to make an initial migration and the general problems of PHP, even between point changes, I'd aim for testing 14.04 LTS first because it has one of the PHP5 variants still. That would buy a few years in which to migrate the web services to PHP7.
 
Old 04-13-2017, 05:19 PM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Quote:
Originally Posted by Turbocapitalist View Post
Given the short amount of time left to make an initial migration and the general problems of PHP, even between point changes, I'd aim for testing 14.04 LTS first because it has one of the PHP5 variants still. That would buy a few years in which to migrate the web services to PHP7.
That appears to me to be a sensible solution. I just finished working (with a very small team) to convert a major set of websites from PHP5 to PHP7 – and to the web – and it took about one year to do it.

I wrote a number of 'helper' tools, including one that can estimate register_globals requirements (given that this facility is entirely gone now ...), and to do a number of other related things, which I plan to soon post to GitHub.
 
Old 04-13-2017, 06:06 PM   #10
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
if you are going PHP 7 then you should go for PHP 7.1, as far as PHP 7.0 goes, its EOL is before PHP 5.6's as PHP 5.6 has an extended EOL (due to being the last 5 release). http://php.net/supported-versions.php

Naturally I will be glad to see the death of mysql_query() when mysqli:repare and pdo:repare are much superior options. But things like the death of the old mysql module for php are probably some of the areas where major redevelopment is needed in code...

Last edited by r3sistance; 04-14-2017 at 07:35 AM.
 
Old 04-14-2017, 06:43 AM   #11
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Aidan:
To see if a machine is eligable manually, open a terminal and issue:

Code:
sudo ubuntu-support-status
peek at the result, similar to this one in output format, but yours will have differing details:
Code:
[sudo] password for jj:
Support status summary of 'mywik-fu':

You have 551 packages (91.5%) supported until May 2019 (5y)

You have 4 packages (0.7%) that can not/no-longer be downloaded
You have 47 packages (7.8%) that are unsupported

Your Hardware Enablement Stack (HWE) is supported until April 2019.

Run with --show-unsupported, --show-supported or --show-all to see more details
You really have to get "current" on an LTS. I suggest LTS to LTS with regular updates to the server.

Last edited by Habitual; 04-14-2017 at 06:46 AM.
 
  


Reply



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
phpbrew giving trouble in php version changing on centos 6.3 unclesamcrazy Linux - Newbie 1 08-07-2013 05:43 PM
Apache/Php stable version senthilvael Linux - Server 2 07-12-2012 04:20 AM
After compiling PHP 5.3.10, apache is still using the old version jstuardo Linux - Server 2 02-21-2012 08:17 PM
[SOLVED] changing the user for apache/php? wayne0101 Linux - Newbie 7 10-27-2010 06:46 AM
Which version of Apache? PHP? Randux Slackware 6 05-22-2006 03:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

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