I’m working with the folks at Jaspersoft building an Ingres BI appliance with Jasperserver 3.0 and decided to try the PHP sample that comes with the distribution. I’m no PHP expert so it helps to be able to call on one who knows their way around (thanks Grant).
The environment:
- Apache/2.2.4 (Linux/SUSE)
- PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli)
- Net_DIME 1.0.1 stable
- SOAP 0.12.0 beta
The relevant section from the php.ini
[soap] ; Enables or disables WSDL caching feature. soap.wsdl_cache_enabled=1 ; Sets the directory name where SOAP extension will put cache files. soap.wsdl_cache_dir="/tmp" ; (time to live) Sets the number of second while cached file will be used ; instead of original one. soap.wsdl_cache_ttl=86400
The jasperserver-pro-3.0-bin/samples/php-sample driectory was copied into the directory that is published by the Apache web server.
The value of $webservices_uri was updated to point at my jasperserver 3.0 instance:
$webservices_uri = "http://localhost:8080/jasperserver-pro/services/repository";
When the index.php page is loaded a form for login credentials is displayed. When the credentials for jasperadmin were entered the page refreshed and the original page is displayed again.
Back to my PHP expert and together with some server authentication logging could see that no attempt was made to authenticate.
If it wasn’t for my PHP expert I don’t think that I would have associated the problem with the use of HTTP_[A-Z]*_VARS global variables within the sample PHP pages.
After some search and replace in vim %s/\(HTTP\)\(_[A-Z]*\)\(_VARS\)/\2/g on all of the PHP pages the top level folders were finally returned as a simple table and I was able to navigate the repository and run some of the sample reports.
I’ll be adding this to the Jasperforge community site at some stage but thought I’d note it down so I don’t forget.