sterlingman2001 Posted December 15, 2017 Share Posted December 15, 2017 Hello,I try to run a jasper report from a php script but it does not work.This is what I am doing :<?phprequire_once "/opt/jrs-rest-php-client-2.0.0/vendor/autoload.php";$c = new Client( "<my IP>", "8080", "<my login>", "<my password>", "jasperserver" );$info = $c->serverInfo();print_r($info); ?>This is the error message I have :Fatal error: Uncaught JaspersoftExceptionRESTRequestException: An unexpected HTTP status code was returned by the server in /opt/jrs-rest-php-client-2.0.0/src/Jaspersoft/Tool/RESTRequest.php:364 Stack trace: #0 /opt/jrs-rest-php-client-2.0.0/src/Jaspersoft/Tool/RESTRequest.php(451): JaspersoftToolRESTRequest->handleError(404, Array, '<!DOCTYPE HTML ...') #1 /opt/jrs-rest-php-client-2.0.0/src/Jaspersoft/Client/Client.php(158): JaspersoftToolRESTRequest->prepAndSend('192.168.56.1/re...', Array, 'GET', NULL, true, 'application/jso...', 'application/jso...') #2 /opt/jrs-rest-php-client-2.0.0/tests2/test.php(43): JaspersoftClientClient->serverInfo() #3 {main} thrown in /opt/jrs-rest-php-client-2.0.0/src/Jaspersoft/Tool/RESTRequest.php on line 364Any help or suggestion will be welcomed.Thanks Link to comment Share on other sites More sharing options...
sterlingman2001 Posted December 15, 2017 Author Share Posted December 15, 2017 I have also tried :$c = new Client("http://localhost:8080/jasperserver","<my login>","<my password>", "");and :$c = new Client("http://localhost:8080/jasperserver","<my login>","<my password>");but nothing works Link to comment Share on other sites More sharing options...
polexito2002_1 Posted October 22, 2018 Share Posted October 22, 2018 HELLO, COULD YOU FIND A SOLUTION?PHP7.0JASPERSERVER 7.0PHP CLIENT 2.0 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