0
votes

I SSH'd to my server and installed Composer and Ratchet. http://socketo.me/docs/install claims all I need to do now is include "require DIR . '/vendor/autoload.php';" at the top of my php file. My page now gets a "failed to open stream: No such file or directory" error.

I've tried various forms of the directory, like "../vendor/autoload.php", but I keep getting the same error. The error reports that it is trying to find it in "/var/www/html/mo/myDomainName.com".

Should I be able to find a vendor folder in my home directory via ftp? I am confused where I'm supposed to be pointing to after my install.

1
Composer will install to the path where you run the installer unless you specify --install-dir, seems in your case the incorrect place. As Mike says it should be above document root such as /var/www/vendor.EternalHour
Vendor folder is located at the top the project folder, next to composer.json. public_html is your web-server default project folder for localhost.Daniel Protopopov

1 Answers

0
votes

typically vendor folder for composer is located above /public_html, so if your script is in public_html folder, you'll have to reference this as up one level

example

require_once '../vendor/autoload.php';