2amigos / yiinitializr

Library that will help boost your application installation with ease and also to run Yii applications from its bootstrap files on a much cleaner way that the framework currently proposes.
Other
44 stars 17 forks source link

autoload.php requiring problem #21

Closed hesna closed 9 years ago

hesna commented 10 years ago

Hi, First of all, I'm using advanced yiinitializr, not sure if it's the right place to ask or should've asked it in advanced initializr repo, sorry if I'm wrong. I have a weird problem using yiic tool, which is php not finding autoload.php file.

Fatal error: require(): Failed opening required './../../common/lib/vendor/autoload.php' (include_path='.:') in /Applications/MAMP/htdocs/malek/yiic.php on line 13

my developing environment is OS X 10.8.4 using MAMP(PHP5.3.14), I tried other versions of PHP but nothing has changed. the problem can be solved by changing this line:

require('./../../common/lib/vendor/autoload.php');

to this:

require(dirname(__FILE__).'/common/lib/vendor/autoload.php');

but why is that? index.php files are using the same way of addressing for autoload.php and they work fine, why is it not working within terminal and yii tool?