Star2Billing / a2billing

A2Billing is a telecom switch and billing system capable of providing and billing a range of telecom products and services to customers such as calling card products, residential and wholesale VoIP termination, DID resale and callback services.
www.asterisk2billing.org
Other
180 stars 174 forks source link

php errors after a3billing upgrade to 2.1.1 #110

Closed ccguerrero closed 9 years ago

ccguerrero commented 9 years ago

yesterday after upgrade from 2.0.11 to 2.1.1 to try to fix issues in currencies with yahoo finance i got the following errors.

[Tue Jul 14 00:48:19 2015] [error] [client xxx.xxx.xxx.xxx] PHP Parse error:  syntax error, unexpected '[' in /var/www/html/common/lib/Misc. php on line 1290

i had to change line 1290 on Misc.php to: $base_value = explode(',', $line_base_value);

This gives a blank page, had to remove the [1] at the end, i don't know if this is correct, because i'm not a programmer but just wanted a2billing to work.

then got this error in the same file

 [Tue Jul 14 01:33:57 2015] [error] [client xxx.xxx.xxx.xxx] PHP Parse error:  syntax error, unexpected ';' in /usr/src/a2billing/common/lib/Misc.php on line 1302

Had to modify again line 1302, to add a ")" and remove [1], again this just to make a2billing to work.

Finally, a2billing worked, but currencies couldn't been update anyway, with error:

The base_currency is too small. Currency update ABORTED!

just before upgrade a2billing, i upgraded php fom 5.3.3.40 to php 5.3.3.46, do you think this may be a problem?

system info

Any sugestion would be appreciated.

Regards,

areski commented 9 years ago

when do you get this error? only when you try to update the currency?

ccguerrero commented 9 years ago

the two errors appear just to try to access the login screen for a2billing, they disappear after i mad the changes i stated. everything seems to work correctly, but i'm unable to update currency. I don't know where to look for errors.

I can give you access to the server if you are interested.

Regards,

areski commented 9 years ago

this might solve the problem https://github.com/Star2Billing/a2billing/commit/67b70464151d1cb6dc7881f2bf6d1a00549d3000

ccguerrero commented 9 years ago

That fixed the issue. I can confirm currencies are updated correctly.

regarss,

jacgsaw commented 5 years ago

Para este error configure manualmente la moneda predeterminada en 1.00000, y las monedas que requiera por lo general son dos o tres las configuras manual, y veras que ahora las recargas funcionan correctamente.