Re: DebugKit in 2.0
There is a 2.0 branch: https://github.com/cakephp/debug_kit/tree/2.0 also need to enable: routes.php CakePlugin::routes(); bootstrap.php CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit check : http://book.cakephp.org/2.0/en/plugins.html Andras Kende http://www.kende.com On Oct 30, 2011, at 12:16 AM, Jeremy Burns wrote: > Anyone got any tips for getting DebugKit working in 2.0? I've run the > upgrade script over it and am loading it in bootstrap. > > -- > 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 -- 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: DebugKit in 2.0
I was able to get DebugKit working by cd to Plugins git clone https://github.com/cakephp/debug_kit.git DebugKit After I had a copy I cd into the DebugKit folder then I switched to the 2.0 via git checkout 2.0 Updating bootstrap.php to load the plugin (new CakePHP 2.0 requirement): CakePlugin::load('DebugKit'); Modified the View/Layouts/default.ctp by commenting out the following line element('sql_dump'); ?> I've got DebugKit working but I'm struggling with DebugKit.FireCake I'm sure it something to do with the changes to App::Import vs App::uses and the App::build paths. Morgan On Oct 29, 11:16 pm, Jeremy Burns wrote: > Anyone got any tips for getting DebugKit working in 2.0? I've run the > upgrade script over it and am loading it in bootstrap. -- 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
DebugKit in 2.0
Anyone got any tips for getting DebugKit working in 2.0? I've run the upgrade script over it and am loading it in bootstrap. -- 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: missing ) after argument list error - how does that make sense?
On Oct 29, 2011, at 10:56, Tomfox Wiranata wrote: > echo ' style="float:right;cursor:pointer;">'.$html->image("icons/map.png", > array("alt" => "Google Map anzeigen")).''; [snip] > now when I hit > the icon to open the map, firebug says this: > - > > missing ) after argument list > showGoogleMap(207,47.378824,8.548737,Tag Heuer Carrera Chronograph) As you see from the error message (or by viewing source on the page), your PHP code generated the following HTML code: ... What got generated inside the onclick attribute is not valid JavaScript code, because the title string is not quoted or escaped properly. You probably want to use JsHelper::value($all['title']) instead of just echoing $all['title'] directly. -- 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: Problem with redirect: CakePHP 2.0
On Oct 28, 2011, at 14:25, Mike wrote: > This one is confusing me... I have installed Cake with no problems in > the past Here it is... > > My URL is https://mydomain/forms/ > > When I type this in (using the real domain of course) I reach the > properly configured installation index page. All good. > > Here is the issue. Whenever I request a page from here out, I > must add index.php to the url. An example that properly lists the > records is this: > > https://mydomain/forms/index.php/ifolders/ > > If I omit the index.php (https://mydomain/forms/ifolders/) I get the > infamous "Object not Found!" error. Typical redirect problem? Well.. > I can't figure it out. It sure does sound like the typical behavior when mod_rewrite isn't installed or is not configured correctly. > Here are my configuration files: > > (the include http.conf file): > -- > Include /etc/apache2/conf.d/php5.conf > > DocumentRoot /srv/www/ifolder-forms/app/webroot > > RewriteLog /var/log/apache2/rewrite_forms_log > RewriteLogLevel 5 > > Alias /forms "/srv/www/ifolder-forms/app/webroot" > > AllowOverride All > Options FollowSymLinks Indexes MultiViews > Order allow,deny > Allow from all > DirectoryIndex index.html index.php > > > # comment out the following lines to remove the SSL requirement > LoadModule rewrite_module /usr/lib64/apache2/mod_rewrite.so > RewriteEngine On > RewriteCond %{HTTPS} !=on > RewriteRule ^/forms/(.*) https://%{SERVER_NAME}/forms/$1 [R,L] > -- > > > The .htaccess file in app/webroot > -- > >RewriteEngine On >RewriteBase "/srv/www/ifolder-forms/app/webroot/" >RewriteCond %{REQUEST_FILENAME} !-d >RewriteCond %{REQUEST_FILENAME} !-f >RewriteRule ^(.*)$ index.php/$1 [QSA,L] > > -- This doesn't look like what's in CakePHP's repository: https://github.com/cakephp/cakephp/blob/master/app/webroot/.htaccess Specifically: RewriteRule ^(.*)$ index.php?/$1 [QSA,L] Note the "?" Finally, I'd forget .htaccess files completely; just move that code into your http.conf and turn off .htaccess processing; it'll speed up your server slightly. -- 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
The new 2.0 Exceptions
One needs to get used to them, I guess. My current problem is that exceptions jump out of the current method if triggered. So in test cases for example not all tests get executed. This can be a good thing. But sometimes it would be better if it behaved like errors in 1.3 lets say we are testing an Inflector method. And we use a testInflector() method and 10-20 asserts. If the first one fails, all others won't even be triggered. What if all would pass except the first one? It would help to see them all at once. Or the other way around. The first one fails - and it displays: 1 fail. (it used to display all fails - like 14 fails). Now we could make the false assumption that 13 of 14 pass... At the beginning I didnt even notice that most of the asserts of some test cases are not checked due to a single fail. Yes, I could make an own method for each and every assert. But I was kinda hoping that they can be adjusted to not jump out of the current method... at least for test cases this would help :) -- 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: How to Paginate Search Results?
You can do it either with PRG (post redirect get) concept: http://bakery.cakephp.org/articles/luciansabo/2011/08/12/post_redirect_get_design_pattern_component http://cakedc.com/downloads/view/cakephp_search_plugin or with write the posted form data to a session once and keep reading it through pagination something like: if(!empty($this->data['User']['search_name'])) { $this->Session->write('conditions.firstname', $thisis->data['User']['search_name']); } if($this->Session->check('conditions')) { $conditions = $this->Session->read('conditions'); } else { $conditions = null } $this->paginate = array( 'recursive' => -1, 'conditions' => $conditions, Andras Kende http://www.kende.com On Oct 29, 2011, at 1:27 PM, andrewperk wrote: > Hello, > > I've implemented a user model and I have a simple search form for > searching by gender, age, location. I'm using the paginator to > paginate the results. The problem is that it's only remembering the > search criteria on the first page. When I click on page 2, or next > etc.. It defaults back to searching all users. > > Here's my dirty search code in my controller, basically it just checks > the submitted form fields and does a query on the matching field in > the Users table and then paginates the results: > > if (!empty($this->data)) { >// by name >if (!empty($this->data['User']['search_name'])) { > $this->paginate = array('conditions' => array('visible'=>1, > 'OR'=>array( > 'User.username LIKE' => > '%'.$this->data['User']['search_name'].'%', > 'User.firstname LIKE' => '%'.$this->data['User']['search_name'], > 'User.lastname LIKE' => '%'.$this->data['User']['search_name']) >), 'limit'=>'10', 'order'=>'User.username'); > } > // by gender > else if (!empty($this->data['User']['search_gender'])) { > $this->paginate = array('conditions' => array( > 'visible'=>1, > 'User.gender' => $this->data['User']['search_gender'] > ), 'limit'=>'10', 'order'=>'User.username'); > } > // by state > else if (!empty($this->data['User']['search_state'])) { > $this->paginate = array('conditions' => array( > 'visible'=>1, > 'User.state' => $this->data['User']['search_state'] > ), 'limit'=>'10', 'order'=>'User.username'); > } > > // Send the results for the above criteria to the view > $results = $this->paginate('User'); > $this->set('users', $results); > > } > // Default retrieval of all users >else { > $this->paginate = array('conditions'=>array('visible'=>1), > 'limit'=>'10', 'order'=>'User.username'); > $this->set('users', $this->paginate('User')); > } > > I'm trying to figure out how to make subsequent pages of the > pagination remember my search criteria. Thanks for any help. > > -- > 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 -- 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: How to Paginate Search Results?
I am also interested in this answer. I just started learning cakephp, and 2.0 is what I'm starting on. If there is an example app I can download with a database and browse it's code, I would be appreciative of that as well. I had the same complication as andrew, and I did it another way, and it was creating two queries, one with the search filter and one without it. On Sat, Oct 29, 2011 at 1:27 PM, andrewperk wrote: > Hello, > > I've implemented a user model and I have a simple search form for > searching by gender, age, location. I'm using the paginator to > paginate the results. The problem is that it's only remembering the > search criteria on the first page. When I click on page 2, or next > etc.. It defaults back to searching all users. > > Here's my dirty search code in my controller, basically it just checks > the submitted form fields and does a query on the matching field in > the Users table and then paginates the results: > > if (!empty($this->data)) { >// by name >if (!empty($this->data['User']['search_name'])) { >$this->paginate = array('conditions' => array('visible'=>1, > 'OR'=>array( >'User.username LIKE' => > '%'.$this->data['User']['search_name'].'%', >'User.firstname LIKE' => > '%'.$this->data['User']['search_name'], >'User.lastname LIKE' => > '%'.$this->data['User']['search_name']) > ), 'limit'=>'10', 'order'=>'User.username'); > } > // by gender > else if (!empty($this->data['User']['search_gender'])) { >$this->paginate = array('conditions' => array( >'visible'=>1, >'User.gender' => $this->data['User']['search_gender'] >), 'limit'=>'10', 'order'=>'User.username'); > } > // by state > else if (!empty($this->data['User']['search_state'])) { >$this->paginate = array('conditions' => array( >'visible'=>1, >'User.state' => $this->data['User']['search_state'] >), 'limit'=>'10', 'order'=>'User.username'); > } > > // Send the results for the above criteria to the view > $results = $this->paginate('User'); > $this->set('users', $results); > > } > // Default retrieval of all users >else { >$this->paginate = array('conditions'=>array('visible'=>1), > 'limit'=>'10', 'order'=>'User.username'); >$this->set('users', $this->paginate('User')); >} > > I'm trying to figure out how to make subsequent pages of the > pagination remember my search criteria. Thanks for any help. > > -- > 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 > -- 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 Paginate Search Results?
Hello, I've implemented a user model and I have a simple search form for searching by gender, age, location. I'm using the paginator to paginate the results. The problem is that it's only remembering the search criteria on the first page. When I click on page 2, or next etc.. It defaults back to searching all users. Here's my dirty search code in my controller, basically it just checks the submitted form fields and does a query on the matching field in the Users table and then paginates the results: if (!empty($this->data)) { // by name if (!empty($this->data['User']['search_name'])) { $this->paginate = array('conditions' => array('visible'=>1, 'OR'=>array( 'User.username LIKE' => '%'.$this->data['User']['search_name'].'%', 'User.firstname LIKE' => '%'.$this->data['User']['search_name'], 'User.lastname LIKE' => '%'.$this->data['User']['search_name']) ), 'limit'=>'10', 'order'=>'User.username'); } // by gender else if (!empty($this->data['User']['search_gender'])) { $this->paginate = array('conditions' => array( 'visible'=>1, 'User.gender' => $this->data['User']['search_gender'] ), 'limit'=>'10', 'order'=>'User.username'); } // by state else if (!empty($this->data['User']['search_state'])) { $this->paginate = array('conditions' => array( 'visible'=>1, 'User.state' => $this->data['User']['search_state'] ), 'limit'=>'10', 'order'=>'User.username'); } // Send the results for the above criteria to the view $results = $this->paginate('User'); $this->set('users', $results); } // Default retrieval of all users else { $this->paginate = array('conditions'=>array('visible'=>1), 'limit'=>'10', 'order'=>'User.username'); $this->set('users', $this->paginate('User')); } I'm trying to figure out how to make subsequent pages of the pagination remember my search criteria. Thanks for any help. -- 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: find with fields and conditions
> 'Company.Departement_dactivite_limitrophes' do you really have your table fields starting with a capital letter? Not sure if this is the problem, would also try restricting what associations are being used by using containable or recursive = -1 HTH, Paul On Oct 29, 1:38 am, Ricardo wrote: > Hello All, > > I'm getting a weird error here, see I have the following find > statement > > $cond1 = $this->Company->find('all', > 'conditions' => > array('Company.Departement_dactivite_limitrophes' => $department), > 'fields' => $fields > ) > ); > > $fields is an array with the field names, and $department comes from > user info > > when it runs I get the following error: > > Warning (512): SQL Error: 1054: Field 'Company' unknown in WHERE > clause [CORE / cake / libs / model / datasources / dbo_source.php, > line 684] > > and the related generated query is: > > Query: SELECT COUNT(*) AS `count` FROM `companies` AS `Company` > WHERE Company IN ([loads of fields]) AND Company IN ([loads of correct > values]) AND Company IN... and so on for the rest of the search > resutls > > Query: SELECT `Company`.`id`, `Company`.`nom_raison_sociale`, > `Company`.`label`, `Company`.`type_de_prestataire`, > `Company`.`code_postale`, `Company`.`email` FROM `companies` AS > `Company` WHERE Company IN ([loads of values]) AND Company IN ... > and so on for the rest of the search resutls > > according to the stack trace, this error comes from the paginate > function, where I send data like this: > > $data_table = $this->paginate($cond1); -- 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
Please give me some suggestions on this
Hi all.. I am looking to implement a wysiwyg editor with a media library plugin of some kind.. Have been looking at Tinymce and elfinder for library, but I am not sure if I should go this way, or if there are any other solutions that meets my requirements. Requirements: - Simple wysiwyg (only simple regular text buttons bold, italic, left align and so on) - possible to tie in a media/file plugin button for images and other files - access to whole media library trough GUI I am currently using markitup, and for me, it is perfect, but for other admins/moderators that do not know any html, it is not good. Do any of you have experince with a similar setup for cake application? Please share your knowledge on how to proceed.. Thanks all! -Tom -- 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
missing ) after argument list error - how does that make sense?
Hi everyone, I am using JQuery to pass parameters from my view to the controller. It works fine, until I add the parameter "title". in my view, a php function passes the values that I retrieve from the database: - echo ''.$html->image("icons/map.png", array("alt" => "Google Map anzeigen")).''; the jquery function showGoogleMap() passes those values to my controller: - function showGoogleMap(input, input_latitude, input_longitude, title) { $("#map_popup").load('/test/users/map', {'latitude': input_latitude, 'longitude': input_longitude, 'title': title}, function() } that jquery function loads "ajax like" a google map. now when I hit the icon to open the map, firebug says this: - missing ) after argument list showGoogleMap(207,47.378824,8.548737,Tag Heuer Carrera Chronograph) the passed values have these types: id is bigint longitude and latitude are character varying title is character varying is it because of the blanks in "Tag Heuer Carrera Chronograph"?? is that causing the error? thanks a lot :) -- 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: Cache FileEngine
Hi. You're right, windows supports flock i read quickly flock description, and I mixed up with the non blocant parameters. Then it should be OK on windows. On 29 oct, 00:34, 0x20h wrote: > Hi Sebastien, > > please readhttp://book.cakephp.org/2.0/en/contributing/code.html > to find out how you can contribute patches. > > Am 28.10.2011 15:30, schrieb Sandreu:> Hello, > > > I made an increment for file engine system. > > My problem was that in APC cache, the cache is not shared between CLI > > and the web app... then I did that with fileEngine using flock... it's > > not workink on windows. > > why would it not work on windows? I didn't find such a hint on the > flock() docs. -- 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: 2.0 Cookbook's Simple Acl controlled app not working
The cookbook has been updated to include the actionPath in the Auth initialization. All works well now. On Oct 28, 9:10 am, fly2279 wrote: > I'm having trouble with the cookbook's acl app. I followed the > tutorial EXACTLY and after assigning permissions, I can't access any > of the acl protected (not explicitly allowed in beforeFilter) actions > when logged in with a user that belongs to group 1 in the initDB > method. > > Is there a piece missing from the cookbook to make it work? I have the > following code below in my AppController: > > [code] > > public $components = array( > > 'Acl', > > 'Auth' => array('authorize' => array('Actions')), > > 'Session' > > ); > > public $helpers = array('Html', 'Form', 'Session'); > > function beforeFilter() { > > //Configure AuthComponent > > $this->Auth->loginAction = array('controller' => 'users', 'action' => > 'login'); > > $this->Auth->logoutRedirect = array('controller' => 'users', 'action' > => 'login'); > > $this->Auth->loginRedirect = array('controller' => 'posts', 'action' > => 'add'); > > $this->Auth->allow('display'); > > > > > > > > }[/code] -- 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: Problem with unbindModel
killer advice! way better than unbind.thanks euromark :) On 28 Okt., 00:49, euromark wrote: > you can use the containable behavior > its the fastest and cleanest approach > > On 27 Okt., 22:47, Tomfox Wiranata wrote: > > > > > > > > > Hi, > > > I have two models: user and book. in my user model i defined this > > object: > > > 'HistoryAll' => > > array( > > 'className' => 'Book', > > 'joinTable' => 'books_users', > > 'foreignKey' => 'fk_user_id', > > 'associationForeignKey' => 'fk_book_id', > > 'fields' => > > array('fk_user_id','id','title','description'), > > 'conditions' => array ('locked = false'), > > 'order' => 'BooksUser.created desc', > > 'limit' => '', > > 'unique' => false > > > as you can see there is a join with my books model, where i have > > defined those objects (among others) > > > var $hasMany = array( > > 'BookContact' => array( > > 'className' => 'BookAdditionalInformation', > > 'foreignKey' => 'fk_book_id', > > 'conditions' => array('is_contact' => true), > > 'order' => array('type'), > > 'dependent' => 'true' > > ), > > > now in my view i have dozens of objects i retrieve from the database > > and I dont need many of those. this is how the debug looks like > > > app\views\users\history.ctp (line 70) > > Array > > ( > > [fk_user_id] => 76 > > [id] => 208 > > [title] => book 1 > > [description] => test > > [created] => 2011-10-11 23:19:40 > > [hash] => d95e7a24d1b20598eb96aecadcf215e5ca7 > > [BooksUser] => Array > > ( > > [fk_user_id] => 74 > > [fk_book_id] => 208 > > [created] => 2011-11-09 23:56:44 > > [id] => 667 > > [visible] => 0 > > ) > > > [User] => Array > > ( > > [username] => bookworm > > [firstname] => Martin > > [id] => 763 > > ) > > > [BookContact] => Array > > ( > > [0] => Array > > ( > > [fk_book_id] => 208 > > [title] => booker is book > > [value] => i...@kyle.de > > [type] => email > > [id] => 1907 > > [is_contact] => 1 > > ) > > > [1] => Array > > ( > > More data > > ) > > > [2] => Array > > ( > > Even more… > > ) > > > [3] => Array > > > so how do i unbind BookContact?? > > > I tried: $this->User->Book->unbindModel('hasMany' => > > array('BookContact')); > > I got: undefined object User::Book > > > I tried: $this->User->unbindModel('hasMany' => > > array('BookContact')); > > I got still BookContact as binded > > > fyi: my php code > > = > > > $this->User->recursive = 2; > > > $User = $this->User->findById($id); > > $this->set('user', $User); > > > in my view: > > foreach($user['HistoryAll'] as $all): > > > I appreciate your effort and help...thanks...a bunch :) -- 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
Using javascript
Hi all, I want to call a javascript alert box the moment A user clicks on CANCEL SESSION link.where should i put the javascript alert box in view and what how to code that javascript function inside view?? -- Regards Arti Grover -- 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
Problem with redirect: CakePHP 2.0
This one is confusing me... I have installed Cake with no problems in the past Here it is... My URL is https://mydomain/forms/ When I type this in (using the real domain of course) I reach the properly configured installation index page. All good. Here is the issue. Whenever I request a page from here out, I must add index.php to the url. An example that properly lists the records is this: https://mydomain/forms/index.php/ifolders/ If I omit the index.php (https://mydomain/forms/ifolders/) I get the infamous "Object not Found!" error. Typical redirect problem? Well.. I can't figure it out. I am using OpenSuse 11.4 with an Apache2 server. Mod_redirect is loaded because I see the redirection records in the log file. Oh yes.. I turned on redirect logging. Here are my configuration files: (the include http.conf file): -- Include /etc/apache2/conf.d/php5.conf DocumentRoot /srv/www/ifolder-forms/app/webroot RewriteLog /var/log/apache2/rewrite_forms_log RewriteLogLevel 5 Alias /forms "/srv/www/ifolder-forms/app/webroot" AllowOverride All Options FollowSymLinks Indexes MultiViews Order allow,deny Allow from all DirectoryIndex index.html index.php # comment out the following lines to remove the SSL requirement LoadModule rewrite_module /usr/lib64/apache2/mod_rewrite.so RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/forms/(.*) https://%{SERVER_NAME}/forms/$1 [R,L] -- The .htaccess file in app/webroot -- RewriteEngine On RewriteBase "/srv/www/ifolder-forms/app/webroot/" RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,L] -- The .htaccess in app (this one shouldn't matter since the DocumentRoot was pointed to webroot) -- RewriteEngine on RewriteBase "/srv/www/ifolder-forms" RewriteRule^$webroot/[L] RewriteRule(.*) webroot/$1[L] -- And finally, here is a sample from the redirect log (i scrubbed out the domain reference and replaced it with mydomain): -- 10.25.1.154 - - [28/Oct/2011:15:13:14 --0400] [mydomain/ sid#7f49762ef090][rid#7f497653e420/initial] (3) [perdir /srv/www/ ifolder-forms/app/webroot/] add path info postfix: /srv/www/ifolder- forms/app/webroot/index.php -> /srv/www/ifolder-forms/app/webroot/ index.php/ifolders/ 10.25.1.154 - - [28/Oct/2011:15:13:14 --0400] [mydomain/ sid#7f49762ef090][rid#7f497653e420/initial] (3) [perdir /srv/www/ ifolder-forms/app/webroot/] strip per-dir prefix: /srv/www/ifolder- forms/app/webroot/index.php/ifolders/ -> index.php/ifolders/ 10.25.1.154 - - [28/Oct/2011:15:13:14 --0400] [mydomain/ sid#7f49762ef090][rid#7f497653e420/initial] (3) [perdir /srv/www/ ifolder-forms/app/webroot/] applying pattern '^(.*)$' to uri 'index.php/ifolders/' 10.25.1.154 - - [28/Oct/2011:15:13:14 --0400] [mydomain/ sid#7f49762ef090][rid#7f497653e420/initial] (4) [perdir /srv/www/ ifolder-forms/app/webroot/] RewriteCond: input='/srv/www/ifolder-forms/ app/webroot/index.php' pattern='!-d' => matched 10.25.1.154 - - [28/Oct/2011:15:13:14 --0400] [mydomain/ sid#7f49762ef090][rid#7f497653e420/initial] (4) [perdir /srv/www/ ifolder-forms/app/webroot/] RewriteCond: input='/srv/www/ifolder-forms/ app/webroot/index.php' pattern='!-f' => not-matched 10.25.1.154 - - [28/Oct/2011:15:13:14 --0400] [mydomain/ sid#7f49762ef090][rid#7f497653e420/initial] (1) [perdir /srv/www/ ifolder-forms/app/webroot/] pass through /srv/www/ifolder-forms/app/ webroot/index.php 10.25.1.154 - - [28/Oct/2011:15:13:16 --0400] [mydomain/ sid#7f49762ef090][rid#7f4976540430/initial] (3) [perdir /srv/www/ ifolder-forms/app/webroot/] add path info postfix: /srv/www/ifolder- forms/app/webroot/ifolders -> /srv/www/ifolder-forms/app/webroot/ ifolders/add 10.25.1.154 - - [28/Oct/2011:15:13:16 --0400] [mydomain/ sid#7f49762ef090][rid#7f4976540430/initial] (3) [perdir /srv/www/ ifolder-forms/app/webroot/] strip per-dir prefix: /srv/www/ifolder- forms/app/webroot/ifolders/add -> ifolders/add 10.25.1.154 - - [28/Oct/2011:15:13:16 --0400] [mydomain/ sid#7f49762ef090][rid#7f4976540430/initial] (3) [perdir /srv/www/ ifolder-forms/app/webroot/] applying pattern '^(.*)$' to uri 'ifolders/ add' 10.25.1.154 - - [28/Oct/2011:15:13:16 --0400] [mydomain/ sid#7f49762ef090][rid#7f4976540430/initial] (4) [perdir /srv/www/ ifolder-forms/app/webroot/] RewriteCond: input='/srv/www/ifolder-forms/ app/webroot/ifolders' pattern='!-d' => matched 10.25.1.154 - - [28/Oct/2011:15:1