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.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
we have developed previously in house system based on PHP 5.6 now we want to upgrade same code into PHP 7.3, we have not used any PHP framework we are using core way to write code means we are not using ANY PHP framework. what are the proper steps to migrate PHP 5.6 code into PHP 7.3
Look through the migration guides at php.net
Have a look particularly at:
Backward incompatible changes
Deprecated features
Changed functions
Go through each of the migration guides and check to make sure that any of the function and extensions that are changed/removed and make sure they are not used in your program.
I would then also test in a testing environment to ensure that all is working correctly still (would turn debugging on for this).
I work on a PHP tool that handles PHP upgrades instantly and automatically from CLI. It's fully open source and available on Github:
https://github.com/rectorphp/rector
https://www.bram.us/2019/12/02/automatically-upgrade-your-php-code-from-5-3-to-php-7-4-with-rector/
So far it handles upgrades from PHP 5.3 to 8.1
Apart from reading all the documentation guides at php.net
Set up a development/testing server using the PHP version you want
to migrate to (7.3)
copy your app/code to the testing server
fix all the issues and bugs that spring up using php 7.3
upgrade production to 7.3
copy fixed code to production
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 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 8 years ago.
Improve this question
My web host is running a different PHP then the one Laravel is using. To overcome this I want Laravel to use another version of PHP. I'm having trouble finding where to do this. My question is it possible and if so where can I change it.
Laravel has a version of php as a dependancy. You cannot use a version of Laravel that requires, for example, PHP>=5.4 on a server that is using a version of PHP below 5.4.
If you have to use an older version of PHP, you need to use an older version of Laravel that supports your desired version of PHP.
Try searching the Laravel website for older versions, or consider upgrading your version of PHP to match Laravel's requirements.
If your web host is not running a version of PHP that supports Laravel (5.4+), they are a dangerous and unprofessional webhost and you should find a new one. PHP 5.3 and lower have been end-of-lifed (http://php.net/eol.php), meaning they may (and likely do) contain unpatched security holes and other bugs that will never be fixed.
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 9 years ago.
Improve this question
i installed the following s/w versions
php5.3.0
mysql5.0
now what is minimum requirement of apache server... anybody give right version to suggest me
thanks
Kumar
The best version is always the latest version.
This because with every updated version a lot of bugs and security problems are fixed.
Using an outdated version of software is never a good idea.
But then, sometimes you come accross poorly written software, or software written 10 years ago that still needs that old buggy software to run on. My advice: don't connect it to the internet.
Do you have to connect it to the itnernet? Look for another job ;)
As DCoder mentioned in the comment. ALWAYS test before deploying an update.
Minimum version of Apache server: 1.3.x (Windows, Unix)
Recommended version of Apache server: 2.x (Windows, Unix)
"We strongly recommend that users of all
earlier versions, including 1.3 family release, upgrade to to the
current 2.2 version as soon as possible." (source)
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 9 years ago.
Improve this question
Situation:: My current web host has given me a brand new VPS today with PHP 5.2.9 (released: Feb 2009).
What I did: I asked my web host to upgrade it to latest PHP 5.3.5 so I can get all security vulnerabilities fixed.
What web host replied: No, you should not. Your PHP scripts will break. Instead you can use PHP 5.2.17.
My Question: Should I force my web host to install PHP 5.3.5 on my VPS? What problem can possibly I get by upgrading. I currently do not use any PHP 5.3 features but may use those in future. My main concern is to get fully secure from known vulnerabilities.
Please don't close this question. It's not directly related to programming but is related to PHP which only PHP experts at SO can answer, I guess.
Well, simply install PHP 5.3.5 locally and see if any of your scripts break. If everything's okay, let them install PHP 5.3.
Concerning "It will break things": PHP normally is backwards compatible. Maybe it will give you some E_STRICT errors, but those don't break scripts. But really, you should just try ;)
An old release date does not means that it has vulnerabilities. For instance most Linux distributions keep the same PHP version forever (for the lifetime of the distribution's release), but they fix vulnerabilities as they are discovered.
Just make sure that all your distribution's packages are up to date.
If its a VPS do you have root access? If so you could upgrade yourself. I imagine it should be possible with a little work to install both versions.