Table of Contents
How to install
To UPDATE from PHP 5.3 / 5.4 to PHP 5.5:
Home php教程 php手册 How to install/setup latest version of PHP 5.5 on

How to install/setup latest version of PHP 5.5 on

Jun 06, 2016 pm 08:13 PM
install setup

Please note: This works fine. But this package will also upgrade your apache to version 2.4 which has different config files than apache 2.2 and even deletes stuff, like?/etc/apache2/sites-available/defaultwhen upgrading. This may result i

Please note: This works fine. But this package will also upgrade your apache to version 2.4 which has different config files than apache 2.2 and even deletes stuff, like?/etc/apache2/sites-available/defaultwhen upgrading. This may result in a loss of your apache settings (vhost, mod_rewrite stuff etc.). Be aware of that ! This shit cost me a full weekend. This affects only upgrades, not fresh installs for sure.?Update:?This is a known bug (more here), I’ll keep this post updated…

How to install

There’s an excellent and (usually) hassle-free method to install the latest version of PHP5 (which is 5.5.3 when i’m writing this) with 3 simple bash commands:

1. Add this package-repository to your system. If Ubuntu says that you need to download a key first, then follow the instructions given in the notice.

sudo add-apt-repository ppa:ondrej/php5
Copy after login

If you get an error message now, then please do an update first and install the python-software-properties, that need to be necessary to add a package repository:

sudo apt-get update
sudo apt-get install python-software-properties
Copy after login

2. Update

sudo apt-get update
Copy after login

3. Install PHP

sudo apt-get install php5
Copy after login
Copy after login
更新过程中可能会出现The package openfire needs to be reinstalled, but I can't find an archive for it的错误。
Copy after login
使用命令将openfire卸载掉:?dpkg --remove --force-remove-reinstreq openfire
Copy after login

Check the installed version of PHP via

php5 -v
Copy after login

Please note: The ondrej/php5 repository (which is used here) provides the very latest version of PHP. Usually the new version of PHP is available a few days after it was been officially released. This is really cool and a big step forward as Ubuntu, Debian, CentOS etc. provide only very old versions by default.

To UPDATE from PHP 5.3 / 5.4 to PHP 5.5:

It’s also possible to update from any PHP version to the latest one with exactly the commands above. But, after doing

sudo apt-get install php5
Copy after login
Copy after login

you’ll have to restart the server with

sudo /etc/init.d/apache2 restart
Copy after login

or

sudo service apache2 restart
Copy after login

By the way, I’ve also written a tutorial on “How to setup latest version of PHP 5.5 on Debian Wheezy 7.0/7.1/7.2 (and how to fix the GPG key error)“, which is different from this here.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

3 Easy Ways to Create a Windows 11 USB Installer on Mac 3 Easy Ways to Create a Windows 11 USB Installer on Mac May 13, 2023 pm 09:43 PM

Windows 11 introduces a wealth of new features and a comprehensively improved appearance, placing greater emphasis on unity and efficiency. So, today’s topic is how to create a Windows 11 USB installer on Mac. Performing a clean installation of Windows 11, rather than an upgrade, is the method that yields the best results when getting the operating system. Using a drive bootable in Windows 11, you can perform this task. If you have a Windows PC, making a bootable CD for Windows 11 is a very simple process. On the other hand, if you are using a Mac, the process is a little more complicated. This article will describe how to use the base

How to install macOS on a new SSD How to install macOS on a new SSD Apr 13, 2023 pm 04:01 PM

How to Use macOS Recovery to Install macOS on a New SSD On any Mac built after 2009, there is a built-in recovery system. This allows you to boot your Mac into recovery mode. In this mode, you can repair the internal disk, restore files from a Time Machine backup, get online help, or reinstall macOS. You must have an Internet connection to use these tools. You can use the macOS installation tool to install macOS on a new SSD installed in your computer. To use Internet Recovery to install macOS on an SSD: Follow the manufacturer's instructions

How to install PHP on Windows 10 using Command Prompt How to install PHP on Windows 10 using Command Prompt May 08, 2023 pm 05:13 PM

Install PHP on Windows using Command Prompt or PowerShell Install ChocolateyChoco Package Manager I tried the Windows default package manager Winget but could not install PHP through it. Therefore, the other best option left is to use the popular Chocolatey package manager. But unlike Winget, Choco does not exist in our Windows system by default, so we need to install it manually on our system. Go to your Windows 10 or 11 search box and type CMD, when it appears select "Run as administrator" to copy the given command

What does setup mean on a computer? What does setup mean on a computer? Feb 23, 2023 pm 02:06 PM

Setup means "installation" on the computer; if there is a setup file in the usual installation folder, double-click the setup file to install the program; installation is to fix the machinery or equipment in a certain position according to certain procedures and specifications. It also refers to fixing machinery or equipment in a certain place according to certain methods and specifications.

Let's talk about the return value of the setup function in vue3 Let's talk about the return value of the setup function in vue3 Aug 09, 2022 am 10:26 AM

Setup is a new configuration item in vue3. Its value is a function. The data, methods, etc. we use in the component must be configured in setup.

How to use <script lang='ts' setup> syntactic sugar in Vue3 How to use