<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Ninja vs Penguin - Latest Comments in CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://ninjavspenguin.disqus.com/</link><description></description><language>en</language><lastBuildDate>Fri, 18 Jul 2008 08:00:10 -0000</lastBuildDate><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354755</link><description>Hey there,&lt;br&gt;&lt;br&gt;Just a short note for CakePHP 1.2: If you want to solve the 500 Error with least changes possible just add the appropriate RewriteBase command to the app/webroot/.htaccess file. This is where any request lands somewhere during the "bootstrap process" anyway and it is easy to remove once an application goes live on a single domain.&lt;br&gt;&lt;br&gt;Cheers</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Caffeine</dc:creator><pubDate>Fri, 18 Jul 2008 08:00:10 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354754</link><description>Damn, I wish I had found this post two weeks ago. I would have saved so much configuration time. My .htaccess files had all disappeared, so copying and pasting the Apache code from this post still saved the day.&lt;br&gt;&lt;br&gt;Awesome job.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">spamguy</dc:creator><pubDate>Sat, 07 Jun 2008 17:33:50 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354751</link><description>Hi rollins,&lt;br&gt;&lt;br&gt;That's some nice .htaccess ninja you got going.  I'm glad you were able to find a solution that works for you :)&lt;br&gt;&lt;br&gt;-Penguin</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">NinjaVsPenguin</dc:creator><pubDate>Thu, 08 May 2008 01:01:18 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354750</link><description>Thanks for the tips.  I ended up just sticking the entire cake directory into ~/public_html, and named it for my application.  Then I took Alun's advice and added RewriteBase /~user/application to each of the .htaccess files.  Then I just stuck a redirect from ~user to ~user/applicaiton an I was good to go.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rollins</dc:creator><pubDate>Thu, 08 May 2008 00:58:52 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354753</link><description>Hi Scott,&lt;br&gt;&lt;br&gt;I never actually got Bake to work, not even in the "normal" configuration.  So, unfortunately, I can't be of any help.&lt;br&gt;&lt;br&gt;Good luck with your projects!&lt;br&gt;-Penguin</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">NinjaVsPenguin</dc:creator><pubDate>Wed, 02 Apr 2008 16:23:52 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354752</link><description>I changed my setup to match this configuration and ALMOST everything was working. I couldn't get the bake console script to work. It wouldn't copy files when creating a project or write the models files. &lt;br&gt;&lt;br&gt;I moved the app files below the webroot and bake starting working again. &lt;br&gt;&lt;br&gt;Any idea why?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">scott</dc:creator><pubDate>Wed, 02 Apr 2008 16:21:07 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354749</link><description>The locations of the three files are&lt;br&gt;&lt;br&gt;root/&lt;br&gt;root/app&lt;br&gt;root/app/webroot &lt;br&gt;&lt;br&gt;not cake as you suggested above ;)&lt;br&gt;&lt;br&gt;Thanks for the articel though it's helped me sort my problem out.  I had to add RewriteBase / to each .htaccess and it all works great now :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alun</dc:creator><pubDate>Mon, 06 Aug 2007 10:57:19 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354748</link><description>addition :&lt;br&gt;due to posting the ’ needs to be changed to ' (the single apos next to enter)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joren</dc:creator><pubDate>Wed, 25 Jul 2007 17:25:39 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354747</link><description>Thanks, Joren!  It looks great!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">NinjaVsPenguin</dc:creator><pubDate>Wed, 25 Jul 2007 16:02:38 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354746</link><description>hey thanks alot for the help to start, i have made some modifications that might help alot of people ..&lt;br&gt;&lt;br&gt;these small modifications will save you lots of works!!&lt;br&gt;&lt;br&gt;what they do are the following :&lt;br&gt;generate on-the-fly the ROOT-location and more!!!&lt;br&gt;&lt;br&gt;i have tested it and i loved it myself :)&lt;br&gt;&lt;br&gt;===========================&lt;br&gt;&lt;br&gt;so what you need to do is, open the original /app/webroot/index.php&lt;br&gt;go to line 41 and replace the following lines with the original!&lt;br&gt;&lt;br&gt;&lt;br&gt;	chdir("../../");&lt;br&gt;	$root = getcwd();&lt;br&gt; &lt;br&gt;	if (!defined('ROOT')) {&lt;br&gt;		//define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';&lt;br&gt;		//You should also use the DS define to seperate your directories&lt;br&gt;		define('ROOT', $root.DS.'apps');&lt;br&gt;	}&lt;br&gt;	if (!defined('APP_DIR')) {&lt;br&gt;		//define('APP_DIR', 'DIRECTORY NAME OF APPLICATION';&lt;br&gt;		define('APP_DIR', basename(dirname(__FILE__)));&lt;br&gt;	}&lt;br&gt;/**&lt;br&gt; * This only needs to be changed if the cake installed libs are located&lt;br&gt; * outside of the distributed directory structure.&lt;br&gt; */&lt;br&gt;	if (!defined('CAKE_CORE_INCLUDE_PATH')) {&lt;br&gt;		//define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';&lt;br&gt;		//You should also use the DS define to seperate your directories&lt;br&gt;		define('CAKE_CORE_INCLUDE_PATH', $root);</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joren</dc:creator><pubDate>Wed, 25 Jul 2007 16:00:20 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354745</link><description>Nice article. Very helpful.  Can you attach your htaccess per your article?  Since you moved your webroot dir you can't be using:&lt;br&gt;&lt;br&gt;RewriteEngine on&lt;br&gt;RewriteRule ^$ app/webroot/ [L]&lt;br&gt;RewriteRule (.*) app/webroot/$1 [L]&lt;br&gt;&lt;br&gt;I am a newbie to working with rewrite rules and I can't figure out how to path it properly.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave</dc:creator><pubDate>Sun, 22 Jul 2007 05:05:09 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354744</link><description>Thanks for this post. Part 2 should be included into cake manual! :-)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Blackie</dc:creator><pubDate>Thu, 05 Jul 2007 03:16:35 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354743</link><description>Yes, the solution to problem 2 is complete.  You shouldn't have to edit the .htaccess files.  The only one you might have to edit is the first one:&lt;br&gt;&lt;br&gt;First: in the core cakephp directory&lt;br&gt;/cake&lt;br&gt;&lt;br&gt;contents of .htaccess (unedited)&lt;br&gt;&lt;br&gt;RewriteEngine on&lt;br&gt;RewriteRule ^$ app/webroot/ [L]&lt;br&gt;RewriteRule (.*) app/webroot/$1 [L]&lt;br&gt;&lt;br&gt;This tells cakePHP where you webroot is.  If you have a basic install, then this shouldn't need to change.  If you have a different directory for your apps, then you'll need to change the directories accordingly.&lt;br&gt;&lt;br&gt;HTH.&lt;br&gt;&lt;br&gt;-Penguin</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">NinjaVsPenguin</dc:creator><pubDate>Mon, 23 Apr 2007 08:38:58 -0000</pubDate></item><item><title>Re: CakePHP Install: Multiple Subdirectories &amp;#038; 500 Error</title><link>http://www.ninjavspenguin.com/blog/2007/01/21/cakephp-install-multiple-subdirectories-500-error/#comment-1354742</link><description>Hi. Is the solution for problem 2 complete? I can't seem to find the edited versions of the 3 .htaccess files? Can I have the link if it's posted someplace else? Thanks! =)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jahypee09</dc:creator><pubDate>Mon, 23 Apr 2007 04:11:47 -0000</pubDate></item></channel></rss>