Re: CakePHP In A Subdirectory?
I just had have the same problem of ** inVinCable, and i fix it with this solution, of the Mauricio Morales: El martes, 27 de enero de 2009 14:57:34 UTC-5, Mauricio Morales escribió: > > I've gotten the same problem when I put the entire application into a > directory that contain the words: > > "app" > > or > > "cake" > > If your directory's real name is "myapp" try changing it for > "mysoftware" and reload again, there is no necessary to > alter .htaccess files. > > Hope help. > > On Jan 26, 5:05 am, inVINCable wrote: > > Hey all, > > > > Very simply question but cannot seem to find the answer. I have the > > directory structure and everything in tact in the normal way. However, > > on my server I put the entire structure in the /myapp folder in the > > document root. > > > > Now, everything is all mest up and there is no CSS and files are > > missing and such. Surely cake has a simple variable to reflect these > > changes? Any advice? I have already looked at the book and the bakery > > and have tried things but they have not worked, such as messing with > > the variables in the index.php file. > > > > I am using version 1.2 > > > > Thank you for any advice/pointers. > > > > Regards -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: How to make the routes working with CakePHP in a subdirectory
Got it, i just forgot to add the RewriteBase to one of the three .htaccess files. Sorry guys :) Am Donnerstag, 1. März 2012 21:09:41 UTC+1 schrieb Optik Fluffel: > > I have a little Webpage set up with a little CakePHP Webapp in it. > The CakePHP stuff is in a subdirectory and so I got my .htaccess like this: > > > RewriteEngine on > RewriteRule ^test/subdirectory$ subdirectory/app/webroot > RewriteRule ^test/subdirectory/(.*)$ subdirectory/app/webroot/$1 > > > Now navigating to domain.com/subdirectory works, but for my route to > login I only get a 404 =( > > Router::connect( '/login', array('controller' => 'users', 'action' => > 'login')); > > Could you please help me? > > //edit: I just tried around a little bit, my other routes like > domain.com/controller/action/id don't work either. > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
How to make the routes working with CakePHP in a subdirectory
I have a little Webpage set up with a little CakePHP Webapp in it. The CakePHP stuff is in a subdirectory and so I got my .htaccess like this: RewriteEngine on RewriteRule ^test/subdirectory$ subdirectory/app/webroot RewriteRule ^test/subdirectory/(.*)$ subdirectory/app/webroot/$1 Now navigating to domain.com/subdirectory works, but for my route to login I only get a 404 =( Router::connect( '/login', array('controller' => 'users', 'action' => 'login')); Could you please help me? //edit: I just tried around a little bit, my other routes like domain.com/controller/action/id don't work either. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: installing cakephp in a subdirectory
HI Sam, Thanks for your response.. As per your suggestion i tried adding rewrite base to all three .htaccess file under cake_install_dir, cake_install_dir/app and cake_install_dir/app/webroot. BUt it doesnt seems to work. BUt putting this .htaccess file in root of server, it directs me directly to my subdir and everything works fine. RewriteEngine on RewriteRule ^$ subdir/app/webroot/ [L] RewriteRule (.*)$ subdir/app/webroot/$1 [L] But what I wanted is a link from my index page which diverts to my cake application. Please suggest. Thanks John M On Tue, Apr 6, 2010 at 9:46 AM, Sam Sherlock wrote: > have you tried adding rewritebase to each successive .htaccess or just the > base one. On some hosts I found found it needs to be added to each one. > > - S > > On 6 April 2010 04:47, John Mehul wrote: > >> /subdir > > > 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.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > 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 To unsubscribe, reply using "remove me" as the subject.
Re: installing cakephp in a subdirectory
have you tried adding rewritebase to each successive .htaccess or just the base one. On some hosts I found found it needs to be added to each one. - S On 6 April 2010 04:47, John Mehul wrote: > /subdir 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 To unsubscribe, reply using "remove me" as the subject.
installing cakephp in a subdirectory
I problem seems to be simple but i am not able to fix it for days. I want a simple html index page on my wwwroot, from where i need a link to my cakephp application which is in the subdir on the same server. My application works fine from root. My folder structure is like /public_html /subdir /cakeapp /app /cake /vendors /templates I tried rewritebase /subdir/ in .htaccess in cake_install_dir and tried changing paths in app/webroot/index.php and also tried moving webroot files to document root. Most of the time my cake application is running but "*WITHOUT CSS*". Please help. Thanks John M. 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 To unsubscribe, reply using "remove me" as the subject.
Re: CakePHP In A Subdirectory?
I've gotten the same problem when I put the entire application into a directory that contain the words: "app" or "cake" If your directory's real name is "myapp" try changing it for "mysoftware" and reload again, there is no necessary to alter .htaccess files. Hope help. On Jan 26, 5:05 am, inVINCable wrote: > Hey all, > > Very simply question but cannot seem to find the answer. I have the > directory structure and everything in tact in the normal way. However, > on my server I put the entire structure in the /myapp folder in the > document root. > > Now, everything is all mest up and there is no CSS and files are > missing and such. Surely cake has a simple variable to reflect these > changes? Any advice? I have already looked at the book and the bakery > and have tried things but they have not worked, such as messing with > the variables in the index.php file. > > I am using version 1.2 > > Thank you for any advice/pointers. > > Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
Did you reboot the web server yet. This sounds exactly like the issue I was having. Also, check your web server error log files just in case. On Jan 27, 7:56 am, leo wrote: > > I tried doing phpinfo() from the index.php file and nothing was > > displayed > > Doesn't this ring any alarm bells? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
> I tried doing phpinfo() from the index.php file and nothing was > displayed Doesn't this ring any alarm bells? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
Sometimes I have problems because I forget to set AllowOverride to All in vhost configuration... maybe it can help. Sometimes s still a pain to prepare the enviroment to start developing :S Cheers 2009/1/26 inVINCable : > > RoVo: > > Tested your solution, still no go. This time, no 500 error, but no CSS > or anything :/ > > I tried doing phpinfo() from the index.php file and nothing was > displayed and on my localserver i checked and mod_rewrite is on. > > > > On Jan 26, 6:35 am, RoVo wrote: >> Hi inVINCable, >> >> I have tested my suggestion - see above. >> This is the htaccess of the top-level. The others are untouched. >> >> Hope that helps >> RoVo > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
RoVo: Tested your solution, still no go. This time, no 500 error, but no CSS or anything :/ I tried doing phpinfo() from the index.php file and nothing was displayed and on my localserver i checked and mod_rewrite is on. On Jan 26, 6:35 am, RoVo wrote: > Hi inVINCable, > > I have tested my suggestion - see above. > This is the htaccess of the top-level. The others are untouched. > > Hope that helps > RoVo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
Hi inVINCable, I have tested my suggestion - see above. This is the htaccess of the top-level. The others are untouched. Hope that helps RoVo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
Are you sure mod_rewrite is enabled? check by creating a phpinfo file and accessing it through your browser, then do a find "rewrite". If it is enabled, check in the httpd.conf file that allow_override for that directory spec is 'all'. I have only ever changed the top level .htaccess file. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
I have always got the desired results with only changing the top level one. Chad On Mon, Jan 26, 2009 at 9:21 AM, inVINCable wrote: > > Ok, I notice there are 3 .htacess files included in a cake release. > One in the top-level directory, one in app and one in app/webroot, so > they should all look like this: > > >RewriteEngine on >RewriteBase /myapp > RewriteRule ^$ app/webroot/[L] >RewriteRule (.*) app/webroot/$1 [L] > > > or just one of them? > > On Jan 26, 6:09 am, RichardAtHome wrote: > > Might be worth re-starting the (web) server. It fixed a 500 error I > > was getting a while back. Been fine every since (even after uploading > > source updates). > > > > On Jan 26, 1:38 pm, inVINCable wrote: > > > > > Hey, > > > > > Ok, I found both of the .htacess files and added "RewriteBase /myapp" > > > so my .htacess file looks like: > > > > > > > > RewriteEngine on > > > RewriteBase /myapp > > > RewriteRule^$webroot/[L] > > > RewriteRule(.*) webroot/$1[L] > > > > > > > > I also deleted the cache (just the files) and now I am getting a 500 > > > Internal Server Error. I have tried this both on my local machine and > > > a live server and the same thing happens. Anyone know what I might be > > > doing wrong? > > > > > On Jan 25, 9:49 pm, Paolo Stancato wrote: > > > > > > Find .htaccess files (there are two) and add "RewriteBase /myapp" > > > > into mod_rewrite section. > > > > > > Regards > > > > > > 2009/1/26 inVINCable : > > > > > > > Hey all, > > > > > > > Very simply question but cannot seem to find the answer. I have the > > > > > directory structure and everything in tact in the normal way. > However, > > > > > on my server I put the entire structure in the /myapp folder in the > > > > > document root. > > > > > > > Now, everything is all mest up and there is no CSS and files are > > > > > missing and such. Surely cake has a simple variable to reflect > these > > > > > changes? Any advice? I have already looked at the book and the > bakery > > > > > and have tried things but they have not worked, such as messing > with > > > > > the variables in the index.php file. > > > > > > > I am using version 1.2 > > > > > > > Thank you for any advice/pointers. > > > > > > > Regards > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
Ok, I notice there are 3 .htacess files included in a cake release. One in the top-level directory, one in app and one in app/webroot, so they should all look like this: RewriteEngine on RewriteBase /myapp RewriteRule ^$ app/webroot/[L] RewriteRule (.*) app/webroot/$1 [L] or just one of them? On Jan 26, 6:09 am, RichardAtHome wrote: > Might be worth re-starting the (web) server. It fixed a 500 error I > was getting a while back. Been fine every since (even after uploading > source updates). > > On Jan 26, 1:38 pm, inVINCable wrote: > > > Hey, > > > Ok, I found both of the .htacess files and added "RewriteBase /myapp" > > so my .htacess file looks like: > > > > > RewriteEngine on > > RewriteBase /myapp > > RewriteRule ^$ webroot/ [L] > > RewriteRule (.*) webroot/$1 [L] > > > > > I also deleted the cache (just the files) and now I am getting a 500 > > Internal Server Error. I have tried this both on my local machine and > > a live server and the same thing happens. Anyone know what I might be > > doing wrong? > > > On Jan 25, 9:49 pm, Paolo Stancato wrote: > > > > Find .htaccess files (there are two) and add "RewriteBase /myapp" > > > into mod_rewrite section. > > > > Regards > > > > 2009/1/26 inVINCable : > > > > > Hey all, > > > > > Very simply question but cannot seem to find the answer. I have the > > > > directory structure and everything in tact in the normal way. However, > > > > on my server I put the entire structure in the /myapp folder in the > > > > document root. > > > > > Now, everything is all mest up and there is no CSS and files are > > > > missing and such. Surely cake has a simple variable to reflect these > > > > changes? Any advice? I have already looked at the book and the bakery > > > > and have tried things but they have not worked, such as messing with > > > > the variables in the index.php file. > > > > > I am using version 1.2 > > > > > Thank you for any advice/pointers. > > > > > Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
Ok, going to go ahead and fix some things. I notice there a 3 .htacess files included in a cake release. One in the top-level directory, one in the /app folder, and one in app/webroot. Do I need to change all 3 of these? On Jan 26, 6:09 am, RichardAtHome wrote: > Might be worth re-starting the (web) server. It fixed a 500 error I > was getting a while back. Been fine every since (even after uploading > source updates). > > On Jan 26, 1:38 pm, inVINCable wrote: > > > Hey, > > > Ok, I found both of the .htacess files and added "RewriteBase /myapp" > > so my .htacess file looks like: > > > > > RewriteEngine on > > RewriteBase /myapp > > RewriteRule ^$ webroot/ [L] > > RewriteRule (.*) webroot/$1 [L] > > > > > I also deleted the cache (just the files) and now I am getting a 500 > > Internal Server Error. I have tried this both on my local machine and > > a live server and the same thing happens. Anyone know what I might be > > doing wrong? > > > On Jan 25, 9:49 pm, Paolo Stancato wrote: > > > > Find .htaccess files (there are two) and add "RewriteBase /myapp" > > > into mod_rewrite section. > > > > Regards > > > > 2009/1/26 inVINCable : > > > > > Hey all, > > > > > Very simply question but cannot seem to find the answer. I have the > > > > directory structure and everything in tact in the normal way. However, > > > > on my server I put the entire structure in the /myapp folder in the > > > > document root. > > > > > Now, everything is all mest up and there is no CSS and files are > > > > missing and such. Surely cake has a simple variable to reflect these > > > > changes? Any advice? I have already looked at the book and the bakery > > > > and have tried things but they have not worked, such as messing with > > > > the variables in the index.php file. > > > > > I am using version 1.2 > > > > > Thank you for any advice/pointers. > > > > > Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
Might be worth re-starting the (web) server. It fixed a 500 error I was getting a while back. Been fine every since (even after uploading source updates). On Jan 26, 1:38 pm, inVINCable wrote: > Hey, > > Ok, I found both of the .htacess files and added "RewriteBase /myapp" > so my .htacess file looks like: > > > RewriteEngine on > RewriteBase /myapp > RewriteRule ^$ webroot/ [L] > RewriteRule (.*) webroot/$1 [L] > > > I also deleted the cache (just the files) and now I am getting a 500 > Internal Server Error. I have tried this both on my local machine and > a live server and the same thing happens. Anyone know what I might be > doing wrong? > > On Jan 25, 9:49 pm, Paolo Stancato wrote: > > > Find .htaccess files (there are two) and add "RewriteBase /myapp" > > into mod_rewrite section. > > > Regards > > > 2009/1/26 inVINCable : > > > > Hey all, > > > > Very simply question but cannot seem to find the answer. I have the > > > directory structure and everything in tact in the normal way. However, > > > on my server I put the entire structure in the /myapp folder in the > > > document root. > > > > Now, everything is all mest up and there is no CSS and files are > > > missing and such. Surely cake has a simple variable to reflect these > > > changes? Any advice? I have already looked at the book and the bakery > > > and have tried things but they have not worked, such as messing with > > > the variables in the index.php file. > > > > I am using version 1.2 > > > > Thank you for any advice/pointers. > > > > Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
Hi, > ..I am getting a 500 Internal Server Error. Is it me? I think it should look like this?!? RewriteEngine on RewriteBase /myapp RewriteRule ^$ app/webroot/[L] RewriteRule (.*) app/webroot/$1 [L] Hope that helps RoVo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
Hey, Ok, I found both of the .htacess files and added "RewriteBase /myapp" so my .htacess file looks like: RewriteEngine on RewriteBase /myapp RewriteRule^$webroot/[L] RewriteRule(.*) webroot/$1[L] I also deleted the cache (just the files) and now I am getting a 500 Internal Server Error. I have tried this both on my local machine and a live server and the same thing happens. Anyone know what I might be doing wrong? On Jan 25, 9:49 pm, Paolo Stancato wrote: > Find .htaccess files (there are two) and add "RewriteBase /myapp" > into mod_rewrite section. > > Regards > > 2009/1/26 inVINCable : > > > > > Hey all, > > > Very simply question but cannot seem to find the answer. I have the > > directory structure and everything in tact in the normal way. However, > > on my server I put the entire structure in the /myapp folder in the > > document root. > > > Now, everything is all mest up and there is no CSS and files are > > missing and such. Surely cake has a simple variable to reflect these > > changes? Any advice? I have already looked at the book and the bakery > > and have tried things but they have not worked, such as messing with > > the variables in the index.php file. > > > I am using version 1.2 > > > Thank you for any advice/pointers. > > > Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
You also need to delete the contents off the app/tmp directory. Leave the file structure intact and just remove any files. This is rapidly becoming my stock answer :-S On Jan 26, 5:49 am, Paolo Stancato wrote: > Find .htaccess files (there are two) and add "RewriteBase /myapp" > into mod_rewrite section. > > Regards > > 2009/1/26 inVINCable : > > > > > Hey all, > > > Very simply question but cannot seem to find the answer. I have the > > directory structure and everything in tact in the normal way. However, > > on my server I put the entire structure in the /myapp folder in the > > document root. > > > Now, everything is all mest up and there is no CSS and files are > > missing and such. Surely cake has a simple variable to reflect these > > changes? Any advice? I have already looked at the book and the bakery > > and have tried things but they have not worked, such as messing with > > the variables in the index.php file. > > > I am using version 1.2 > > > Thank you for any advice/pointers. > > > Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CakePHP In A Subdirectory?
Find .htaccess files (there are two) and add "RewriteBase /myapp" into mod_rewrite section. Regards 2009/1/26 inVINCable : > > Hey all, > > Very simply question but cannot seem to find the answer. I have the > directory structure and everything in tact in the normal way. However, > on my server I put the entire structure in the /myapp folder in the > document root. > > Now, everything is all mest up and there is no CSS and files are > missing and such. Surely cake has a simple variable to reflect these > changes? Any advice? I have already looked at the book and the bakery > and have tried things but they have not worked, such as messing with > the variables in the index.php file. > > I am using version 1.2 > > Thank you for any advice/pointers. > > Regards > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
CakePHP In A Subdirectory?
Hey all, Very simply question but cannot seem to find the answer. I have the directory structure and everything in tact in the normal way. However, on my server I put the entire structure in the /myapp folder in the document root. Now, everything is all mest up and there is no CSS and files are missing and such. Surely cake has a simple variable to reflect these changes? Any advice? I have already looked at the book and the bakery and have tried things but they have not worked, such as messing with the variables in the index.php file. I am using version 1.2 Thank you for any advice/pointers. Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: cakePHP in a subdirectory
On May 28, 6:14 pm, Ralle <[EMAIL PROTECTED]> wrote: > Hmm, okay. Thanks :) I'll take a look at it. > But, i'd expect a normal form to send me to: localhost/cakephp/users/ > register/users/register since the form is places at localhost/cakephp/ > users/register... You don't expect the form action to be used? If you hardcode your form tag there's not much cake can do to make things to to the right place. In 1.1 you'll find what you want in the $html helper I think - you might want to consider jumping straight to 1.2 though - mostly the same, just betterer. hth, AD PS. http://book.cakephp.org/view/326/the-cake-blog-tutorial <- 1.1 101 guide --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakePHP in a subdirectory
Hmm, okay. Thanks :) I'll take a look at it. But, i'd expect a normal form to send me to: localhost/cakephp/users/ register/users/register since the form is places at localhost/cakephp/ users/register... On 28 Maj, 17:42, clemos <[EMAIL PROTECTED]> wrote: > Hi Rasmus > > You need to use the $form->create() method to generate your tag > (details depend on the Cake version you use, but it's all clearly > documented in the api). The generated tag will automatically add the > cake base before and this action to "/cakephp/users/register"... > Otherwise, the form obviously acts as all forms : it posts to > "/users/register", which is the same than > "http://localhost/users/register";. > > + > Clément > > On Wed, May 28, 2008 at 5:36 PM, Ralle <[EMAIL PROTECTED]> wrote: > > > contents of htdocs\cakephp\app\views\users\register.thtml: > > > > > Please fill out the form below to register an account > > Username: > > inputTag('User/username', array('size' => > > '40' )); ?> > > tagErrorMsg('User/username', $username_error); ?> > > Password: > > passwordTag('User/password', array('size' => > > '40' )); ?> > > tagErrorMsg('User/password', 'Password should be > > between 6 and 40 characters long'); ?> > > Email: > > inputTag('User/email', array('size' => '40', > > 'maxlength' =>'255' )); ?> > > tagErrorMsg('User/email', 'Email is invalid'); ?> > > First name: > > inputTag('User/first_name', array('size' => > > '40' )); ?> > > tagErrorMsg('User/first_name', 'First name is > > required'); ?> > > Last name: > > inputTag('User/last_name', array('size' => > > '40' )); ?> > > tagErrorMsg('User/last_name', 'Last name is > > required'); ?> > > submitTag('Register'); ?> > > > > > Cheers, Rasmus > > > On 28 Maj, 12:52, AD7six <[EMAIL PROTECTED]> wrote: > >> On May 28, 11:14 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote: > > >> > On 28 May 2008, at 16:57, Ralle wrote: > > >> > > I have not edited any off the .htaccess files. > > >> > Then you should. > > >> >http://groups.google.com/group/cake-php/search?hl=en&q=rewritebase&sc... > > >> since he can access localhost/cakephp/users/register - that's probably > >> not relevant. > > >> Ralle - show some (view file) code. where is the url form target > >> coming from. > > >> hth, > > >> AD --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakePHP in a subdirectory
Hi Rasmus You need to use the $form->create() method to generate your tag (details depend on the Cake version you use, but it's all clearly documented in the api). The generated tag will automatically add the cake base before and this action to "/cakephp/users/register"... Otherwise, the form obviously acts as all forms : it posts to "/users/register", which is the same than "http://localhost/users/register";. + Clément On Wed, May 28, 2008 at 5:36 PM, Ralle <[EMAIL PROTECTED]> wrote: > > contents of htdocs\cakephp\app\views\users\register.thtml: > > > Please fill out the form below to register an account > Username: > inputTag('User/username', array('size' => > '40' )); ?> > tagErrorMsg('User/username', $username_error); ?> > Password: > passwordTag('User/password', array('size' => > '40' )); ?> > tagErrorMsg('User/password', 'Password should be > between 6 and 40 characters long'); ?> > Email: > inputTag('User/email', array('size' => '40', > 'maxlength' =>'255' )); ?> > tagErrorMsg('User/email', 'Email is invalid'); ?> > First name: > inputTag('User/first_name', array('size' => > '40' )); ?> > tagErrorMsg('User/first_name', 'First name is > required'); ?> > Last name: > inputTag('User/last_name', array('size' => > '40' )); ?> > tagErrorMsg('User/last_name', 'Last name is > required'); ?> > submitTag('Register'); ?> > > > Cheers, Rasmus > > On 28 Maj, 12:52, AD7six <[EMAIL PROTECTED]> wrote: >> On May 28, 11:14 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote: >> >> > On 28 May 2008, at 16:57, Ralle wrote: >> >> > > I have not edited any off the .htaccess files. >> >> > Then you should. >> >> >http://groups.google.com/group/cake-php/search?hl=en&q=rewritebase&sc... >> >> since he can access localhost/cakephp/users/register - that's probably >> not relevant. >> >> Ralle - show some (view file) code. where is the url form target >> coming from. >> >> hth, >> >> AD > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakePHP in a subdirectory
contents of htdocs\cakephp\app\views\users\register.thtml: Please fill out the form below to register an account Username: inputTag('User/username', array('size' => '40' )); ?> tagErrorMsg('User/username', $username_error); ?> Password: passwordTag('User/password', array('size' => '40' )); ?> tagErrorMsg('User/password', 'Password should be between 6 and 40 characters long'); ?> Email: inputTag('User/email', array('size' => '40', 'maxlength' =>'255' )); ?> tagErrorMsg('User/email', 'Email is invalid'); ?> First name: inputTag('User/first_name', array('size' => '40' )); ?> tagErrorMsg('User/first_name', 'First name is required'); ?> Last name: inputTag('User/last_name', array('size' => '40' )); ?> tagErrorMsg('User/last_name', 'Last name is required'); ?> submitTag('Register'); ?> Cheers, Rasmus On 28 Maj, 12:52, AD7six <[EMAIL PROTECTED]> wrote: > On May 28, 11:14 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote: > > > On 28 May 2008, at 16:57, Ralle wrote: > > > > I have not edited any off the .htaccess files. > > > Then you should. > > >http://groups.google.com/group/cake-php/search?hl=en&q=rewritebase&sc... > > since he can access localhost/cakephp/users/register - that's probably > not relevant. > > Ralle - show some (view file) code. where is the url form target > coming from. > > hth, > > AD --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakePHP in a subdirectory
On May 28, 11:14 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote: > On 28 May 2008, at 16:57, Ralle wrote: > > > I have not edited any off the .htaccess files. > > Then you should. > > http://groups.google.com/group/cake-php/search?hl=en&q=rewritebase&sc... since he can access localhost/cakephp/users/register - that's probably not relevant. Ralle - show some (view file) code. where is the url form target coming from. hth, AD --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakePHP in a subdirectory
On 28 May 2008, at 16:57, Ralle wrote: > I have not edited any off the .htaccess files. Then you should. http://groups.google.com/group/cake-php/search?hl=en&q=rewritebase&scoring=d --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
cakePHP in a subdirectory
Indeed it is the good old forum classic. Newb (me) confused and frustrated that i can't figure out how to have cake installed in a subdirectory. This is my dir structure: --xampp htdocs --bromine (non cake stuff) --wiki (non cake stuff) --cakephp app cake docs vendors .htaccess index.php I've followed the IBM tutorial on how to create a wiki, and everything worked fine before i moved into the cakephp subdir. Now when i go to localhost/cakephp/users/register i get the correct register page, but when i click the submit button im sent to localhost/users/register which ofcourse gives me a 404. Ofcourse i could edit the action="users/register" to something like action="cakephp/users/register" but i can't believe this is the way the gents at cakephp intended for us to write robust code ;) I have not edited any off the .htaccess files. Cheers, Rasmus --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Running CakePHP in a SubDirectory BUT Emulating Root (On Shared Hosts - NO httd.conf)
Sorry, my htaccess file is going to: public_html/cake1.2/app1/webroot - account public_html - cake1.2 (has dump of cake files) - app1 - webroot - app2 - webroot - app3 - webroot On Dec 20, 2007 7:26 AM, Baz <[EMAIL PROTECTED]> wrote: > OK, > > This is my desired setup: > > - account > public_html >- cake1.2 (has dump of cake files) > - app1 > - app2 > - app3 > > The web root for my domain is public_html and I cannot change it. So in > public_html the only thing I can do is have a .htaccess file to refrence > app1. > > The setup in the link is what I want, however it appears that this guy CAN > switch his domain root, where as I cannot. > > > > > On Dec 20, 2007 4:38 AM, gmwebs < [EMAIL PROTECTED]> wrote: > > > > > Hey Baz, > > > > Have a look at one of my previous threads - > > http://groups.google.com/group/cake-php/browse_thread/thread/9d3294c250fa5f2b/75bdd50d44924363?lnk=gst&q=installation+in+subdirectory#75bdd50d44924363 > > > > - not sure if that exactly describes your scenario but it might help. > > > > Regards, > > > > Graham > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Running CakePHP in a SubDirectory BUT Emulating Root (On Shared Hosts - NO httd.conf)
OK, This is my desired setup: - account public_html - cake1.2 (has dump of cake files) - app1 - app2 - app3 The web root for my domain is public_html and I cannot change it. So in public_html the only thing I can do is have a .htaccess file to refrence app1. The setup in the link is what I want, however it appears that this guy CAN switch his domain root, where as I cannot. On Dec 20, 2007 4:38 AM, gmwebs <[EMAIL PROTECTED]> wrote: > > Hey Baz, > > Have a look at one of my previous threads - > > http://groups.google.com/group/cake-php/browse_thread/thread/9d3294c250fa5f2b/75bdd50d44924363?lnk=gst&q=installation+in+subdirectory#75bdd50d44924363 > - not sure if that exactly describes your scenario but it might help. > > Regards, > > Graham > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Running CakePHP in a SubDirectory BUT Emulating Root (On Shared Hosts - NO httd.conf)
On Dec 19, 3:49 pm, Baz <[EMAIL PROTECTED]> wrote: > Now, I've found tons of posts talking about this, but I haven't found any > that address my particular problem. > > I will be satisfied with the answer that this cannot be done, at least then > I'll stop looking, but if someone has an idea, I would appreciate some help. > > I like the production setup (http://manual.cakephp.org/chapter/installing) > of CakePHP, where I run from ONE CakePHP source with multiple apps. > > This is my desired structure (all under Root for the site on a shared host > ... www|public_html or whatever) > /cake1.2/app1/webroot/ > /cake1.2/app2/webroot/ Can you clarify what the above folder structure is supposed to look like? if your whole app folder is under the public_html, how is that a production setup? cheers, AD PS. I´ve gone over in detail production setups on a shared host a couple of times on my blog, including how to install multiple applications without duplicating the cake folder. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Running CakePHP in a SubDirectory BUT Emulating Root (On Shared Hosts - NO httd.conf)
Hey Baz, Have a look at one of my previous threads - http://groups.google.com/group/cake-php/browse_thread/thread/9d3294c250fa5f2b/75bdd50d44924363?lnk=gst&q=installation+in+subdirectory#75bdd50d44924363 - not sure if that exactly describes your scenario but it might help. Regards, Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Running CakePHP in a SubDirectory BUT Emulating Root (On Shared Hosts - NO httd.conf)
Now, I've found tons of posts talking about this, but I haven't found any that address my particular problem. I will be satisfied with the answer that this cannot be done, at least then I'll stop looking, but if someone has an idea, I would appreciate some help. I like the production setup (http://manual.cakephp.org/chapter/installing) of CakePHP, where I run from ONE CakePHP source with multiple apps. This is my desired structure (all under Root for the site on a shared host ... www|public_html or whatever) /cake1.2/app1/webroot/ /cake1.2/app2/webroot/ Locally and on different hosts I can pull this off by pointing my domain straight to /cake1.2/app1/webroot/. However, HostMonster doesn't allow you to point the main hosted domain to a directory other than the root. So what I'm doing is basically duplicating the .htaccess file in the cake installation so I have something like this: RewriteEngine on RewriteRule ^$ cake1.2/app1/webroot/ [L] RewriteRule (.*) cake1.2/app1/webroot/$1 [L] The problem is all my links (HTML helper, etc) end up in the form site.com/cake1.2/app1/link/ I've read many solutions, but they all involve symlinks,Virtual Directories/Rerouting DocumentRoot in httd.conf, Apache Aliases, etc. All I have is a .htaccess file. Is there anyway to fudge this, by messing with the Rewrites or the various defines in cake1.2/app1/webroot/index.php? ThanX in advance guys. -- Baz L Web Development 2.0 http://WebDevelopment2.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---