php - Wrong __DIR__ magic constant value -


i've been trying install web application built using laravel framework. application hosted git repository.

here detailed description of problem clarify how i'm facing it.

for first time cloned repository in following path:

/var/www/app.example.com/script/

then created symbolic link it's public directory follow server's nginx routing convention:

ln -s /var/www/app.example.com/script/public /var/www/app.example.com/public_html 

but decided move out of script directory 1 upper level , problem started.
moved laravel installation /var/www/app.example.com/ , made nginx directly load public directory root path.

now problem every time try load application it's trying read files previous location:

warning: require(/var/www/app.example.com/script/public/../bootstrap/autoload.php): failed open stream: no such file or directory in /var/www/app.example.com/public/index.php on line 21

fatal error: require(): failed opening required '/var/www/app.example.com/script/public/../bootstrap/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/app.example.com/public/index.php on line 21

notes keep in mind:

  • i've used composer install dependencies

    curl -ss https://getcomposer.org/installer | php
    php composer.phar install

  • i'm using nginx web server

  • i've tried removing (including ~/.composer) , start on again no avail.
  • i have tried move whole project new root directory
  • it seems problem __dir__ magic constant since contains wrong path
  • weirdly enough if echo __dir__ prints correct path in next line in it's used has incorrect old path

i hope have been clear enough in description avoid confusion , possible down-votes.

so completly wrong here, there configuration file might have saved it? or there still left in script directory can mabey cause this? when __dir__ outputs right value, should in other code too.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -