Error creating webapp (SUSE Linux)


I just tried to install Yii on my server which is running PHP 5.2.6. The requirements-page sais that installing Yii was possible. But everytime I run [font=“Courier New”]./yiic webapp ../[/font] I’m getting the same errors (seems to be a stacktrace):


#6  WebAppCommand->run(Array ([0] => ../)) called at [/srv/www/vhosts/****.de/httpdocs/framework/console/CConsoleCommandRunner.php:62]

#7  CConsoleCommandRunner->run(Array ([0] => ./yiic,[1] => webapp,[2] => ../)) called at [/srv/www/vhosts/****.de/httpdocs/framework/console/CConsoleApplication.php:88]

#8  CConsoleApplication->processRequest() called at [/srv/www/vhosts/****.de/httpdocs/framework/base/CApplication.php:135]

#9  CApplication->run() called at [/srv/www/vhosts/****.de/httpdocs/framework/yiic.php:33]

#10 require_once(/srv/www/vhosts/****.de/httpdocs/framework/yiic.php) called at [/srv/www/vhosts/****.de/httpdocs/framework/yiic:15]

Afterwards there are an index.php, index-test.php, a css and an asserts-directory. Nothing else. And when I try to load the site in the browser there is just a blank page.

Does anybody know what’s the problem?



The stacktrace isn’t full. Could you attach full stacktrace. Full stacktrace should include lines from #1 to #10.

PHP Error[2]: file_put_contents(): SAFE MODE Restriction in effect.  The script whose uid is 10001 is not allowed to access /srv/www/vhosts/****.de/httpdocs/css owned by uid 0

in file /srv/www/vhosts/****.de/httpdocs/framework/console/CConsoleCommand.php at line 154

But save_mode is Off.

I suppose that uid=10001 is apache process and uid=0 identify root.

You need to change permissions of your yii installation to 10001 user.

Try to run:

chown -R apache /srv/www/vhosts/****.de/httpdocs

chgrp -R apache /srv/www/vhosts/****.de/httpdocs

In some systems apache can be www-data and so on.


I don’t think that safe mode is off, because then PHP would not say so. Please note that PHP on the command line (which is used by yiic) usually has its own config file (php.ini). You could use this command to find the location of this file and turn of safe mode:

php --ini

Thank you, I had to do it with every directory yiic created, but it works. :)

Great! Thanks a lot! :) I just checked the phpinfo() in the webbrowser and there save_mode was turned off. Now I’m getting:

Your application has been created successfully under /srv/www/vhosts/****.de/httpdocs/framework/...

Thanks a lot!