Warning: require_once(/var/www/html/Yii/framework/yii.php): failed to open stream: Permission denied in /var/www/html/Yii/testdrive/index.php on line 12 Fatal error: require_once(): Failed opening required ‘/var/www/html/Yii/testdrive/../framework/yii.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/Yii/testdrive/index.php on line 12
Thanks. I figured that much out. /var/www/html/Yii/testdrive/index.php, /var/www/html/Yii/framework/yii.php, and /usr/share/php all have permissions -rwxr-xr-x. I don’t see where the problem could be.
Hi, i’am a new bee and have same problem when i try to get the first project to run. And i am administrotor on my win 7 machin and never have any problem with access before. Can anyone help to solve my problem, please!:
generate protected/yiic.bat
PHP Error[2]: file_put_contents(C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\yii\testdrive\protected\yiic.bat): failed to open stream: Per
mission denied
in file C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\yii\framework\console\CConsoleCommand.php at line 355
At first, I thought it was a permissions problem. After changing permissions and getting nowhere, I found the solution in a cakePHP forum… I adjusted it for Yii:
This confirms it’s not a Yii problem. Check that you have read permission for the source file and write permission for the destination directory. Possibly also permission to delete an already existing file.
I copied the Project to the demofolder, opened the Browser
with:
localhost/yii/demos/testdrive/index.php
Here I got the following error:
require_once(C:\xampp\htdocs\yii\demos\teestdrive/../../test/yii.php): failed to open stream: No such file or directory in C:\xampp\htdocs\yii\demos\testdrive\index.php on line 12
to get the thing started i had to open the index.php in a editor
and change the following line:
$yii=dirname(FILE).’/../yii.php’;
To
$yii=dirname(FILE).’/../../framework/yii.php’;
Now it works !!!
when creating the new Project via yiic the path wasnt the right one ?
You have to change it manually. It is hard work to get this thing started
and the creators of yii have to think about that. A newbie will throw the whole thing away