URLencoding works for all characters except / and \
Dear cakephp experts, While passing parameters through URL, there are cases when the parameters contain funny characters like %$#. This problem is solved when I encode the URL. However, for some reason, characters such as backslash / and forward-slash \ simply do not work on cakephp. All other characters work after encoding the URL. I have already spent significant amount of time on this problem. Can someone advise? Thank you very much. -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: URLencoding works for all characters except / and \
you can either write your own escaping function who takes care of those characters, or better, use base64encode to pass those special character strings via $_GET but there you also need to tweak it a little bit, see the CakeDC search plugin for details where I fixed the method to safely encode the / and = chars: https://github.com/CakeDC/search/blob/master/Controller/Component/PrgComponent.php#L198 you will then need to decode it again in the view: https://github.com/CakeDC/search/blob/master/Controller/Component/PrgComponent.php#L144 Am Dienstag, 23. Oktober 2012 09:48:30 UTC+2 schrieb Lightee: Dear cakephp experts, While passing parameters through URL, there are cases when the parameters contain funny characters like %$#. This problem is solved when I encode the URL. However, for some reason, characters such as backslash / and forward-slash \ simply do not work on cakephp. All other characters work after encoding the URL. I have already spent significant amount of time on this problem. Can someone advise? Thank you very much. -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Cake Newbie
Hi Guys right yesterday i installed my first webserver on *windows* environment and i choose *cakephp* as my first framework but i got some issue. I followed the instruction on the cake documentation but something gone wrong. I created manually the example database for the blog tutorial but i can't link to cake. Moreover the system give me *1024* error. Can someone help me!? -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
CakePHP 2.x how to manage multiple user-tables and access areas?
i'm planning a new project with cakephp and i have a problem. i want to create multiple access areas and multiple user-tables i.e. like a shop system: group 1: customers group 2: merchants group 3: affiliate-partners (4. group: admins [this maybe with acl]) every group will have its own area (domain.tld, domain.tld/merchants, domain.tld/affiliate) (i know about prefex-routing, but will it works with my idea?) How can i manage 3 separate logins, if i.e. a merchant logged in, he wouldn't automatically logged in in affiliate area? in my first trys i see, that there's only one cookie and every merchant would be logged in in other areas too without having an account there. please help me and point me in the right direction ;) (sry for my terrible english) greetings from germany m. -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Cake Newbie
Have you opened the Config/core.php and changed the security salt and hash? I think that 'notice' is related to that. 2012/10/23 Lorenzo Strada lorenzostradaph...@gmail.com: Hi Guys right yesterday i installed my first webserver on windows environment and i choose cakephp as my first framework but i got some issue. I followed the instruction on the cake documentation but something gone wrong. I created manually the example database for the blog tutorial but i can't link to cake. Moreover the system give me 1024 error. Can someone help me!? -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Cake Newbie
more info: http://stackoverflow.com/questions/4163711/please-change-the-value-of-security-salt-in-app-config-core-php-to-a-salt-valu (sorry for posting twice) 2012/10/23 Felipe Zavan emailblogg...@gmail.com: Have you opened the Config/core.php and changed the security salt and hash? I think that 'notice' is related to that. 2012/10/23 Lorenzo Strada lorenzostradaph...@gmail.com: Hi Guys right yesterday i installed my first webserver on windows environment and i choose cakephp as my first framework but i got some issue. I followed the instruction on the cake documentation but something gone wrong. I created manually the example database for the blog tutorial but i can't link to cake. Moreover the system give me 1024 error. Can someone help me!? -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: CakePHP 2.x how to manage multiple user-tables and access areas?
Actually you only need one table with the following fields: username or email password group + additional fields that might be useful for your application After login (with AuthComponent) you can check to which group the user belongs. Depending on the group you can redirect the user to the correct area. -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Allow special characters in HtmlHelper
Thanks Chetan Marcus. On 10/23/2012 12:23 AM, chetan varshney [via CakePHP] wrote: Use this for example $imgTag = $this-Html-image($image['Image'] ['thumb_path'], array( 'alt' = $title )); $options = array('class' = 'thumb', 'name' = trim(Inflector::slug($title)), 'title' = trim($title), 'escape'=false); echo $this-Html-link($imgTag, $this-Html-url($image['Image'] ['small_path'],true), $options); -- 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 post to this group, send email to [hidden email] /user/SendEmail.jtp?type=nodenode=5711913i=0. To unsubscribe from this group, send email to [hidden email] /user/SendEmail.jtp?type=nodenode=5711913i=1. Visit this group at http://groups.google.com/group/cake-php?hl=en. If you reply to this email, your message will be added to the discussion below: http://cakephp.1045679.n5.nabble.com/Allow-special-characters-in-HtmlHelper-tp5711911p5711913.html To start a new topic under CakePHP, email ml-node+s1045679n125572...@n5.nabble.com To unsubscribe from CakePHP, click here http://cakephp.1045679.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1255722code=YmlsbC5zdG9sdHpAYm9vc3RlcndlYnNvbHV0aW9ucy5jb218MTI1NTcyMnwtNTU0NTk2MTUy. NAML http://cakephp.1045679.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://cakephp.1045679.n5.nabble.com/Allow-special-characters-in-HtmlHelper-tp5711911p5711922.html Sent from the CakePHP mailing list archive at Nabble.com. -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Allow special characters in HtmlHelper
setting 'url' options in image can do the trick too. $this-Html-image($image['Image']['thumb_path'], array( 'alt' = $title ,'url' = $yoururl)); On Tuesday, 23 October 2012 12:08:13 UTC+8, bs28723 wrote: I would like to use Html-image and Html-link together, but Html-link will convert characters like , , etc to htmlize them. for example $imgTag = $this-Html-image($image['Image']['thumb_path'], array( 'alt' = $title )); $options = array('class' = 'thumb', 'name' = trim(Inflector::slug($title)), 'title' = trim($title)); echo $this-Html-link($imgTag, $this-Html-url($image['Image']['small_path'],true), $options); Will actually produce a href=/2d3cf4770eefa1244464b0371009c2b0_resized_250x188.jpg class=thumb name=tree title=tree lt;img src=quot;/2d3cf4770eefa1244464b0371009c2b0_resized_100x75.jpgquot; alt=quot;tree quot; /gt;/a Yes the lt; etc is really in the file, so the image does not get recognized by the browser as HTML. But it just gets displayed as text. Any way to get the Html-link to not convert the string? Or do I need to just build this manually? -- View this message in context: Allow special characters in HtmlHelperhttp://cakephp.1045679.n5.nabble.com/Allow-special-characters-in-HtmlHelper-tp5711911.html Sent from the CakePHP mailing list archivehttp://cakephp.1045679.n5.nabble.com/at Nabble.com. -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Login not Working on Deploy Sever...
I got similar problem few months ago but it's ok after clear browser cache and delete server /app/tmp/cache files. On Saturday, 20 October 2012 06:24:13 UTC+8, GerarD wrote: Hi there... I don't think that's the problem. I check all my data in the DB and the Query, and it's all fine... I did change something in the configuration of cake to use the tmp folder to store sessions.. I though maybe that would be the problem, but noup... it's still not working my login.. Any other idea.? Thanks Vanja -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
$model-data state in ModelBehavior ::beforeSave() and ::afterSave()
I am writing a behavior which checks a field for duplicates in beforeSave() and updates the created row in afterSave(). I am wondering what happens to $model-data array if I modify it directly or I use $model-find() or $model-save() while in the callback. Do other behaviors and callbacks also receive the same data array? Am I responsible to leave it as-is after I finish modifying the data? Do I have to make another instance of the model and do *find*s and *save*s with that instance? ?php function beforeSave(Model $model){ $value = $model-data[$model-alias]['unique_field']; $duplicates = $model-find('all', array( 'conditions' = array('unique_field', $value) )); if ($duplicates) { /* ... */ } *//what happens to $model-data here?* } function afterSave(Model $model, $created){ $value = $model-data[$model-alias]['unique_field']; $model-data[$model-alias]['unique_field'] = strrev($value); //for demonstration purposes $model-save($model-data, array('callbacks'=false)); *//what happens to $model-data here?* } Thanks for the input! P.S. I have to update in afterSave because the unique field depends on the id, and has a temp value before the id is available. -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
and amp; in a veiw ?
hi guys,.. I'm gettingin a view instead of,... how can I avoid amp; to pass privacy on upload...? here is my code: 'uploadScript' : '?php echo $html-url('/photos/upload?PHPSESSID=' . session_id() . 'privacy=' . $_GET['privacy'], array('escape'=false)) ?', and this is what's coming in a source 'uploadScript' : 'http://www.hamayk.com/photos/upload?PHPSESSID=fd25a246d89273d726dcfeea0ea14508privacy=public', can anyone help please... thanks in advance chris -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: and amp; in a veiw ?
Maybe you should use link instead of url $this-Html-link( /string $title/,/mixed $url = null/,/array $options = array()/,/string $confirmMessage = false); $this-Html-link('title', '/photos/upload?PHPSESSID=' . session_id() . 'privacy=' . $_GET['privacy'],//array('escape' = false)); This should resolve your problem. / On 10/24/2012 04:55 AM, Chris wrote: hi guys,.. I'm getting amp; in a view instead of,... how can I avoid amp; to pass privacy on upload...? here is my code: 'uploadScript' : '?php echo $html-url('/photos/upload?PHPSESSID=' . session_id() . 'privacy=' . $_GET['privacy'], array('escape'=false)) ?', and this is what's coming in a source 'uploadScript' : 'http://www.hamayk.com/photos/upload?PHPSESSID=fd25a246d89273d726dcfeea0ea14508amp;privacy=public', can anyone help please... thanks in advance chris -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Sending mail through Gmail with CakeEmail (again)?
Sorry for not bumping old topics, but has anyone managed to send an email with CakeEmail and stmp.gmail.com? My settings: class EmailConfig { public $gmail = array( 'transport' = 'Smtp', 'from' = array('u...@domain.com' = 'Name'), 'host' = 'ssl://smtp.gmail.com', 'port' = 465, 'timeout' = 10, 'username' = 'u...@domain.com', 'password' = 'youwishyouknew', 'client' = null, 'log' = true, //'charset' = 'utf-8', //'headerCharset' = 'utf-8', 'emailFormat' = 'html' ); My Controller code: function test_email(){ $mail = new CakeEmail('gmail'); $mail-addTo('u...@anotherdomain.com', 'User'); $mail-from('u...@domain.com', 'User'); $mail-subject('TESTING '.rand(10, 100)); $mail-template('test', 'default'); $return = $mail-send(); debug($return); debug($mail); die(); } I keep getting Connection timeouts and Socket errors. Basically, the damn thing won't even connect, auth is never even touched. (neither dev, nor production machine..) I am using Google Apps on that domain (same domain as the production, not that it should matter...) I have checked for mod_openssl on the server. I have double checked the auth info. I am using Cake 2.2.1 Is there something else I'm missing? Or should I just search for another email library? Thanks! Cheers! -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.