fail to open yii.php in ubuntu

I have deployed my application in ubuntu server under /var/www, but when I try to run the application in broswer, it gives me this error:

PHP Fatal error:  require_once(): Failed opening required '/var/www/../yii/framework/yii.php'

 (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/index.php on line 12

the yii framework is located /var/yii and I have set the yii.php to 755 permission, and php is working perfectly when testing with phpinfo().

does anybody maybe have some idea what could be the problem, thanks for help.

Are you shure that yii is placed in /var/ folder?

Check that your php.ini has /var in the list of allowed directories, if the open base dir restriction is in effect.

Hi thanks for reply. I am sure the yii is under /var. I checked more than twice.

thanks, this may help. but could you please elaborate a lite more. where do I change that? I am new to ubuntu. thanks for your help.

First you test if it’s an issue at all:

Copy or move Yii directory from /var to /var/www and adjust your path in index.php - if it works, then it’s the base dir restriction.

You need to Google where php.ini is on Ubuntu, as I haven’t used Ubuntu in a long time. :)