Hi cyberde,
I have now resolved the issues of php4 being in use instead of php5 by using a .htaccess file for the api subdirectory, and when I use phpinfo() I get the following back -
But now when I run my test script I get the following -
Fatal error: Uncaught SoapFault exception: Authentication failed in /homepages/20/d158289393/htdocs/support/api/soap/test.php Stack trace: #0 /homepages/20/d158289393/htdocs/support/api/soap/test.php(22): SoapClient->__call('ostTicket.open', Array) #1 {main} thrown in /homepages/20/d158289393/htdocs/support/api/soap/test.php on line 22
Here is my code I am running with a selected amount removed :)
$osticket = new SoapClient('http://www.domain-name.net/api/soap/index.php?wsdl');
// Set up the parameters
$args = array(
'username' => 'chris',
'password' => 'xxxx',
'ticketData' => array(
'name' => utf8_encode('sir Test'),
'email' => utf8_encode('some@email.com'),
'subject' => utf8_encode('testing'),
'message' => utf8_encode('this is a message'),
'topicId' => 3, //topic Website Support
'pri' => 2, // default priority
'phone' => '012-345678'
)
);
try {
// Send the request and receive the ticketID
$result = $osticket->__call('ostTicket.open',$args);
}
catch (SoapFault $e) {
throw $e;
}