Yii 1.1: safemodeassetmanager

Will allow Yii's AssetManager to work under Safe_Mode restrictions
6 followers

This extension will allow your site to work under php's safe_mode restrictions.

With linkAssets it was nearly working perfectly but it had a problem when publishing single files it tried to create a directory again - this is fixed with this extension. Through this is based on the linkAssets feature it only works for the platforms where linking is working (i think most unixes and modern windows)

Setup is very easy: just add this to your config:

'components'=>array(
        'assetManager'=>array(
                'class'=>'application.extensions.SafeModeAssetManager',
        ),

Some links:

Total 3 comments

#7892 report it
ItsYii at 2012/04/25 03:20am
Fantastic

This was my last hurdle in making my website Live, really good. Works like a charm and thanks for developing.

#6437 report it
balrok at 2012/01/10 12:06pm
old

Hello, I think the AssetManager from recent Yii Versions does work under SAFE_MODE so in my Opinion you shouldn't use this extension if you are in doubt. It is not so well tested and I also don't use it anymore. Otherwise feel free to post patches or ask questions ;)

#6436 report it
muhoo at 2012/01/10 11:51am
_ not / ?

So it seems like what this does different from the CAssetManager is: it symlinks, obviously, and it also changes the file paths to _ instead of /, making it flat.

In particular, getPublishedUrl looks like the identical code to the CAssetManager, except that / is changed to _ in file paths.

Leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: MIT License
  • Developed by: balrok
  • Category: Others
  • Votes: +2
  • Downloaded: 350 times
  • Created on: Apr 7, 2011
  • Last updated: Apr 7, 2011
  • Tags: assets