asterisk2billing.org http://forum.asterisk2billing.org/ |
|
unable to create customers http://forum.asterisk2billing.org/viewtopic.php?f=33&t=12594 |
Page 1 of 1 |
Author: | spectris [ Mon Oct 10, 2016 8:53 am ] |
Post subject: | unable to create customers |
Hi there if I try ot insert a new customer , I recevie this error mesage after clicking "confirm data": Your new Card hasn't been inserted. If I open mydql debugs: I can see that this query is performd : INSERT INTO cc_card (username, useralias, uipass, credit, id_group, id_seria, lastname, firstname, email, address, city, state, country, zipcode, phone, fax, company_name, company_website, typepaid, tariff, id_didgroup, id_timezone, language, currency, status, block, lock_pin, simultaccess, runservice, credit_notification, notify_email, id_campaign, enableexpire, expirationdate, expiredays, sip_buddy, iax_buddy, autorefill, initialbalance, invoiceday, vat, discount, restriction) values ('9933367729', '098563644051546', '69716cffhbh5qtfcaflu', '0', '1', '-1', 'customer A', 'spacher', '[email protected]', 'via roma', 'canicatti', 'Agrigento', 'TGO', '0100', '3939393938', '090', 'no spa', 'none', '0', '1', '1', '67', 'en', 'USD', '1', '0', '0', '1', '0', '-1', '0', '-1', '0', '2026-10-10 11:45:38', '0', '1', '1', '0', '0', '1', '0', '0.00', '0') and if I try this query the error raised is : ERROR 1364 (HY000): Field 'redial' doesn't have a default value Moreover if for example I forget to fill in zip code or coutnry, the isnertion fail silently for the same reasoine (no default value ) . How can I populate redial value while inserting new customer? thanks a lot for your support mine operating confiurations is: a2billing 2.2.0 + php7 + mysql 5.7.15 + UBUNTU 16.06 |
Author: | spectris [ Mon Oct 10, 2016 5:40 pm ] |
Post subject: | Re: unable to create customers |
solved by lams. new mysql installation can default slq_mode to STRICT_TABLES. http://forum.asterisk2billing.org/viewtopic.php?f=33&t=12569&sid=daaf47f0d552234dfd8b1e2087c66462 |
Author: | lams [ Tue Oct 11, 2016 2:32 am ] |
Post subject: | Re: unable to create customers |
Hi This is caused by the strict default sql_mode in mysql-5.7* The solution is to edit file mysqld.cnf usually located under: /etc/mysql/mysql.conf.d/mysqld.cnf Add following under: [mysqld] sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION Then delete the old mya2billing database and re-run the two steps: mysql -u root -p < DataBase/mysql-5.x/a2billing-createdb-user.sql followed by ./install-db.sh Make sure ./install-db.sh runs smoothly without errors and generates 97 tables. You should now be able to insert rates, customers, etc Hope this helps |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |