error when trying to use Yii on linux... (fedora17)

When I have tried working with Yii and WAMP it was great, but I switched to fedora and things just doesn’t work.

I created a new webapp from scratch (after the one I used with WAMP didn’t worked) and it still keep giving me errors: (1 warning, 1 error)




( ! ) Warning: require_once(/var/www/html/test_yii/../../yii/framework/yii.php): [b]failed to open stream: Permission denied[/b] in /var/www/html/test_yii/index.php on line 12

Call Stack

#	Time	Memory	Function	Location

1	0.0003	232896	{main}( )	../index.php:0


( ! ) Fatal error: require_once(): [b]Failed opening required[/b] '/var/www/html/test_yii/../../yii/framework/yii.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/test_yii/index.php on line 12

Call Stack

#	Time	Memory	Function	Location

1	0.0003	232896	{main}( )	../index.php:0



now - my root directory is at /var/www/html

my Yii framework directory is at /var/www/yii/framework

that means outside the root directory.

What do you think is the problem?

PHP / Apache?

I’m far from being an apache expert, I tried to add this:




<Directory /var/www/yii>

	<IfModule mod_php5.c>

		php_admin_flag engine on

        	php_admin_flag safe_mode off

        	php_admin_value open_basedir "/var/www/yii"

	</IfModule>

	Options Indexes FollowSymLinks

	Options -Includes -ExecCGI

	Allow from all

</Directory>



because i read this and thought it was the same problem. but it did not work for me…

Please help me… :rolleyes:

This looks a lot like a rights management issue. Check if Apache has sufficient rights on /var/www/yii. You might also check if SELinux gave any alerts.

You are right!

SELinux:




The source process: /usr/sbin/httpd

attempted this access: getattr

On this directory: /var/www/yii



But how do I grant this?

this solved the problem by relabeling the directory security context