install php7 or greater

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
jack0987
Level 3
Level 3
Posts: 127
Joined: Fri Jul 18, 2014 9:24 pm

install php7 or greater

Post by jack0987 »

I tried this but it failed

sudo apt-get install php7.1.3 libapache2-mod-php7.1.3

Please advise.

I will prob run into this with MySQL as well.
User avatar
phd21
Level 20
Level 20
Posts: 10110
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: install php7 or greater

Post by phd21 »

Hi "jack0987",

It would help to know more about your system setup. If you run "inxi -Fxzd" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.

I am pretty sure that to install php7 that you should be running Linux Mint 18.x (Ubuntu 16.04), and you could just type in:

Code: Select all

sudo apt install php

Hope this helps ...
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
jack0987
Level 3
Level 3
Posts: 127
Joined: Fri Jul 18, 2014 9:24 pm

Re: install php7 or greater

Post by jack0987 »

I am setting up a lamp server. LM 18.1
The output you asked for:

Code: Select all

administrator@W15 ~ $ inxi -Fxzd
System:    Host: W15 Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: MATE 1.16.1 (Gtk 3.18.9-1ubuntu3.1)
           Distro: Linux Mint 18.1 Serena
Machine:   System: Gigabyte product: N/A
           Mobo: Gigabyte model: F2A88X-D3H v: x.x
           Bios: American Megatrends v: F6 date: 04/09/2015
CPU:       Quad core AMD A10-7870K Radeon R7 12 Compute Cores 4C+8G (-MCP-) cache: 8192 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 31144
           clock speeds: max: 3900 MHz 1: 2400 MHz 2: 1700 MHz 3: 2400 MHz
           4: 2400 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Kaveri [Radeon R7 Graphics]
           bus-ID: 00:01.0
           Display Server: X.Org 1.18.4 drivers: ati,radeon (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.00hz
           GLX Renderer: Gallium 0.4 on AMD KAVERI (DRM 2.43.0, LLVM 3.8.0)
           GLX Version: 3.0 Mesa 11.2.0 Direct Rendering: Yes
Audio:     Card-1 Advanced Micro Devices [AMD] FCH Azalia Controller
           driver: snd_hda_intel bus-ID: 00:14.2
           Card-2 Advanced Micro Devices [AMD/ATI] Kaveri HDMI/DP Audio Controller
           driver: snd_hda_intel bus-ID: 00:01.1
           Sound: Advanced Linux Sound Architecture v: k4.4.0-53-generic
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: e000 bus-ID: 01:00.0
           IF: enp1s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 500.1GB (2.6% used)
           ID-1: /dev/sda model: WDC_WD5000AAKX size: 500.1GB temp: 35C
           Optical: /dev/sr0 model: ASUS DRW-24B1ST   j
           rev: 1.00 dev-links: cdrom,cdrw,dvd,dvdrw
           Features: speed: 48x multisession: yes
           audio: yes dvd: yes rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition: ID-1: / size: 452G used: 5.5G (2%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 7.45GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 2.9C mobo: N/A gpu: 4.0
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 193 Uptime: 2:57 Memory: 444.6/6919.2MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.461) inxi: 2.2.35 
administrator@W15 ~ $ 

EDIT: [Solved this - there was a space in the file name I did not notice]
Just ran into another snag. Is the sub-domain the problem?

Code: Select all

administrator@W15 ~ $ sudo a2ensite test1.xxx.com.conf
[sudo] password for administrator: 
ERROR: Site test1.xxx.com does not exist!
administrator@W15 ~ $ 

ralplpcr
Level 6
Level 6
Posts: 1065
Joined: Tue Jul 28, 2015 10:11 am

Re: install php7 or greater

Post by ralplpcr »

phd21 wrote: I am pretty sure that to install php7 that you should be running Linux Mint 18.x (Ubuntu 16.04), and you could just type in:

Code: Select all

sudo apt install php
phd21 is correct - if you're running any of the Mint 18 series, the default PHP is now at PHP 7.
I can't tell you how soon it will update to the latest 7.1.3 version, however - - it was only released 2 weeks ago,
so the repository may not be updated yet.

If you really want/need to install a version newer than in the repositories, you can follow the instructions on sites such as
http://www.linuxfromscratch.org/blfs/vi ... l/php.html.
You'll have to configure / make / install yourself, but it should get you to the latest build?
User avatar
phd21
Level 20
Level 20
Posts: 10110
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: install php7 or greater

Post by phd21 »

Hi "jack0987",

Here is another post on setting up LAMP on your Linux Mint system
viewtopic.php?f=47&t=239187&hilit=lamp


Hope this helps ...
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
jack0987
Level 3
Level 3
Posts: 127
Joined: Fri Jul 18, 2014 9:24 pm

Re: install php7 or greater

Post by jack0987 »

ralplpcr wrote: phd21 is correct - if you're running any of the Mint 18 series, the default PHP is now at PHP 7.
Thanks. This is what I needed to know. Seven is good.

Thanks also for the links. They will be very helpful as they are mostly up to date and have answered a lot of my future questions.
User avatar
phd21
Level 20
Level 20
Posts: 10110
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: install php7 or greater

Post by phd21 »

Hi "jack0987",

You are welcome...

Glad to help ...

Have a great day !
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
Post Reply

Return to “Beginner Questions”