|
From: brent t. s. <bre...@gm...> - 2012-07-31 19:33:21
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Yep, that one.
I've got some confusion. I can pull the mantisconnect.php?wsdl via
wget, a browser, etc. directly just fine and I get XML output, but
whenever I try from a PHP script it gives me:
______________
Fatal error: Uncaught SoapFault exception: [Client] looks like we got
no XML document in
/home/circle/public_html/mantis/site-anon_report.php:13 Stack trace:
#0 /home/circle/public_html/mantis/site-anon_report.php(13):
SoapClient->__call('mc_issue_add', Array) #1
/home/circle/public_html/mantis/site-anon_report.php(13):
SoapClient->mc_issue_add('anonymous', 'XXXXXXXX', Array) #2 {main}
thrown in /home/circle/public_html/mantis/site-anon_report.php on line 13
______________
I'm almost convinced it's something to do with the custom fields.
Here's the PHP script:
______________
<?php
$reporter = $_REQUEST['fullname'] ;
$reporter_addy = $_REQUEST['email'] ;
$desc = $_REQUEST['summary'] ;
$bigtext = $_REQUEST['description'] ;
$browser = $_REQUEST['ua'] ;
$problem_page = $_REQUEST['url'] ;
$username = 'anonymous';
$password = 'XXXXXXXXX';
$issue = array ('category_id' => '2', 'project_id' => '1', 'summary'
=> $desc , 'description' => $bigtext, 'custom_URL' => "$problem_page",
'custom_User-Agent String' => "$browser", 'custom_Reporter Email' =>
"$reporter_addy", 'custom_Reporter Name' => "$reporter",
'additional_information' => '(submitted via feedback.html)');
$c = new
SoapClient('http://path/to/site/scrubbed/mantisconnect.php?wsdl');
$c->mc_issue_add($username, $password, $issue);
// print_r($issue);
?>
________________
Using PHP 5.3.3, MantisBT 1.2.8 (I know, I know).
I've confirmed that the server has both the SOAP client *and* server
enabled in phpinfo.
In fact, the Array *does* get created; If I comment out the
"$c->mc_issue_add()" line and uncomment the print_r(), I get this:
________________
Array ( [category_id] => 2 [project_id] => 1 [summary] => this is a
test bug [description] => lolnope. [custom_URL] =>
http://scrubbed/testing.html [custom_Use />
<i>Please provide detailed information (i.e. what you<br>
were doing when the issue occurred, how we can<br>
recreate this issue, any logins we might need,<br>
etc.)</i><b>:</b><br />
<textarea name="description" rows="8" cols="53"></textarea><br />
<b>OS/Browser Version</b>
<br />
<i>(this should be automatically detected)</i><b>:</b>
<br /><script type="text/javascript">
var ua = navigator.userAgent;
// document.write('<i>+ua+</i>');
document.write('<input type="text" readonly="readonly" size="55"
name="ua" value="'+ua+'">');
</script><br />
<br>
<b>Reporting URL</b>
<br />
<i>(this should be automatically detected)</i><b>: </b>
<br /><script type="text/javascript">
var url = document.referrer;
// document.write('<i>+url+</i>');
document.write('<input type="url" readonly="readonly" size="55"
name="url" value="'+url+'">');
</script><br />
<br>
<center><input type="submit" value="Submit"/> <input
type="reset" value="Clear"></input></center>
</form>
</body>
</html>
_________________
SO! Any ideas? How badly am I messing this up?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlAYMuwACgkQ8u2Zh4MtlQpOjQCgjiUdRQE6qP6qmfBDdFhCq5ii
ePkAnjlvfJ0HEN4ZMySh6MpPpYNaYaYh
=gLL7
-----END PGP SIGNATURE-----
|