Doc #80794 [Opn->Fbk]: --enable-bcmath documentation incomplete
| From: | requinix@php.net | Date: | Wed, 24 Feb 2021 18:33:05 +0000 |
| Subject: | Doc #80794 [Opn->Fbk]: --enable-bcmath documentation incomplete | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18594@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80794&edit=1
ID: 80794
Updated by: requinix@php.net
Reported by: php4fan at gmail dot com
Summary: --enable-bcmath documentation incomplete
-Status: Open
+Status: Feedback
Type: Documentation Problem
-Package: Documentation problem
+Package: BC math related
Operating System: all
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
What operating system? Linux?
PHP's own installation docs are a little bit lower level than what Linux folks deal with. Here
we talk about ./configure and --enable flags because that's what PHP itself is concerned with,
but the Linux people who package PHP for distribution will do... whatever it is they do. This often
means compiling the base PHP package separately from the various optional extensions, then having
the extensions themselves available through package management. You don't ./configure PHP
yourself.
So while you are looking to install bcmath, and while the bc.installation page is technically
correct, it's not actually the installation information that you need. This is casually
mentioned in the general Unix installation docs
> There are several ways to install PHP for the Unix platform, either with a compile
> and configure process, or through various pre-packaged methods. This documentation
> is mainly focused around the process of compiling and configuring PHP.
https://www.php.net/manual/en/install.unix.php
but mostly it's something that's assumed Linux developers are already familiar with.
Make sense?
Previous Comments:
------------------------------------------------------------------------
[2021-02-24 12:02:25] php4fan at gmail dot com
Description:
------------
---
From manual page: https://php.net/bc.installation
---
It says:
"These functions are only available if PHP was configured with --enable-bcmath."
So, I look at the output of phpinfo() on a particular installation of phpfpm 7.4 that is throwing
"call to undefined function bcpow()" errors and I find:
Configure Command:
[.....] '--enable-bcmath=shared' [.....]
So, that's confusing. There is a --enable-bcmath flag, yet the bc math functions are not
available, and there is no "BC Math" section in phpinfo(). I guess I need to understand
what "shared" means.
For starters, I would expect to find more information at https://www.php.net/manual/en/bc.installation.php
but there's nothing there.
"These functions are only available if PHP was configured with --enable-bcmath.
The Windows version of PHP has built-in support for this extension. You do not need to load any
additional extensions in order to use these functions."
The sentence "You do not need to load any additional extensions in order to use these
functions" seems to refer only to Windows. What about linux? Do I need to load additional
extensions there?
So I think: let's look at the documentation about the "--enable-bcmath" configure
flag. Maybe it explains what the value "shared" means. Perhaps it means that it allows to
enable bcmath as a shared library-or-something, maybe an extension that can be loaded at runtime
without recompiling. I don't know, let's look.
So I found this:
https://www.php.net/manual/en/configure.about.php
"List of configure options".
It's not listed there.
It says:
"Below is a partial list of configure options [...] Most configure options are listed in their
appropriate locations on the extension reference pages and not here"
Ok, so where is the "appropriate location on the extension reference pages"??
To me it looks like it should be here:
https://php.net/bc.installation
But again, nothing there.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80794&edit=1