bcmath extension for php 7.1 on debian linux

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

bcmath extension for php 7.1 on debian linux

gro.naibed

Hi all

 

We need your help…

 

We need to use the bcmath extension on PHP 7.1 with a debian linux server…

We cant found any source or any think to install this extension.

We try to intall it with apt-get and also to add other sources to sourcelist.

 

Can you help us to install it?

 

Thx you a lot.

Reply | Threaded
Open this post in threaded view
|

Re: bcmath extension for php 7.1 on debian linux

Alexander V. Makartsev
On 27.03.2019 10:43, [hidden email] wrote:

Hi all

 

We need your help…

 

We need to use the bcmath extension on PHP 7.1 with a debian linux server…

We cant found any source or any think to install this extension.

We try to intall it with apt-get and also to add other sources to sourcelist.

 

Can you help us to install it?

 

Thx you a lot.

At this moment PHP version 7.1 is not available in Debian repositories, only version 7.0 is available in "stable" branch and version 7.3 in "testing" branch.
Are sure you want exactly PHP version 7.1?

If PHP 7.0 is enough for your requirements and you are making a brand new server configuration (not trying to fix current one, because PHP could be installed and setup in multiple different ways), you can install it and bcmath extension with this command:
# apt install php7.0 php7.0-bcmath

To check if your PHP setup has "bcmath" extension enabled:
$ php --version
$ php -r "phpinfo();" | grep BCMath


-- 
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀ 
Reply | Threaded
Open this post in threaded view
|

Re: bcmath extension for php 7.1 on debian linux

Roberto C. Sánchez-2
In reply to this post by gro.naibed
On Wed, Mar 27, 2019 at 06:43:59AM +0100, [hidden email] wrote:

>    Hi all
>
>     
>
>    We need your help…
>
>     
>
>    We need to use the bcmath extension on PHP 7.1 with a debian linux server…
>
>    We cant found any source or any think to install this extension.
>
>    We try to intall it with apt-get and also to add other sources to
>    sourcelist.
>
>     
>
>    Can you help us to install it?
>
You do not provide enough information to know what version of Debian you
are using, but I am going to guess that you are using Debian stretch
(9).  You also do not mention what other sources you have tried adding
to your sources.list.  You also don't mention how you were able to
install PHP 7.1 (whether from upstream sources, or from Debian
packages).

I find it puzzling that you managed to install PHP 7.1 but now are not
able to install the corresponding bcmath package.  If you build from
sources, then it probably was built and installed along with the other
PHP components and you just need to enable it in your php.ini.

That said, you may want to consider installing your PHP packages from
this source: https://deb.sury.org/

That site is maintained by Ondřej Surý, who is a Debian Developer and
also one of the main PHP maintainers for Debian and Ubuntu.

Regards,

-Roberto

--
Roberto C. Sánchez

Reply | Threaded
Open this post in threaded view
|

Re: bcmath extension for php 7.1 on debian linux

Alexander V. Makartsev
On 27.03.2019 16:45, Roberto C. Sánchez wrote:

That said, you may want to consider installing your PHP packages from
this source: https://deb.sury.org/

That site is maintained by Ondřej Surý, who is a Debian Developer and
also one of the main PHP maintainers for Debian and Ubuntu.

Regards,

-Roberto

This information could be very useful for me in the future, and save some time.
Still, in case of PHP, in order to mitigate "the version compatibility hell" and comply with requirements of various frameworks and CMS, I have to build personal packages from sources available upstream, most of the time.
Now I wonder, why is the owner of this repository doesn't contribute these packages to the original Debian repositories? Not even in form of backports.
Is the process too complicated and time consuming, so even Debian Developer and PHP maintainer finds it easier to just host his own repo online?

-- 
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀ 
Reply | Threaded
Open this post in threaded view
|

Re: bcmath extension for php 7.1 on debian linux

Roberto C. Sánchez-2
On Wed, Mar 27, 2019 at 05:08:11PM +0500, Alexander V. Makartsev wrote:

>    On 27.03.2019 16:45, Roberto C. Sánchez wrote:
>
>  That said, you may want to consider installing your PHP packages from
>  this source: [1]https://deb.sury.org/
>
>  That site is maintained by Ondřej Surý, who is a Debian Developer and
>  also one of the main PHP maintainers for Debian and Ubuntu.
>
>  Regards,
>
>  -Roberto
>
>
>    This information could be very useful for me in the future, and save some
>    time.
>    Still, in case of PHP, in order to mitigate "the version compatibility
>    hell" and comply with requirements of various frameworks and CMS, I have
>    to build personal packages from sources available upstream, most of the
>    time.

Wow.  That must be frustrating indeed.

>    Now I wonder, why is the owner of this repository doesn't contribute these
>    packages to the original Debian repositories? Not even in form of
>    backports.

That is effectively what the repository is.  It provides various
versions of PHP for various versions of Debian (and Ubuntu), all
maintained by the individual who is principally reponsible for PHP in
both distributions.

>    Is the process too complicated and time consuming, so even Debian
>    Developer and PHP maintainer finds it easier to just host his own repo
>    online?
>
Uploading a package to an official backports repository does involve
additional work.  Given the complexity of PHP I can certainly understand
why Ondřej is not interested in unnecessarily increasing his workload.
He has given his reasons a bit more specifically in public mailing list
discussions in the past, but my recollection boils down to him saying
something like, "they are the same packages I upload to Debian, signed
with the same key used to sign the packages in Debian."

If you need a version of PHP apart from what ships in whatever version
of Debian you happen to be using, I encourage you to consider it, as it
is an excellent resource.  In my mind there is no reason to think that
packages originating from Ondřej's repository are any less trustworthy
or of any lesser quality than those in Debian itself.

Regards,

-Roberto

--
Roberto C. Sánchez