0
votes

I have installed the azure PHP SDK via IIS web platform manager. But I am unable to use the API.

After calling the API like this:

<?php

require_once "vendor/autoload.php"; 

echo 'Azure test';

?>

I get the following error:

HP Warning: require_once(vendor/autoload.php) [function.require-once]: failed to open stream: No such file or directory in C:\inetpub\wwwroot\azure.php on line 3 PHP Fatal error: require_once() [function.require]: Failed opening required 'vendor/autoload.php' (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\azure.php on line 3

I am not sure why it is looking for a pear package.

Any idea why it is not working.

Thanks

1
vendor/autoload.php Is not located where you are trying to require it. Where is the script that runs the require and where is the autoload.php?Hydra IO
Looks like your need to install the vendor/autoload.php to enable the autoloader. I think composer will help your.hfcorriez
It seems to have worked, I see an autoload file in vendor, should I include this in my "include_path" file in my php.ini, so it is automatically called from whatever directory. Or do I need to stick all my related php files in the same directory as thesebobo2000
@hfcorriez - you should move your comment to an Answer, since that appeared to actually solve the problem.David Makogon

1 Answers

0
votes

As hfcorriez said yes. I thinks you just need add pear packages to your "include_path", your auto_load class will call them.