Skip to content
rb-cohen edited this page Mar 2, 2015 · 2 revisions

Setting the WSDL cache path

Introduction

The default cache path for storing the WSDL file is "/tmp". If you run the library on Windows, or don't have write access to /tmp, you'll get an error like this:

( ! ) Fatal error: Uncaught exception 'SSRS_Soap_Exception' with message 'WSDL cache path is not valid' in C:\wamp\www\Reports\library\SSRS\Soap\NTLM.php on line 78 ( ! ) SSRS_Soap_Exception: WSDL cache path is not valid in C:\wamp\www\Reports\library\SSRS\Soap\NTLM.php on line 78

How to set the path?

Setting the path is simple enough. Pass it as an option when instantiating SSRS_Report, like this:

<?php

$options = array(
  'username' => 'test',
  'password' => '',
  'cache_wsdl_path' => '/path/to/cache/file.cache'
);

$ssrs = new SSRS_Report('http://localhost/reportserver/', $options);

As long as the directory and the file (if it already exists) are writeable, SSRS_Report will save a copy of the WSDL file there.

Clone this wiki locally