21

I need install the following extension with php5.6 and ubuntu 16.04, but ubuntu only install extensions for php 7 this extension i cannot install with the issue related Installing PHP 5.6 on Xenial (16.04)

I need to use the functions:

dom
SimpleXML
xml

and the gd library. any answer that can help me, thanks

  • 1
    It is very hard to understand your question, I would recommend having somebody you know and who is fluent in English help you with writing your question. – Weboide Jul 6 '16 at 17:17
40

Ok finding in a lot of blogs and aswer, the obviously answer is add suffix in php, then for install php5.6 or before add this.

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php7.0   # for PHP 7.0
sudo apt-get install php5.6   # for PHP 5.6
sudo apt-get install php5.5   # for PHP 5.5

later of this you need install extension with the following commands

if you install php 5.6 you need add 5.6 to php, for example

sudo apt-get install php5.6-gd php5.6-mysql php5.6-dom php5.6-cli php5.6-json php5.6-common php5.6-mbstring php5.6-opcache php5.6-readline

etc . or otherwise if you make php-gd you install gd for php7, and thanks to @elder-geek for add links

1

It's entirely possible that I am misunderstanding you entirely but if what you are looking for is available for Xenial (16.04) in the PPA you reference, it can be found listed here.

To enable GD-support configure PHP --with-gd[=DIR] , where DIR is the GD base install directory. To use the recommended bundled version of the GD library (which was first bundled in PHP 4.3.0), use the configure option --with-gd . GD library requires libpng and libjpeg to compile.

There's an alphabetical list of extensions on this page

There's also a list of deprecated and experimental extension to be found here.

You can also obtain the Current Stable PHP 5.6.23 via download

  • mm but this extensions of php, how can install in ubuntu and add ppa to ubuntu, thanks – Jonathan Rodriguez Jul 6 '16 at 21:13
  • @JonathanRodriguez Instructions on how to add the PPA you referenced to Ubuntu can be found at the first link I provided. It seems we aren't understanding exactly what you are looking for. Please edit your question and provide further clarity and If I can improve my answer I will. If not perhaps someone else will understand what you want and provide it. It appears that dom at least is a function, not an extension: See: php.net/manual/en/funcref.php – Elder Geek Jul 6 '16 at 21:24
  • gd appears to be a library - php.net/manual/en/book.image.php – Elder Geek Jul 6 '16 at 21:30
  • xml is also found in the function reference: php.net/manual/en/refs.xml.php – Elder Geek Jul 6 '16 at 21:33
  • 1
    This seems exceedingly broad, you may wish to break this up into 4 questions. It seems your first question is answered here: askubuntu.com/questions/109404/… You may wish to ask seperately how to install/configure gd, xml, dom in PHP 5.6 – Elder Geek Jul 6 '16 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.