Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I just started working with php so I don't have any idea what is involved with upgrades. Currently, I'm working with php 5.3, and would like to move to 5.4. How is this done? Is it just a simple installation of 5.4 ? Will this break code written in 5.3?
Migrating from PHP 5.3.x to PHP 5.4.x is the info regarding such upgrade.
Especially have a look into Backward Incompatible Changes section. Some functions were removed in PHP 5.4 and if your PHP 5.3 code is using them, you will get errors. For example, session_register() function does not exist in PHP 5.4
It depends which Linux distro. you are using.
You could try:
yum update php
Or:
sudo apt-get install php5-cgi php5-cli
I highly recommend you test your code on 5.4 before upgrading any live server as mostly likely there might be some breaking differences (as normal with most PHP upgrades).
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I've got Apache + PHP 5.2.17 + mySQL on a Linux/Ubuntu server, and I was requested to upgrade the PHP version (I guess to 5.3.x or 5.4.x).
I would like to test my code in a versatile environment where I can switch among the PHP versions, and I'm trying to locate the proper software. I'm not sure whether 'UwAmp' or 'Laragon' could fit my needs (I don't mind to test it on a Windows machine).
Any suggestion is welcome. Thank you very much.
I've got Apache + PHP 5.2.17 + mySQL on a Linux/Ubuntu server, and I was requested to upgrade the PHP version (I guess to 5.3.x or 5.4.x).
Do yourself a favour and update to a version of php that have not been abandoned for years, at least 7.1. For reference, find the supported versions here. PHP 5.6 is not even in security fixes support anymore.
I would like to test my code in a versatile environment where I can switch among the PHP versions, and I'm trying to locate the proper software.
Use a local development server stack such as Ampps, MAMP, XAMP, or one of the myriad of such software. They allow for easy switching between php versions.
Alternatively, set up Travis CI with different php versions and a suite of tests. Travis is geared up to run tests suites in various PHP versions automagically.
Manually compiling and maintaining multiple versions of PHP, while doable, is not very practical if you actually wish to get things done. Using software that comes with multiple versions installed is arguably the only viable solution.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I tried with a PPA - ppa:ondrej/php but it says
PLEASE DON'T USE PHP 5.4 OR PHP 5.5. The PHP 5.5 and later are no longer supported with security updates, therefore they are not included in this repository.
Note: I understand it is not preferred to use PHP5.5+ still i wanted to install. Is there is any ppa is available with php5.5.9 with all supported extensions?
Best option
As I stated in comments I very strongly advise you to use a supported version of PHP. Using outdated versions of PHP means being susceptible to all kinds of security vulnerabilities. Upgrading your application to work with PHP 5.6 may not be very much work.
Much, much worse option
If you absolutely must use PHP 5.5 (which I don't recommend), you should use the latest release (5.5.38), not 5.5.9. There should not be any breaking changes in 5.5.38 vs. 5.5.9; you'll just get a whole bunch of bugfixes and security patches.
Since PHP 5.5 has reached end-of-life you won't receive any updates to it via any channel, so there isn't much value in installing via PPA vs. building from source. I agree with the stance taken by ppa:ondrej/php not to provide PHP 5.5 anymore, and other PPA providers are likely to go down the same path.
If you're confident that you know the risks of using an ancient version of PHP, and accept them (please don't!), you can download the source code for PHP 5.5.38 from PHP.net and then build it.
PHP 5.5.9
Seriously, I beg you, don't use this version of PHP. If using PHP 5.5.38 in 2017 is crazy (it is!), using PHP 5.5.9 is complete insanity.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Back in November I installed my own PHP setup, for version 5.4.9. I thought I had removed it, but apparently not. In December I reinstalled it with yum install php54, and all its packages.
Now I have a problem where CLI seems to be using the custom PHP install, and the main site is using the yum install. I want both the CLI and the site to use the yum install, which is now 5.4.10.
When I do php -v in the CLI, it shows 5.4.9, so I do know it is using the wrong PHP install. This is causing a lot of issues because the custom install didn't have mysqli installed with it, and it had ftp disabled.
Does anyone know how I can remove the custom install and relink the CLI to the new yum install?
I am using CentOS.
How did you install the "custom" one? This is a very broad question, but here's some general advice:
Where is it installed? which php can tell you. You can use this to figure out how to uninstall it. For instance, it could be in /usr/local or /opt.
Then, edit your $PATH variable to put the place where the PHP you want is before the one you don't want. This will make the PHP you want run first, at least.
If you compliled the custom PHP, you might be able to remove it with something like make uninstall.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
My ultimate, simple goal, is to install Wordpress.
Unfortunately, Wordpress requires PHP 5.2.4 or greater, while the server my site is hosted on is only running 5.2.17. When I contacted Earthlink, they said they couldn't update it, but that I could.
However, after a little bit of searching, I'm not sure where to begin. I have very little command line experience, and no Linux experience. I'm not even sure what flavor of Linux they're using. Does anyone know of any walkthrough guides or tutorials?
The odd thing is, Earthlink has a Wordpress installer built in to their control center (I'm opting for an FTP install, because I want to install in a subdomain). So alternatively, can I get away with installing on the server with PHP 5.2.17? If they're doing it, why can't I?
Thanks,
Scott
I don't think you understand PHP versions. PHP 5.2.17 is a newer version than 5.2.4. Wordpress should work just fine on 5.2.17. Have you run into issues while installing it?
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
How do I install latest versions of PHP as Apache 2 module?
PHPIniDir directive throws error.
And what's more important, there's no php5apache2.dll file or similar in latest distributions of PHP!
Example distr php 5.3
According to the PHP QA site, if you are using PHP with Apache 1 or Apache2 then you need to be using the VC6 release candidates, not the VC9. VC9 is for use with IIS.
Since the link you provided in your question goes to a VC9 download, I would assume that's what you downloaded, and I'd say you should go download the VC6 version instead.