I'm just getting started with CakePHP and also David Persson's Media plugin (http://github.com/davidpersson/media). I've got my app working but I'm having a difficult time getting the Media plugin working. I figured I'd start this thread so I could A.) get it working and B.) create a reference for beginners like me.
Here's what I've done so far (following the README and Configuration wiki - http://wiki.github.com/davidpersson/media/configuration). Steps marked with a * didn't go as documented :( 1. Download and extract the files to /path/to/your/app/plugins/media 2. Include the Media plugin config file in the /path/to/your/app/ config/bootstrap.php define ( 'MEDIA_TRANSFER', APP . 'transfer' . DS); define ( 'MEDIA_TRANSFER_URL', false); require APP . 'plugins/media/config/core.php'; * 3. Create the directory structure using the console cd /path/to/your/app/ ../cake/console/cake media init The Configuration wiki says that there should be a static, filter, and transfer directory under the webroot/media/ directory but the command above will put the transfer directory under the app directory. Not sure if this is how it should be or if I did something wrong. * 4. Copy/move/collect the media into the new location ../cake/console/cake media collect But this results in a bunch of errors :( -------------------------------------------------------------------------------- Media Shell -------------------------------------------------------------------------------- PHP Warning: Invalid argument supplied for foreach() in /path/to/your/ app/plugins/media/vendors/shells/tasks/collect.php on line 119 Warning: Invalid argument supplied for foreach() in /path/to/your/app/ plugins/media/vendors/shells/tasks/collect.php on line 119 PHP Notice: Undefined variable: pluginVendorPaths in /var/www/ portfolio/app/plugins/media/vendors/shells/tasks/collect.php on line 130 Notice: Undefined variable: pluginVendorPaths in /path/to/your/app/ plugins/media/vendors/shells/tasks/collect.php on line 130 PHP Warning: array_merge(): Argument #1 is not an array in /path/to/ your/app/plugins/media/vendors/shells/tasks/collect.php on line 130 Warning: array_merge(): Argument #1 is not an array in /path/to/your/ app/plugins/media/vendors/shells/tasks/collect.php on line 130 PHP Warning: Invalid argument supplied for foreach() in /path/to/your/ app/plugins/media/vendors/shells/tasks/collect.php on line 132 Warning: Invalid argument supplied for foreach() in /path/to/your/app/ plugins/media/vendors/shells/tasks/collect.php on line 132 Would you like to add another path? So I'm assuming maybe I've done something wrong. I will press on and instead just move the files manually: mv webroot/js/* webroot/media/static/js/ mv webroot/css/* webroot/media/static/css/ mv webroot/img/* webroot/media/static/img/ mv webroot/vendors/js/* webroot/media/static/js/ mv webroot/vendors/css/* webroot/media/static/css/ mv webroot/vendors/img/* webroot/media/static/img/ That works, minus the vendors directory (because I dont have one). At this point the app is no longer styled. e.g. the stylesheet is not in the proper path and afaik there isn't anything telling the app where to find it. :-/ Next step. * 5. Protect the transfer directory ../cake/console/cake media protect Doesn't work. I just get the message: The content of the transfer directory is not served. Guess I'll create this one manually as well. nano transfer/.htaccess Order deny,allow Deny from all Save and exit. 6. Give up. Actually I pressed on but there really isn't any thorough documentation after this point. Any help would be appreciated. I'd love to put together some documentation that would help other n00bs like me get this thing set up. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en