SAFE MODE Restriction in effect.

i just put my Yii website online. but i get the following error:

Error 500

copy() [<a href='function.copy'>function.copy</a>]: SAFE MODE Restriction in effect. The script whose uid is 688 is not allowed to access /home/lustgr00/domains/***.nl/public_html/assets/3bd2628 owned by uid 101 

i tried to turn of the SAFE MODE but no success.

need some help, thank you.



Do you have access to php.ini or the webservers virtual host config? Safe mode can only be turned off there.

No access to php.ini or the config.

Then there’s no way for you to disable safe mode. Either be very nice to your provider and convince them not to use safe mode for your site or find another provider.

I’ve had the same problem with jaguar-host. Put in a ticket and they partially fixed it at least. Ended up changing hosts. I think its caused by bad compatibility between some server extensions.

I always got the error when I tried to run a widget or view multiple times in a single request

It would probably be good to at least put a warning on the requirements check page about this. The check passes, but if SAFE MODE is active, you are somewhat limited to what you can do. Are there any work-arounds?


I like that idea. The requirement checker should give as many hints about potential problems as possible.

I’ve previously managed to work around this by manually creating all the assets folders. Not 100% sure it work, but it worked for me.

@Alex Muir:

Do you mean you also created the folder with the hashed name inside /assets? That could be problematic. The directory name is created as a checksum from "path to published file" + Yii version. So if one of these two change, you need to change the names inside your asset folder.

Did you CHMOD correct? even with safe mode it should be able to make dir / files…

Else CHOWN the files to the apache user…

I’ve also met this problem, recently. And here is the I solved it.

I gave write access to everyone to the folder ‘assets’. And uploaded all subfolders of my local project.

And changed subfolder names by looking in errors list of firebug.

Thanks to Ascomae