Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 18, 2024 6:57 am
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Fri Jan 13, 2012 10:15 am 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
Hello,
I'm detecting some subscription fee cronjobs missing in my v. 1.9.4, so I went to run the cronjobs manually, and I got the following errors:

Quote:
php a2billing_subscription_fee.php
===> NB_CARD : 8 - NBPAGEMAX:1
==> UPDATE CARD QUERY: UPDATE cc_card SET status = 8 WHERE id=432
==> UPDATE SUBSCRIPTION QUERY: UPDATE cc_card_subscription SET paid_status = 3 WHERE id=23
==> UPDATE CARD QUERY: UPDATE cc_card_subscription SET paid_status = 3 WHERE id=23
PHP Fatal error: Function name must be a string in .../Cronjobs/a2billing_subscription_fee.php on line 347


I have:
Quote:
php -v
PHP 5.3.3 (cli) (built: Jan 11 2012 19:53:01)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies



Any idea??


Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Fri Jan 13, 2012 11:06 am 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
Looks like a typo in the code at line 347.

Code:
('card_id')


Should be

Code:
['card_id']


I've not tested this script, i'm just looking at the code and notice that.


Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Fri Jan 13, 2012 11:50 am 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
Thanks Vulcan,
After doing that, I get then...

Quote:
php a2billing_subscription_fee.php
PHP Parse error: syntax error, unexpected T_VARIABLE in .../Cronjobs/a2billing_subscription_fee.php on line 348


Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Fri Jan 13, 2012 2:09 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
You should have changed only the two parenthesis to square brackets.


Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Thu Jan 19, 2012 6:27 pm 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
vulcan wrote:
You should have changed only the two parenthesis to square brackets.


This what I did exactly, nothing more...
Kindly find in the attachment my actual refereed file...

Regards,


Attachments:
File comment: a2billing_subscription_fee.php
a2billing_subscription_fee.txt [17.21 KiB]
Downloaded 607 times
Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Fri Jan 20, 2012 11:51 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
Quote:
You should have changed only the two parentheses to square brackets.






Quote:
This what I did exactly, nothing more...


Not exactly. You deleted the third and last parenthesis and the semi-colon.


Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Sat Jan 21, 2012 3:50 pm 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
Quote:
Not exactly. You deleted the third and last parenthesis and the semi-colon.
[/quote]

Oh, I got it, I see... sorry... thanks again...:)


Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Sat Jan 21, 2012 8:11 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
You're welcome. A2b is great, but a little patching needed. Like others, I've done a few changes to the code such as making the username unique and not being the accountnumber among other useful customizations.


Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Sat Jan 21, 2012 9:31 pm 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
vulcan wrote:
You're welcome. A2b is great, but a little patching needed. Like others.

As an open sources, everything need the community contribution, and collective reporting. By itself I don't find it bad, it's nice, useful, some aspect in box need to by patched, as this, and others which you have patched in other thread, thanks for your efforts... but it's also missing some features, in the DID inbound service, for example, and others, hope with the time and common contribution follow growing and improving ahead.


Quote:
I've done a few changes to the code such as making the username unique and not being the accountnumber among other useful customizations.


Hmm, this is interesting, how you did that, may I have that?


Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Sun Jan 22, 2012 4:57 am 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
When I get a chance I will strip out the username portion and make a patch. Most of the changes are installation specific and will not apply in all cases , for example disabling monthly invoices and receipts for prepaid calling card accounts.


Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Sun Jan 22, 2012 9:14 am 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
vulcan wrote:
When I get a chance I will strip out the username portion and make a patch. Most of the changes are installation specific and will not apply in all cases , for example disabling monthly invoices and receipts for prepaid calling card accounts.


Indeed the username issue is important, as in our case, we don't use the calling card service as we got some issues with it http://forum.asterisk2billing.org/viewtopic.php?f=34&t=9249, but only the sip/iax authentication, and I was thinking to figure out marking the user name different then the account code, and also make the sip secret more sophisticated as alphanumerical over 64 or 128bits, but I even, didn't spend much time to look into that, but for security it's important, and several users are asking us for that... we're doing this manually.


Top
 Profile  
 
 Post subject: Re: PHP fatal Errors in CronJobs subscriptions_fee.php
PostPosted: Sun Jan 22, 2012 5:33 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
The prepaid calling card portion I believe is the most tested feature of A2B. I have not seen the behaviour you described. switch over to viewtopic.php?f=34&t=9249 for my reply.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group