0

I need to use bcmath in a shared hosting that does not provide it by default. So I asked the hosting company about it and they are not going to provide it. I would have left this hosting as most of the modern hosting provide this and other features that are not provided by the current hosting. But now I just want to get the job done and not start by suggesting to my customer to leave the hosting before trying a plan B. Is it possible to get bc math in a shared hosting using .htaccess or other method? I have not been able to find anything during my search except for this http://php.net/dl, but I do not know if it applies to my case and I have not found enough information about it. This is the PHP build:

PHP Version 5.4.20 System   Linux lamp.xxx.yy
2.6.18-348.18.1.el5.centos.plus #1 SMP ... i686 
Build Date  Sep 24 2013 11:06:51
Server API  Apache 2.0 Handler
Virtual Directory Support   disabled
Additional .ini files parsed    /etc/php.d/curl.ini, /etc/php.d/dom.ini, /etc/php.d/fileinfo.ini, /etc/php.d/gd.ini, /etc/php.d/imap.ini, /etc/php.d/ioncube-loader.ini, /etc/php.d/json.ini, /etc/php.d/ldap.ini, /etc/php.d/mbstring.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/phar.ini, /etc/php.d/wddx.ini, /etc/php.d/xcache.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini, /etc/php.d/zip.ini
PHP API     20100412
PHP Extension   20100525
Zend Extension  220100525
Zend Extension Build    API220100525,NTS
PHP Extension Build     API20100525,NTS
Debug Build     no
Thread Safety   disabled
Zend Signal Handling    disabled
Zend Memory Manager     enabled
Zend Multibyte Support  provided by mbstring
IPv6 Support    enabled
DTrace Support  disabled
Registered PHP Streams  https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters   zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk
Abel
  • 538
  • 5
  • 8
  • 28

1 Answers1

0

http://php.net/manual/en/bc.installation.php:

These functions are only available if PHP was configured with --enable-bcmath.

That is a compile-time option, so nothing you could set via .htaccess. If you need it, you will have to switch to a hoster/hosting package that offers it.

CBroe
  • 91,630
  • 14
  • 92
  • 150
  • I read that somewhere, then I found that for instance in CentOS you can install a [package](http://stackoverflow.com/questions/3400362/how-to-install-bcmath-module). So is did not know what to think any more. – Abel Oct 10 '15 at 13:10