the478guy Posted June 6, 2008 Share Posted June 6, 2008 I'm trying to run a report with PHP, the PHP sample included does not work on my server. I'm using NuSOAP for PHP. What are the parameters that need to be sent to the runReport service to run a basic report? Where can I find this information, the web services guide is not clear about this. Regards,Chris Link to comment Share on other sites More sharing options...
Lazarus Long Posted June 7, 2008 Share Posted June 7, 2008 Not sure about the web service route, but we are having great success by using the PHP-Java bridge. You can probably find some sample code for it out there. Link to comment Share on other sites More sharing options...
halfer Posted June 9, 2008 Share Posted June 9, 2008 I'd strongly advise you to get the PHP sample working if you want to get the web services approach working. We did, although the code appears to be written for PHP4 and so raises notices and requires a bit of enabling legacy stuff in php.ini. I've not heard of NuSOAP, I used the standard SOAP library in PEAR. Once you have that working, the rest is fairly plain sailing. You could indeed use the PHP-Java bridge, but we don't have a Java installation on our live web server, and in any case I much prefer having reporting functionality on a different server. One gotcha that we ran into was wanting to pass connection parameters in the SOAP request to be used with the report. It turns out that this, for the time being at least, is not implemented. However we worked out a reasonably elegant workaround, which I will describe here if anyone is interested. Link to comment Share on other sites More sharing options...
halfer Posted June 9, 2008 Share Posted June 9, 2008 Actually I've posted the workaround already, read it here if you're interested. Link to comment Share on other sites More sharing options...
the478guy Posted June 9, 2008 Author Share Posted June 9, 2008 Thanks for the replies, How did you get the php sample working, what settings are required in the php.ini? I've downloaded the PEAR SOAP library but the sample still won't run. ThanksChris Link to comment Share on other sites More sharing options...
halfer Posted June 9, 2008 Share Posted June 9, 2008 Set these, either in your virtualhost, or across your whole php.ini: php_flag register_globals onphp_flag register_long_arrays on Standard disclaimer: your mileage may vary. See what warnings/notices are output by PHP, and respond accordingly. Btw rather than saying "the sample still won't run", it would be more useful to describe what error messages you are encountering, either on-screen on in the logs. Link to comment Share on other sites More sharing options...
the478guy Posted June 9, 2008 Author Share Posted June 9, 2008 Ok, I've not got the example to display me the login page. However, when I try my details in, the form posts to itself, but has no error or message. There are some undefined vars in the error_log. I think it's a register_globals issue but I have this enabled in php.ini and also the two lines you gave me, can these go anywhere in the php.ini? For example I have: register_globals = Onphp_flag register_globals onphp_flag register_long_arrays on Edit: I also have:register_long_arrays = on I have even tried replacing all instances of 'HTTP_*_VARS' with _POST/_GET/_SESSION which still does not work... if my JasperServer URI is incorrect I do get the error, however when it is correct, the page just posts back to itself as if it hadn't picked up any of the post vars.Post edited by: the478guy, at: 2008/06/09 15:23 Link to comment Share on other sites More sharing options...
halfer Posted June 9, 2008 Share Posted June 9, 2008 It is really not a good idea to edit the source code, as you can get yourself into a pickle unless you are certain you know what you are doing. I recommend you unpack it again, and don't edit it. Sorry, I should have said that the "php_flag" directive would go in an Apache config, not a php.ini - my fault. Your syntax for both keywords is fine for php.ini (so you can use those instead rather than changing your apache config). Run phpinfo() in a web page to make sure they have been understood by the server. Don't forget to restart your web server too. Link to comment Share on other sites More sharing options...
the478guy Posted June 10, 2008 Author Share Posted June 10, 2008 Ok, I've unpacked the example again and checked phpinfo() page which is showing register globals and long arrays on. Where is the apache config file? It might be worth trying turning it on in there. Link to comment Share on other sites More sharing options...
halfer Posted June 10, 2008 Share Posted June 10, 2008 If they are both enabled, then you likely have another problem. What do your Apache logs or on-screen warnings say? By the way, if you need help finding your apache config file (usually httpd.conf) then you will probably struggle with configuring Jasper Server. It is a steep learning curve, and as great as the software is, the help community is not particularly active. Link to comment Share on other sites More sharing options...
the478guy Posted June 11, 2008 Author Share Posted June 11, 2008 Got it working now by modding the session handler code. The report example is not as good as I expected, I thought it would be the same as when executing a report from the JS admin area. The paging is poor with just a next/previous button that will error if pressed on first or last page. Thanks for the help anyway. Link to comment Share on other sites More sharing options...
halfer Posted June 20, 2008 Share Posted June 20, 2008 On a general note on using PHP with Jasper, PEAR's SOAP library of course is the natural choice for communicating with the server. However as far as I can tell it is written for PHP4, and so dumps a number of notices to the screen that have to be suppressed in PHP5. Our web reporting service is now working nice and reliably, but nevertheless I think I will switch to a PHP5 SOAP approach when I get a moment. If anyone has already done this, please post a link to your experiences if you can. Link to comment Share on other sites More sharing options...
hashaam83 Posted September 7, 2008 Share Posted September 7, 2008 halferWrote: Actually I've posted the workaround already, read it here if you're interested. I cannot find this. Can you post the direct link?Thanks in advance.Hashaam Link to comment Share on other sites More sharing options...
swood Posted September 12, 2008 Share Posted September 12, 2008 It is here jasperforge.org/plugins/espforum/view.php ShermanJaspersoftPost Edited by Sherman Wood at 09/12/08 19:11 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now