1

I am new to PHP and trying to figure out issues with autoload.php. I downloaded php-amqplib package and it's dependencies and trying to test PHP page. I am getting failed to open stream: No such file or directory 'D:\inetpub\wwwroot\test\vendor\videlalvaro\php-amqplib\demo/../vendor/autoload.php' (include_path='.;C:\php\pear'). I am using 5.3.13 and it's installed in 'D:\PHP5313' folder. There is no 'pear' folder. Could you please let me know if I am missing something? Thanks for any suggestions.

autoload.php

require_once __DIR__ . '/composer' . '/autoload_real.php';

return ComposerAutoloaderInit5e74aaf68e13rfe5f321c5a586eb96f22::getLoader();
Vic Seedoubleyew
  • 9,888
  • 6
  • 55
  • 76
nav100
  • 2,923
  • 19
  • 51
  • 89
  • Possible duplicate of [Php - Failed to open stream : No such file or directory](http://stackoverflow.com/questions/36577020/php-failed-to-open-stream-no-such-file-or-directory) – Vic Seedoubleyew Sep 11 '16 at 09:03

1 Answers1

1

Your path to the required file it not correct (autoload.php).

__DIR__ is the actual directory where the file is located. I think you have to go back to come to the folder where the autoload.php is located.

D:\inetpub\wwwroot\test\vendor\videlalvaro\php-amqplib\demo/../vendor/autoload.php' 

I think you have to go back to the vendor folder in your case where normally the autoload file is located. I think its 3 folders higher.

René Höhle
  • 26,716
  • 22
  • 73
  • 82
  • Autoload.php is located at D:\inetpub\wwwroot\test\vendor. Where do I have to make correction? – nav100 Feb 20 '14 at 16:33
  • On the place where you include the autoload.php i think you use `__DIR__` then go back with `__DIR__."/../../"` until you are on the correct location. – René Höhle Feb 20 '14 at 16:37