PHP Configuration Problems

Talk with others about developing applications for Switchvox

Moderators: bmdhacks, dpodolsky, tristand, jwitt, joshuas

PHP Configuration Problems

Postby KKiernan » Fri May 04, 2012 8:41 am

I am having problems configuring PHP to work with the API. I am using XAMPP on Windows XP. If I run the test code provided:

require_once("SwitchvoxRequest.php");

$request = new SwitchvoxRequest("YOUR.PBX.IP.OR.HOSTNAME", "admin", "ADMIN.PASSWORD");
$requestParams = array( 'account_ids' => array('account_id' => array( 1101, 1102) ) );
$response = $request->send("switchvox.extensions.getInfo", $requestParams);

print_r($response);


I get the following error.

Fatal error: Class 'HttpRequest' not found in C:\xampp\htdocs\switchboard\php\SwitchvoxRequest.php on line 32


I assume this is because the pecl_http extension is not enabled (among other things?). As soon as line 32 tries to create the HttpRequest object the script dies.

I've Googled for hours and tried numerous things to enable the extensions noted in the getting started section but without success. Has anyone had this problem? Is there a straightforward tutorial somewhere on configuring PHP to work with the Switchvox API?

Thanks for your help.
KKiernan
Newsterisk
 
Posts: 7
Joined: Fri May 04, 2012 7:39 am

Re: PHP Configuration Problems

Postby KKiernan » Fri May 04, 2012 9:53 am

Quick update:

Since I spent all day yesterday playing with my PHP build, I figured I'd give the Perl module a shot. I was able to install Strawberry and add the necessary extensions without any issue. Maybe I'll pursue a Perl solution :wink:
KKiernan
Newsterisk
 
Posts: 7
Joined: Fri May 04, 2012 7:39 am


Return to Switchvox Developers

Who is online

Users browsing this forum: No registered users and 0 guests