Moving Code Outside of HTDocs

I have Yii working fine with XAMPP on a Mac and successfully have the folder ‘myYii’ generated by Yii located so that I can access the site with via localhost/myYii. However, I want to sync my work with Dropbox (with symlinks) and I am unable to use a program to help with that since it blocks syncing folders within the Applications folder. Also, I would like to keep my Yii website in my Documents folder anyhow for other backup purposes (rather than deep down in Applications).

So, is there some tutorial or example of how to leave the myYii folder under XAMPP in the Applications folder along with the index.php, and have the rest of the work-in-progress files somewhere else?

I’ve tried pointing to the config file in index.php like the following:



but I get errors like this (and don’t really know what permissions have to do with this):

Warning: require(/Users/myusername/Documents/myYii/protected/config/main.php) [function.require]: failed to open stream: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/yiiroot/framework/base/CApplication.php on line 136

Fatal error: require() [function.require]: Failed opening required '/Users/myusername/Documents/myYii/protected/config/main.php'(include_path='.:/Applications/XAMPP/xamppfiles/lib/php:/Applications/XAMPP/xamppfiles/lib/php/pear') in /Applications/XAMPP/xamppfiles/htdocs/yiiroot/framework/base/CApplication.php on line 136 

Thanks for any directions or help.

It’s probably because realpath() needs read access to all directories along the path.


Thanks! “Documents” was “No Access” for Everyone (everything else before and after was read-only). I somehow thought that since I was the one logged-in with read-write privileges everywhere that shouldn’t have been a problem.