Re: cookie stays empty on production server
check yours cookie configuration $this-Cookie-path = '/'; $this-Cookie-domain = 'domain.com'; On Mon, May 25, 2009 at 7:07 AM, CheshirePuss (via Nabble) ml-user+202185-126257...@n2.nabble.comml-user%2b202185-126257...@n2.nabble.com wrote: I'm trying to implement a voting system, and I want to use a cookie to store the items that the current user already voted for, thus going against multiple voting. function vote($dir,$id,$type) { $votes = $this-Cookie-read('votes'); /*process data, adding or subtracting id's and stuff from the array $votes*/ $this-Cookie-write('votes', $votes); } in appcontroller: var $components = array('Cookie'); and this works when I use it on my local WAMP testing server. But when I upload it to m production server, $votes stays empty, even though, when I check my cookies, a cookie was made for every item voted for. I have no idea what causes this, does anyone else? -- View message @ http://n2.nabble.com/cookie-stays-empty-on-production-server-tp2968033p2968033.html To start a new topic under CakePHP, email ml-node+19694-528461...@n2.nabble.comml-node%2b19694-528461...@n2.nabble.com To unsubscribe from CakePHP, click here (link removed) =. -- View this message in context: http://n2.nabble.com/cookie-stays-empty-on-production-server-tp2968033p2970016.html Sent from the CakePHP mailing list archive at Nabble.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 -~--~~~~--~~--~--~---
encrypted Cookies problem - value of cookie
Hello, i have problem with encrypted cookies. Here i use encrypted cookie, and after writing cookie i hit f5 and i get strange random string.. if($this-Cookie-read('name')){ echo $this-Cookie-read('name'); }else{ $this-Cookie-write('name','Larry'); } when im not using encrypting, everything is fine and after refreshing page i get Larry if($this-Cookie-read('name')){ echo $this-Cookie-read('name'); }else{ $this-Cookie-write('name','Larry',false); } Whats the problem ? why after refreshing page it returns strange value ? When i do: $this-Cookie-write('name','Larry'); echo $this-Cookie-read('name'); everything is fine, but that is not the point.. -- View this message in context: http://n2.nabble.com/encrypted-Cookies-problem---value-of-cookie-tp2964909p2964909.html Sent from the CakePHP mailing list archive at Nabble.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 -~--~~~~--~~--~--~---
Re: Cake 1.2 Auth - Is someone logged in?
It's working on functions with $this-Auth-deny(); but its not working on functions with $this-Auth-allow(); ;/ any ideas ? On 17 Sie, 12:36, francky06l [EMAIL PROTECTED] wrote: The Auth login stores the user information in the Session (with Auth key). The Auth-user() is actually a wrapper function to the session Auth.User key. The Auth logout function delete the informations from the session. Knowing this, you can use the Session component in controllers and the session helper in views to detect the login status. in controllers: $this-Session-check('Auth.User.id') will return true if the user is logged, you can also use $this-Auth-user('id'). in views $session-check('Auth.User.id') will tell you if a user is logged, and you can user $session-read('Auth.User') to retrieve the user's information. hth On Aug 17, 2:31 am, Bill Brisky [EMAIL PROTECTED] wrote: I'm starting off with Cake and enjoying it. As confusing as the entire ACL world seems, I think I'm getting a grip on it. One small current problem: How do you determine if someone is currently logged in? Here is the situation: I have a simple home page (pages/home.ctp) that simply that should display a login link (users/login) and if no one is currently logged in, a logout link (users/logout). It seems simple enough however, I can't seem to find a way to determine whether or not someone is logged in. $loggedIn (Auth public variable as stated in docs) seems to always be false outside of actual Auth code. $this-Auth-user() : After an initial login, this always seems to return a User object properly filled out, with the exception that person had actually logged out. So between an always false condition, and an always true condition, what does one do? I have a feeling I'm missing something fundamental and will be smacking my head on my desk after reading the solution. More detail: App_controller.php Acl Auth components in $components Auth variables set in beforeFilter Pages/Home.ctp Typical Cake home page Due to the lack of a controller (and thus a lack of access to data), I made a copy of the cake core pages_controller.php and moved it into my app/controllers directory. Controllers/pages_controller.php This is where I hope to set a variable (inside of display()) with login status and pass it to home.ctp. Changes to this file are minimal: Added Auth Session to $components. Users_controller.php Typical Auth login (no code) and logout (taken from examples). Versions: - Windows XP - Xampp v1.6.7 - PHP v.5.2.6 - Cake v1.2.0.7296rc2 Any and all help will be greatly appreciated. B. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
multipart/form-data and 404 error.
When i send form using enctype=multipart/form-data i always get error 404 not found form action= enctype=multipart/form-data method=post when i remove enctype=multipart/form-data , form is sending correctly. form action= enctype=multipart/form-data method=post any ideas ? --~--~-~--~~~---~--~~ 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: multipart/form-data and 404 error.
sorry , it's 403 error On 1 Cze, 13:19, ar2oor [EMAIL PROTECTED] wrote: When i send form using enctype=multipart/form-data i always get error 404 not found form action= enctype=multipart/form-data method=post when i remove enctype=multipart/form-data , form is sending correctly. form action= enctype=multipart/form-data method=post any ideas ? --~--~-~--~~~---~--~~ 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: multipart/form-data and 404 error.
OK I found the reason: yesterday admin set SecFilterEngine to on ;/ so I just add one line to .htaccess and it works: SecFilterEngine Off Thanks anyway ;] ..and keep Baking ! On 1 Cze, 13:19, ar2oor [EMAIL PROTECTED] wrote: When i send form using enctype=multipart/form-data i always get error 404 not found form action= enctype=multipart/form-data method=post when i remove enctype=multipart/form-data , form is sending correctly. form action= enctype=multipart/form-data method=post any ideas ? --~--~-~--~~~---~--~~ 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: How to change this URL
do you mean $Route-connect('/admin/:controller/*', array('action' = 'index')); and/or $Route-connect('/admin/:controller/:action/*'); ? On 1 Cze, 16:15, CakeMan [EMAIL PROTECTED] wrote: Hi, I am working on an website in Cakephp 1.1. I need to make the URLs such ashttp://www.mysite.com/USERNAME I have changed the Route in routes.php in config-App folder to $Route-connect('/*', array('controller' = 'controllerName', 'action' = 'actionName')); This solved my above problem. However, now i got another problem with my other static pages such as my contact page is ashttp://www.mysite.com/contacts Now this page is also redirecting to the above controller. I have solved this problem as well with manually mentioning this in routes.php again $Route-connect('/contacts', array('controller' = 'contacts', 'action' = 'index')); This solved my problem. But now i have to enter an Route for every static page as i have done with contacts page. I have lots of lots of static pages. I need to enter an route for all of them. I don't want to enter so many routes in routes.php. Is there any alternative for this ? Please help !! Thank !! --~--~-~--~~~---~--~~ 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: Routing - Many Slashes - One Parm
i thought about that earlier but i have an error: Missing controller You are seeing this error because controller ThumbController could not be found. but when i replace $Route-connect('/thumb/:link', array('controller' = 'obrazki', 'action' = 'skaluj')); with $Route-connect('/thumb/*', array('controller' = 'obrazki', 'action' = 'skaluj')); it works..BUT... i really cant do it with regular expression (without join();) ? Thanks. On 22 Maj, 16:25, fr3nch13 [EMAIL PROTECTED] wrote: try $Route-connect('/thumb/:link', array('controller' = 'obrazki', 'action' = 'skaluj')); then in your skaluj action in your controller, take a look at debug($this-params); It should have the info you need and you should be able to do a join(), etc. On May 22, 9:26 am,ar2oor[EMAIL PROTECTED] wrote: i got: $Route-connect('/thumb/:link', array('controller' = 'obrazki', 'action' = 'skaluj'), array('link' = '(.)*')); www.asd.com/thumb/imgs/asd/dsa/dsa.jpg and i want to link=imgs/asd/dsa/dsa.jpg but i doesn't work :/ any ideas ? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Routing - Many Slashes - One Parm
i got: $Route-connect('/thumb/:link', array('controller' = 'obrazki', 'action' = 'skaluj'), array('link' = '(.)*')); www.asd.com/thumb/imgs/asd/dsa/dsa.jpg and i want to link=imgs/asd/dsa/dsa.jpg but i doesn't work :/ any ideas ? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---