Jump to content
We've recently updated our Privacy Statement, available here ×

php-samples, Axis?


dbtx

Recommended Posts

I'm trying to figure out how to use JasperServer reports with a php project I'm working on. I've found the php-samples folder, and the readme file that says to go to http://127.0.0.1:8080/jasperserver/services/repository. When I do that, I get a pop-up login box which seems to authenticate fine, but then I get a web page that says,

"repository

 

Hi there, this is an AXIS service!

Perhaps there will be a form for invoking the service here..."

 

If I take is a step further and go to the index.php file, it says

 

"AXIS error

 

No service is available at this URL"

 

The readme says I must have the SOAP pear package installed. According to my phpinfo(), I have SOAP installed, and pear installed. As a somewhat of a php newbie, is that the same thing?

 

And what is all this Axis that is referred to? What am I missing to make this work?

Link to comment
Share on other sites

  • 1 year later...
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

I had the same trouble....but I have it working now...

First I made sure the  pear SOAP module and dependencies were installed (special thanks to quietearth.us for this info!):

# pear install Net_URL
# pear install Net_Socket
# pear install HTTP_Request

# pear install -f SOAP

I restarted the jasperserver ...the Axis error was gone, but it  still didnt work...apparently, this php sample app was written before PHP 4.1.0...which is pretty old...I am using 5.2.3...and I dont think I have the latest version!

 Anyway the problem was that the example uses the deprecated variables HTTP_POST_VARS, HTTP_GET_VARS, and HTTP_SESSION_VARS. These were deprecated in php 4.1.0...and as of 5.2.3 (maybe earlier?), they dont work at all.

Easy enough to fix though...in all the php files, you need to replace:

HTTP_POST_VARS with _POST

HTTP_GET_VARS with _GET

HTTP_SESSION_VARS with _SESSION

 

If you have perl you can do this in the php example directory:

# perl -pi -w -e 's/HTTP_POST_VARS/_POST/g;' *.php

# perl -pi -w -e 's/HTTP_GET_VARS/_GET/g;' *.php

# perl -pi -w -e 's/HTTP_SESSION_VARS/_SESSION/g;' *.php

 

It works reasonably well now...hope that helps somebody :)

Link to comment
Share on other sites

  • 3 years later...

 Hi the samples/php-sample files were out of date and were indeed based on an old php version. These old versions are now deprecated (ie no long supported by Zend). 

The php-sample has been updated for the next release 4.5.0. It comes out in a couple of weeks. 

However, if you pull down the trunk code of the samples/php-sample it is updated and supported php 5.3 and above. 

Maybe I should post the new files directly to this thread? Would this help?

Link to comment
Share on other sites

  • 3 weeks later...

Hi Tony,

 

i followed your hint and did a

 

svn checkout --username anonymous http://jasperforge.org/svn/repos/jasperserver

 

but the example files didnt look very different to the ones from the current stable version.

 

I hoped to see them using the SOAP client built into PHP 5, but they still seem to use the external PEAR Library for SOAP.

 

Do you have any newer examples? Posting them here would be a really great help for me (and a lot of other people i think)

 

 

 

Thanx in advance,

 

Markus

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...