php - Symlinking issues leading to file not found -


in home directory have laravel project folder:

/home   /user     /project       /public     <--------.         index.php          |       /bootstrap           |         autoload.php       |       /config              |         /public            | /src                       |   /http                    |     /project (softlink here) 

in project/public/index.php have this:

require __dir__.'/../bootstrap/autoload.php'; 

i soft-linked apache public folder public folder in user directory:

$ ln -s /home/user/project/public /srv/http/project 

so should able open localhost/project. 500 internal server error. here relevant log apache:

$ cat /var/log/httpd/error_log [tue jun 02 2015] [:error] php warning:  require(/home/user/project/config/public/../bootstrap/autoload.php): failed open stream: no such file or directory in /home/user/project/config/public/index.php on line 21, referer: http://localhost/project/ [tue jun 02 2015] [:error] php fatal error:  require(): failed opening required '/home/user/project/config/public/../bootstrap/autoload.php' (include_path='/home/user/project/vendor/phpunit/php-text-template:/home/user/project/vendor/phpunit/php-timer:.:/usr/share/pear') in /home/user/project/config/public/index.php on line 21, referer: http://localhost/project/ 

the logs suggest server looking /home/user/project/config/bootstrap/autoload.php. why though? did not link /home/user/project/config/public. have no idea issue apache, php, link or file system.

/home   /user     /project       /public     <--------.         index.php          |       /bootstrap           |         autoload.php       |       /config              |         /public            | /src                       |   /http                    |     /project (softlink here) 

so symlink flattened docroot looks like:

/src   /http     /project         index.php 

../bootstrap not exist far application concerned.

move symlink 1 level:

$ ln -s /home/user/project /srv/http/project 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -