Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 2:06 pm
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: fatal error on http post to ecommerce api
PostPosted: Mon Mar 12, 2007 6:51 pm 
Offline

Joined: Mon Mar 12, 2007 6:37 pm
Posts: 5
running trixbox v1.2.3 and upgraded a2b v1.07 to v1.2.3 according to sureteq

when testing a post to api with following urlstring right in the browser's address field,

https://myhost/a2billing/api/api_ecomme ... xx&fax=xxx
yes, verified md5 key with default security string in a2billing.conf it's correct
yes, it's httpS. http doesn't work either.

i get back this response :

Fatal error: Cannot redeclare sanitize_data() (previously declared in /var/www/html/a2billing/lib/Misc.php:3) in /var/www/html/a2billing/lib/Misc.php on line 3

Misc.php looks fine to me.
something to do with php version?
somebody bumbed into this error?


Top
 Profile  
 
 Post subject: fatal error on http post to ecommerce api
PostPosted: Tue Mar 13, 2007 6:19 pm 
Offline

Joined: Mon Mar 12, 2007 6:37 pm
Posts: 5
just thinking out loud.
read the fatal error msg again.
it says 'can not re-declare ....'.
=> so it must have been declared already somewhere else ? Please comment on this! just guessing.
commented out 'include ("../lib/Misc.php");' at the top of api_ecommerce.php
just to see what happens. it's not a production setup. so why not fiddle ...
=> the fatal error doesn't appear but the response is '400 bad request'
started looking at code where these 400 message are located.
started with the first at the '// Wrapper IP' section.
I'm not a php guru. But i think the meaning is clear. To my understanding it basically says 'check ip where the request originated and compare it to the ip's listed in a2billing.conf under the [webui] section. My api_ip_auth reads 'api_ip_auth= 127.0.0.1;x.x.x.x' with a ; seperating the two ip's according to the comment above this parameter.
=>So somehow my ip x.x.x.x doesn't match up with api_ip_auth setting.
wondered what is in $IP_AUTH so I did a print_r($IP_AUTH).
It showed me $IP_AUTH doesn't contain my ip.
again on the guessing lane : removed 127.0.0.1 and left my ip as is :
'api_ip_auth=x.x.x.x'
=> i got back 200 ok from apache.
checked with a2billing.
=>the customer was generated as it should
checked my mail
=> got it : confimation email with pin#
to be complete verified if pin# worked
=> 'please enter your pin#'

all in all, guess i was lucky to get it 'working?' speedily
is this a known issue?
is it sound to comment out 'include ("../lib/Misc.php' or does it break code?
somewhere else? i don't know!
Any comments are welcome !
I want to use this option in production build.


Top
 Profile  
 
 Post subject: fatal error on http post to ecommerce api
PostPosted: Wed Mar 14, 2007 6:46 pm 
Offline

Joined: Mon Mar 12, 2007 6:37 pm
Posts: 5
...with requests coming from multiple ip's (i.e. thirdparty re/sellers)


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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