I have a PHP application where the autoloader is situated in /var/www/html/example.com/src/vendors/autoloader.php
var/
www/
html/
example.com
app/
vendors/
vendor_a/
example.php
vendor_b/
vendor_c/
autoloader.php
public/
In autoloader.php
I have a line that requires example.php
from the vedor_a/
folder. although this works in my local virtual box running centos, php-fpm, nginx it fails to work in my vps, which has the same version of every program I am running in my localhost.
I am using php5.5.14
and I get this error when I require the above file.
Warning: require(vendor_a/example.php): failed to open stream: No such file or directory in /var/www/html/example.com/vendors/autoloader.php on line 2
Fatal error: require(): Failed opening required 'vendor_a/example.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/example.com/vendors/autoloader.php on line 2
I haven't modified anything from my php.ini
where the include_path
defaults to
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
I am looking more than a solution here. Because I can see the include_path
looks for php/includes
dir when constructs such as require
, include
, include_once
... at-least according to the manual but I can't find a directory called php/includes
so why is that setting even there?