Re: MeioUpload Problem
I'm not going to touch on form-label, that isn't a part of my question. I have looked at the code and can't figure out what is breaking, hence why I am asking here if anyone knows. The behaviour works for the first item (banners) just fine, uploads and thumbnails them perfectly. Same with other pages that I have only one file being uploaded, it works great. The problem is with the second file being uploaded, it uploads perfectly fine, it just doesn't get thumbnailed. On Apr 25, 3:38 pm, Aivaras faifas1...@gmail.com wrote: Why in this world you're using $form-label()? CakePHP isn't that complicated :o Did you actually check for any errors in the behaviour itself? Try to debug parts of the code: start with small ones then go bigger and see where it breaks. Then you will definitely find an answer :) Cheers, Faifas On Sat, Apr 25, 2009 at 01:18, Arak Tai'Roth nielsen.dus...@gmail.comwrote: Anyone at all? I could really use some help on this. On Apr 21, 1:02 pm, Arak Tai'Roth nielsen.dus...@gmail.com wrote: Anyone have any ideas on this topic? On Apr 20, 5:16 pm, Arak Tai'Roth nielsen.dus...@gmail.com wrote: Yup, the exact same permissions as the banners directory On Apr 20, 4:09 pm, brian bally.z...@gmail.com wrote: Are the permissions for the posters dir good? On Mon, Apr 20, 2009 at 4:56 PM, Arak Tai'Roth nielsen.dus...@gmail.com wrote: So I have my MeioUpload set up: var $actsAs = array( 'MeioUpload' = array( 'banner' = array( 'dir' = 'img/events/banners', 'create_directory' = false, 'allowed_mime' = array('image/jpeg', 'image/pjpeg', 'image/ png'), 'allowed_ext' = array('.jpeg', '.jpg', '.png'), 'thumbsizes' = array( 'large' = array('width' = 950, 'height' = 170) ) ), 'poster' = array( 'dir' = 'img/events/posters', 'create_directory' = false, 'allowed_mime' = array('image/jpeg', 'image/pjpeg', 'image/ png'), 'alowed_ext' = array('.jpeg', '.jpg', '.png'), 'thumbsizes' = array( 'large' = array('width' = 300, 'height' = 465) ) ) ), 'Sluggable' = array( 'label' = 'name', 'overwrite' = true ) ); and it works great. However there is one problem, the poster picture uploads, but no thumbnail is generated. I can't figure out for the life of my why no thumbnail is generated. My code for the add and edit views are: echo $form-label('Event.banner', 'Banner:'); echo $form-input('Event.banner', array('label' = false, 'type' = 'file')); echo $form-label('Event.poster', 'Poster:'); echo $form-input('Event.poster', array('label' = false, 'type' = 'file')); So still the same code between them, just different variable names, yet it doesn't work. Does anyone have a clue why the banner image would be uploaded and thumbnailed appropriately, but the poster image wouldn't be? --~--~-~--~~~---~--~~ 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: User Id Question
?=$session-read('Auth.User.id');? On Sat, 2009-04-25 at 15:57 -0700, Teedaddy wrote: Could someone be so kind to tell me the easiest way to pass the current logged in Auth user id in $htmlhelper links? Thank you so much, just learning all this MVC method and have been through Auth tutorials numerous times but I am missing this somehow. Bret --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
/app/plugins/content/vendors/js/tiny_mce doesn't work properly
When I create a link to tiny_mce.js the javascript file is found, no problems there. But when I initialize tinyMCE I get some javascript-errors in firebug (mostly tinymce not defined) and the page won't load properly. When I look at it in IE the page does load, without js-errors, but the css- files of tinymce won't load. Could anybody help me with this please? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Warning (512): Cache not configured properly.
Hello, I did an Advanced Installation on Cpanel, and I get these errors: http://bocabrava.com/ My install: /app is in home/bocabrav /cake is in /var/lib and my /webroot is home/bocabrav/public_html if (!defined('ROOT')) { define('ROOT', DS.'home'.DS.'bocabrav'); } if (!defined('APP_DIR')) { define('APP_DIR', 'app'); } if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH', DS.'var'.DS.'lib'); } Thank you, Mythos --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Warning (512): Cache not configured properly.
Hello, I did an Advanced Installation on Cpanel, and I get these errors: http://bocabrava.com/ My install: /app is in home/bocabrav /cake is in /var/lib and my /webroot is home/bocabrav/public_html if (!defined('ROOT')) { define('ROOT', DS.'home'.DS.'bocabrav'); } if (!defined('APP_DIR')) { define('APP_DIR', 'app'); } if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH', DS.'var'.DS.'lib'); } Thank you, Mythos --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Gziping in cakePHP
Hi All, I have completed my first site using cakePHP and now i am uploading it to the production server. Can any body tell me how to achive gzipping in cakePHP? ob_start(ob_gzhandler); is not working. I have googled and came to know that Debug mode 0 will not work with this. Can anybody tell me any other way of achiving this? Thanks Regards Sridhar K N --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Problem with dispatcher after upgrade to 1.2.2.8120 Stable
I've upgraded two cake apps from 1.2 beta to 1.2.2.8120 Stable, one works just fine but the other app gives me: Notice (8): Undefined property: UsersController::$Component [CORE\cake \dispatcher.php, line 208] Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 208 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 194 [main] - APP\webroot\index.php, line 88 I've followed the recommended upgrade path and started with a clean cake app and then added models/controllers/views in a controlled way one at a time and modified the config files carefully. Done it a couple of times but can't spot exactly where the problem is introduced. Could it be a change in the way components (used as extensions for controllers) is initialized in the code or about the routing of the urls? --~--~-~--~~~---~--~~ 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: MeioUpload Problem
Wait a sec. You have both banner and poster fields, so you have to specify the fields for both mimetype and filesize. You need one for each upload. From the MeioUpload page: var $actsAs = array( 'picture' = array( 'fields' = array( 'filesize' = 'picture_filesize', 'mimetype' = '{field}_mimetype', 'dir' = 'pictures_folder' ) ) ); So, it appears that your $actsAs should, at minimum, look like: var $actsAs = array( 'MeioUpload' = array( 'banner' = array( 'dir' = 'img/events/banners', 'create_directory' = false, 'allowed_mime' = array( 'image/jpeg', 'image/pjpeg', 'image/png' ), 'allowed_ext' = array( '.jpeg', '.jpg', '.png' ), 'thumbsizes' = array( 'large' = array( 'width' = 950, 'height' = 170 ) ), 'fields' = array( 'filesize' = '{field}_filesize', 'mimetype' = '{field}_mimetype' ) ), 'poster' = array( 'dir' = 'img/events/posters', 'create_directory' = false, 'allowed_mime' = array( 'image/jpeg', 'image/pjpeg', 'image/png' ), 'alowed_ext' = array( '.jpeg', '.jpg', '.png' ), 'thumbsizes' = array( 'large' = array( 'width' = 300, 'height' = 465 ) ), 'fields' = array( 'filesize' = '{field}_filesize', 'mimetype' = '{field}_mimetype' ) ) ), 'Sluggable' = array( 'label' = 'name', 'overwrite' = true ) ); Although, because the {field} placeholder is used, you might be able to place the 'fields' array at the same level as 'banner' 'poster' (ie. don't repeat it). On Sun, Apr 26, 2009 at 4:05 AM, Arak Tai'Roth nielsen.dus...@gmail.com wrote: I'm not going to touch on form-label, that isn't a part of my question. I have looked at the code and can't figure out what is breaking, hence why I am asking here if anyone knows. The behaviour works for the first item (banners) just fine, uploads and thumbnails them perfectly. Same with other pages that I have only one file being uploaded, it works great. The problem is with the second file being uploaded, it uploads perfectly fine, it just doesn't get thumbnailed. On Apr 25, 3:38 pm, Aivaras faifas1...@gmail.com wrote: Why in this world you're using $form-label()? CakePHP isn't that complicated :o Did you actually check for any errors in the behaviour itself? Try to debug parts of the code: start with small ones then go bigger and see where it breaks. Then you will definitely find an answer :) Cheers, Faifas On Sat, Apr 25, 2009 at 01:18, Arak Tai'Roth nielsen.dus...@gmail.comwrote: Anyone at all? I could really use some help on this. On Apr 21, 1:02 pm, Arak Tai'Roth nielsen.dus...@gmail.com wrote: Anyone have any ideas on this topic? On Apr 20, 5:16 pm, Arak Tai'Roth nielsen.dus...@gmail.com wrote: Yup, the exact same permissions as the banners directory On Apr 20, 4:09 pm, brian bally.z...@gmail.com wrote: Are the permissions for the posters dir good? On Mon, Apr 20, 2009 at 4:56 PM, Arak Tai'Roth nielsen.dus...@gmail.com wrote: So I have my MeioUpload set up: var $actsAs = array( 'MeioUpload' = array( 'banner' = array( 'dir' = 'img/events/banners', 'create_directory' = false, 'allowed_mime' = array('image/jpeg', 'image/pjpeg', 'image/ png'), 'allowed_ext' = array('.jpeg', '.jpg', '.png'), 'thumbsizes' = array( 'large' = array('width' = 950, 'height' = 170)
Re: Fatal error: Call to undefined method stdClass::find() in cake\libs\controller\controller.php on line 1063
Are you using PHP4.x? I suspect that you don't have $name = 'Magazine' in your model. On Sat, Apr 25, 2009 at 1:58 PM, Minkbear minkb...@gmail.com wrote: I moved to CakePHP 1.2.2.8120 and tried to call url, http://MySite/admin/magazines/index, got this error: Notice (8): Undefined property: stdClass::$alias [CORE\cake\libs \controller\controller.php, line 977] Code | Context $object = stdClass stdClass::$recursive = 0 $scope = array() $whitelist = array() $assoc = null $options = array( pass = array(), named = array(), controller = magazines, action = admin_index, plugin = null, prefix = admin, admin = true, form = array(), url = admin/magazines/index ) $options = array_merge($this-params, $this-params['url'], $this-passedArgs); if (isset($this-paginate[$object-alias])) { Controller::paginate() - CORE\cake\libs\controller\controller.php, line 977 MagazinesController::admin_index() - APP\controllers \magazines_controller.php, line 27 Object::dispatchMethod() - CORE\cake\libs\object.php, line 115 Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 227 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 194 [main] - APP\webroot\index.php, line 88 Fatal error: Call to undefined method stdClass::find() in C:\Program Files\xampp\htdocs\cakefinal\cake\libs\controller\controller.php on line 1063 Code in magazines_controller.php is: var $name = 'Magazines'; var $uses = array('Column', 'MagazineColumn'); function admin_index() { $this-Magazine-recursive = 0; $this-set('magazines', $this-paginate()); } need help. thank you in advance. minkbear --~--~-~--~~~---~--~~ 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: modifying a Baked function
Keep in mind that baking creates *very* generic views. They often will require tweaking. You can simply replace the select list with a hidden field: echo $form-hidden('SomeModel.user_id', array('value' = $session-read('Auth.User.id')); Or, instead of grabbing it from the session in the view, you could do this in your action: $this-set('user_id', $this-Session-read('Auth.User.id')); echo $form-hidden('SomeModel.user_id', array('value' = $user_id)); On Sat, Apr 25, 2009 at 7:06 PM, Teedaddy bretteegar...@gmail.com wrote: Thanks for the response. The main thing I am trying to do is make sure my index.ctp, view.ctp, and add.ctp pages only return and show the data for the current logged in user.id. For instance, it is easy enough to work with related data to a specific user after they are selected from the user view but if I want to add new records to a related table, the Baked forms for add.ctp show all the users in the users table in a pull down input field. I deally this would be a hidden input of just the user.id from the view.ctp. I want to make sure any new rows added are automatically assigned to the specific user, once they are logged in. This seems like it should be simple, but everything I try does not work. On Apr 23, 7:58 pm, brian bally.z...@gmail.com wrote: On Thu, Apr 23, 2009 at 11:17 AM, Teedaddy bretteegar...@gmail.com wrote: hello friends, I am VERY new to all the cakePHP methods, so, any help would be much appreciated. I have built my database tables and have Baked all Models, Controllers, and Views. Everything is working as expected with the relations and interaction with the db tables. I am now trying to customize the view, add, and edit functions. The main thing I need to do is make many of the views, User.id specific and can't for the life of me figure out the best way to do that. Define User.id specific. Do you mean that you need to save a user_id foreign key with your data? Are you saving the user to a session when logged in? Here is a sample of code of what I am trying to do. I just want the add form to grab the current User.id for saving to the database. function writer_add() { if (!empty($this-data)) { $this-Writer-create(); if ($this-Writer-save($this-data)) { $this-Session-setFlash(__('The Writer has been saved', true)); $this-redirect(array('action'='index')); } else { $this-Session-setFlash(__('The Writer could not be saved. Please, try again.', true)); } } $users = $this-Writer-User-find('first', array('User' = 'User.id')); $this-set(compact('users')); } This makes no sense. If you want find a *specific* ('first') User, then you need to put 'User.id' on the left side and pass a $user_id on the right. Also, though it's not too big a deal, I guess your var should be $user, not $users. Anyway, if you save the User to the session when they log in, you won't need to do a find() here. Maybe you should explain what it is you're trying to do. --~--~-~--~~~---~--~~ 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: modifying a Baked function
You can also avoid having to use a hidden field in this instance, anyway, because the user_id can be added to $this-data before you call save() in your action. $this-data['SomeModel']['user_id'] = $this-Session-read('Auth.User.id'); $this-SomeModel-create($this-data); if ($this-SomeModel-save()) { ... On Sun, Apr 26, 2009 at 1:01 PM, brian bally.z...@gmail.com wrote: Keep in mind that baking creates *very* generic views. They often will require tweaking. You can simply replace the select list with a hidden field: echo $form-hidden('SomeModel.user_id', array('value' = $session-read('Auth.User.id')); Or, instead of grabbing it from the session in the view, you could do this in your action: $this-set('user_id', $this-Session-read('Auth.User.id')); echo $form-hidden('SomeModel.user_id', array('value' = $user_id)); On Sat, Apr 25, 2009 at 7:06 PM, Teedaddy bretteegar...@gmail.com wrote: Thanks for the response. The main thing I am trying to do is make sure my index.ctp, view.ctp, and add.ctp pages only return and show the data for the current logged in user.id. For instance, it is easy enough to work with related data to a specific user after they are selected from the user view but if I want to add new records to a related table, the Baked forms for add.ctp show all the users in the users table in a pull down input field. I deally this would be a hidden input of just the user.id from the view.ctp. I want to make sure any new rows added are automatically assigned to the specific user, once they are logged in. This seems like it should be simple, but everything I try does not work. On Apr 23, 7:58 pm, brian bally.z...@gmail.com wrote: On Thu, Apr 23, 2009 at 11:17 AM, Teedaddy bretteegar...@gmail.com wrote: hello friends, I am VERY new to all the cakePHP methods, so, any help would be much appreciated. I have built my database tables and have Baked all Models, Controllers, and Views. Everything is working as expected with the relations and interaction with the db tables. I am now trying to customize the view, add, and edit functions. The main thing I need to do is make many of the views, User.id specific and can't for the life of me figure out the best way to do that. Define User.id specific. Do you mean that you need to save a user_id foreign key with your data? Are you saving the user to a session when logged in? Here is a sample of code of what I am trying to do. I just want the add form to grab the current User.id for saving to the database. function writer_add() { if (!empty($this-data)) { $this-Writer-create(); if ($this-Writer-save($this-data)) { $this-Session-setFlash(__('The Writer has been saved', true)); $this-redirect(array('action'='index')); } else { $this-Session-setFlash(__('The Writer could not be saved. Please, try again.', true)); } } $users = $this-Writer-User-find('first', array('User' = 'User.id')); $this-set(compact('users')); } This makes no sense. If you want find a *specific* ('first') User, then you need to put 'User.id' on the left side and pass a $user_id on the right. Also, though it's not too big a deal, I guess your var should be $user, not $users. Anyway, if you save the User to the session when they log in, you won't need to do a find() here. Maybe you should explain what it is you're trying to do. --~--~-~--~~~---~--~~ 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 configuration or .htaccess?
I have developed a Cake-application for the first time and now I am about to put it up in a shared environment running FreeBSB with apache2 as web server. On the server, I have the directory ~user/public_html/ I have uploaded the cake application to the public_html-directory so now do my file structure look like: ~user/public_html/cake /* The cake core */ ~user/public_html/appname |-config |-controllers |-... \-webroot After some work with .htaccess, I have been able to access my application directly via http://www.mydomain.com/ (~user/public_html is pointing to appname/webroot via a RewriteRule in .htaccess) So far so good! Now to my problem. In any link generated by cake the URL includes the appname, e.g. I have a link to about which says http://www.mydomain.com/appname/about and the same information is accessable via http://www.mydomain.com/about From an estetical point of view, the latter is preferred. I would like to remove the appname from all links generated in my application since there is no benefit having that information in there. I have tried some RewriteRules and I have also tried to solve it in the application configuration by setting App.baseUrl to '/'. The latter is removing the appname from the links and everything seems to work, but then login is not working any longer. (I am using the Auth- component for authentication, no rocket-science there...). The .htaccess file in ~user/public_html looks like: IfModule mod_rewrite.c RewriteEngine on RewriteRule^$ appname/webroot/[L] RewriteRule(.*) appname/webroot/$1 [L] /IfModule The .htaccess file in ~user/public_html/appname looks like: IfModule mod_rewrite.c RewriteEngine on RewriteRule^$webroot/[L] RewriteRule(.*) webroot/$1[L] /IfModule and the .htaccess file in ~user/public_html/appname looks like: IfModule mod_rewrite.c RewriteEngine On RewriteBase /appname/webroot RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] /IfModule My question now, is my problem a cake-configuration problem or could I solve my problem via .htaccess-instructions? Any suggestion in the right direction is very much appreciated. TIA, Jim --~--~-~--~~~---~--~~ 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: Warning (512): Cache not configured properly.
There are no errors what so ever on the link you provided. You have a successful installation. --~--~-~--~~~---~--~~ 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: Gziping in cakePHP
Hi Sridhar, I put the line in the AppController::beforeRender() and it works fine. Regards, Michael Sridhar Kuppalli schrieb: Hi All, I have completed my first site using cakePHP and now i am uploading it to the production server. Can any body tell me how to achive gzipping in cakePHP? ob_start(ob_gzhandler); is not working. I have googled and came to know that Debug mode 0 will not work with this. Can anybody tell me any other way of achiving this? Thanks Regards Sridhar K N --~--~-~--~~~---~--~~ 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: /app/plugins/content/vendors/js/tiny_mce doesn't work properly
Please? Anybody? --~--~-~--~~~---~--~~ 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 configuration or .htaccess?
On Sun, Apr 26, 2009 at 2:21 PM, Jimson sundjim...@gmail.com wrote: (..) On the server, I have the directory ~user/public_html/ To use CakePHP with the mod_rewrite, you need to edit your (3) .htaccess files, including something as RewriteBase /~user/ just after the line with RewriteEngine on Best regards. -- MARCELO DE F. ANDRADE Belem, PA, Amazonia, Brazil Linux User #221105 http://mfandrade.wordpress.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
2 question about my site,Thanks.
hi every one. 1. I only use the refresh key(F5) one time, but I saw the controller has execute 2 times. but when I use the link to the action, It only has been execute one time. 2. my link, sometimes it can be show very good, sometimes it will be show bad, like the code has been show directly Thanks if you know the answer,please tell me. thank you. rimoe --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Debug Ajax
For some odd reason i cant see the debug for any of my Ajax requests. It used to work now it just stopped. config file debug = 2 app_controller if ($this-RequestHandler-isAjax() || $this-RequestHandler-isXml()) { Configure::write('debug', 2); } even tried adding if ($this-RequestHandler-isAjax() || $this-RequestHandler-isXml()) { Configure::write('debug', 2); } to the actions being called for the ajax and still no output. Ideas? Dave --~--~-~--~~~---~--~~ 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: Debug Ajax
Hello Dave, I never used debug when using Ajax. I'm not sure if I understood your post. My suggestion is the Firebug. With this amazing extension for Firefox (https://addons.mozilla.org/pt-BR/firefox/addon/1843) you can see your requests, responses... P.S. Sorry for my bad english... I'm from Brazil and my English doesn't help... :) On Apr 26, 11:54 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: For some odd reason i cant see the debug for any of my Ajax requests. It used to work now it just stopped. config file debug = 2 app_controller if ($this-RequestHandler-isAjax() || $this-RequestHandler-isXml()) { Configure::write('debug', 2); } even tried adding if ($this-RequestHandler-isAjax() || $this-RequestHandler-isXml()) { Configure::write('debug', 2); } to the actions being called for the ajax and still no output. Ideas? Dave --~--~-~--~~~---~--~~ 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: 2 question about my site,Thanks.
Strange... 1) Nothing in the beforeFilter or in the app_controller? 2) What are you putting in the first parameter of your HtmlHelper::link? (some example of code?) On Apr 26, 10:59 pm, Rimoe meiyo...@gmail.com wrote: hi every one. 1. I only use the refresh key(F5) one time, but I saw the controller has execute 2 times. but when I use the link to the action, It only has been execute one time. 2. my link, sometimes it can be show very good, sometimes it will be show bad, like the code has been show directly Thanks if you know the answer,please tell me. thank you. rimoe --~--~-~--~~~---~--~~ 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: 2 question about my site,Thanks.
hi, my beforeFilter have no write any thing is special my link is like this: ?php echo $html-link(__('TOP', true), array('controller'= 'pages','action'='index',$username),null,false,false);? thanks for your help. rimoe 2009/4/27 NegoBlack® paulomoacir.jun...@gmail.com Strange... 1) Nothing in the beforeFilter or in the app_controller? 2) What are you putting in the first parameter of your HtmlHelper::link? (some example of code?) On Apr 26, 10:59 pm, Rimoe meiyo...@gmail.com wrote: hi every one. 1. I only use the refresh key(F5) one time, but I saw the controller has execute 2 times. but when I use the link to the action, It only has been execute one time. 2. my link, sometimes it can be show very good, sometimes it will be show bad, like the code has been show directly Thanks if you know the answer,please tell me. thank you. rimoe --~--~-~--~~~---~--~~ 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: User Id Question
I use to do this on my app_controller.php: public function beforeFilter(){ if ($this-Auth-user()){ $this-set(userInfo, $this-Auth-user()) } } Then I can use this var on my views... On Apr 25, 7:57 pm, Teedaddy bretteegar...@gmail.com wrote: Could someone be so kind to tell me the easiest way to pass the current logged in Auth user id in $htmlhelper links? Thank you so much, just learning all this MVC method and have been through Auth tutorials numerous times but I am missing this somehow. Bret --~--~-~--~~~---~--~~ 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 auth component password field always empty why ??
$this-Auth-fields = array('password'='password1'); Now it says the password1 field is null i.e the same effect happens now also --~--~-~--~~~---~--~~ 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: 2 question about my site,Thanks.
My hypothesis was anything like the fourth parameter of the HtmlHelper::link but with your answer it was discarded. About the F5 I don't have ideas... Any Ajax Call or redirect? How do you diagnosed this strange behavior? On 27 abr, 00:34, Rimoe meiyo...@gmail.com wrote: hi, my beforeFilter have no write any thing is special my link is like this: ?php echo $html-link(__('TOP', true), array('controller'= 'pages','action'='index',$username),null,false,false);? thanks for your help. rimoe 2009/4/27 NegoBlack® paulomoacir.jun...@gmail.com Strange... 1) Nothing in the beforeFilter or in the app_controller? 2) What are you putting in the first parameter of your HtmlHelper::link? (some example of code?) On Apr 26, 10:59 pm, Rimoe meiyo...@gmail.com wrote: hi every one. 1. I only use the refresh key(F5) one time, but I saw the controller has execute 2 times. but when I use the link to the action, It only has been execute one time. 2. my link, sometimes it can be show very good, sometimes it will be show bad, like the code has been show directly Thanks if you know the answer,please tell me. thank you. rimoe --~--~-~--~~~---~--~~ 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: 2 question about my site,Thanks.
I have no Any Ajax Call, I have write a save action, when it use the action i will write it into my database. so I know it has been execute 2 times, and then if the page has been execute 2 times, some link will can't be clicked, if clicked, the page will like the code has been show directly. Thank you rimoe 2009/4/27 NegoBlack® paulomoacir.jun...@gmail.com My hypothesis was anything like the fourth parameter of the HtmlHelper::link but with your answer it was discarded. About the F5 I don't have ideas... Any Ajax Call or redirect? How do you diagnosed this strange behavior? On 27 abr, 00:34, Rimoe meiyo...@gmail.com wrote: hi, my beforeFilter have no write any thing is special my link is like this: ?php echo $html-link(__('TOP', true), array('controller'= 'pages','action'='index',$username),null,false,false);? thanks for your help. rimoe 2009/4/27 NegoBlack® paulomoacir.jun...@gmail.com Strange... 1) Nothing in the beforeFilter or in the app_controller? 2) What are you putting in the first parameter of your HtmlHelper::link? (some example of code?) On Apr 26, 10:59 pm, Rimoe meiyo...@gmail.com wrote: hi every one. 1. I only use the refresh key(F5) one time, but I saw the controller has execute 2 times. but when I use the link to the action, It only has been execute one time. 2. my link, sometimes it can be show very good, sometimes it will be show bad, like the code has been show directly Thanks if you know the answer,please tell me. thank you. rimoe --~--~-~--~~~---~--~~ 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: Where do I start if I was SQL injected?
If you do not use query method of model and custom SQL fragments anywhere SQL injection seems impossible. But if follow tutorials data manipulation by users is simplest task. It is just manual ID replacement in forms/URLs. Do you check is current user allowed to create new record or change that one he attempts to change? $this-Submission-create() call will not prevent editing of any submission record. To avoid such manipulation you should divide create and edit actions. In create action unset id field in data manually before save, in edit first check is current user allowed to edit record with ID he requested. On Apr 25, 4:04 am, Linas linas.petraus...@gmail.com wrote: Excuse me for my lack of knowledge. I've read through discussions on topic sql injection, and as far as I understood, it is not likely if you use CakePHP's way of doing things. However my site was SQL injected. I only write data using the model's save() method. Where do I start to look for possible flaws? Is Auth component known to have any? Do you see any flaws in the following controller's method? function submit($id = null) { $this-set('page', 'submit'); if (!empty($this-data)) { // additional fields $this-data['Submission']['timestamp'] = date(Y-m-d H:i:s); $this-data['Submission']['user_id'] = $this-Auth-user ('id'); $this-Submission-create(); if ($this-Submission-save($this-data)) { $this-Session-setFlash('Jūsų sprendimas priimtas.'); $this-redirect(array('action'='submissionlist')); } else { $this-Session-setFlash('Sprendimo priimti nepavyko. Pabandykite dar kartą.'); } } else if ($id != null) { $this-data['Submission']['task_id'] = $id; } $tasks = $this-Submission-Task-find('list', array('conditions' = array('Task.published' = 1))); $this-set(compact('tasks')); } I would appreciate any comments. Linas --~--~-~--~~~---~--~~ 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: 2 question about my site,Thanks.
Sad... No ideas... But could you post your complete action here (I don't know... function add() maybe...)? On 27 abr, 01:22, Rimoe meiyo...@gmail.com wrote: I have no Any Ajax Call, I have write a save action, when it use the action i will write it into my database. so I know it has been execute 2 times, and then if the page has been execute 2 times, some link will can't be clicked, if clicked, the page will like the code has been show directly. Thank you rimoe 2009/4/27 NegoBlack® paulomoacir.jun...@gmail.com My hypothesis was anything like the fourth parameter of the HtmlHelper::link but with your answer it was discarded. About the F5 I don't have ideas... Any Ajax Call or redirect? How do you diagnosed this strange behavior? On 27 abr, 00:34, Rimoe meiyo...@gmail.com wrote: hi, my beforeFilter have no write any thing is special my link is like this: ?php echo $html-link(__('TOP', true), array('controller'= 'pages','action'='index',$username),null,false,false);? thanks for your help. rimoe 2009/4/27 NegoBlack® paulomoacir.jun...@gmail.com Strange... 1) Nothing in the beforeFilter or in the app_controller? 2) What are you putting in the first parameter of your HtmlHelper::link? (some example of code?) On Apr 26, 10:59 pm, Rimoe meiyo...@gmail.com wrote: hi every one. 1. I only use the refresh key(F5) one time, but I saw the controller has execute 2 times. but when I use the link to the action, It only has been execute one time. 2. my link, sometimes it can be show very good, sometimes it will be show bad, like the code has been show directly Thanks if you know the answer,please tell me. thank you. rimoe --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---