# |
Mar 7th 2018, 15:28 |
neon1024 |
charolastra: $this->redirect() takes an array url, so you can pass whatever url options you want |
# |
Mar 7th 2018, 15:27 |
neon1024 |
No harm in that @roel but do think about if you’d be better served with a Behavior instead |
# |
Mar 7th 2018, 15:20 |
roel |
Hello, Is there a reason why I shouldn't make an extra layer between the Table and for example UsersTable? Let's call this new layer "AppTable", AppTable will extend Table, and UsersTable will extend AppTable. Table -> AppTable -> UsersTable This new layer holds global functions. |
# |
Mar 7th 2018, 15:14 |
charolastra |
hi, how to pass arguments/variables to a redirect on the PagesController? |
# |
Mar 7th 2018, 14:33 |
sam_indi |
will that be issue? |
# |
Mar 7th 2018, 14:33 |
sam_indi |
@neon1024: I think I am missing authentication type in curl request |
# |
Mar 7th 2018, 14:30 |
sam_indi |
This is my curl request |
# |
Mar 7th 2018, 14:30 |
sam_indi |
https://thepasteb.in/p/0ghJWyo9GPgc5 |
# |
Mar 7th 2018, 14:29 |
sam_indi |
Yes because it is already using blowfish and this channel just reversed the order of my msg. I have sent paste bin as first msg. You can see Blowfish is already used |
# |
Mar 7th 2018, 14:29 |
neon1024 |
You probably want to change your Authentication type, https://book.cakephp.org/2.0/en/core-libraries/components/authentication.html |
# |
Mar 7th 2018, 14:28 |
neon1024 |
Is this a serious question? |
# |
Mar 7th 2018, 14:28 |
neon1024 |
You ask where you can change “Blowfish” and then paste code with the word “Blowfish” in it. |
# |
Mar 7th 2018, 14:27 |
sam_indi |
Where can I change that string, I have just made a curl request from another server |
# |
Mar 7th 2018, 14:27 |
sam_indi |
https://thepasteb.in/p/mwh1YMJ4Z0Ac5 |
# |
Mar 7th 2018, 14:26 |
neon1024 |
Sorry, I can’t help you with that. |
# |
Mar 7th 2018, 14:26 |
neon1024 |
Hah! |
# |
Mar 7th 2018, 14:26 |
santosh.madeti |
@neon1024 Cakephp version is 1.3 |
# |
Mar 7th 2018, 14:25 |
neon1024 |
sam_indi: It sounds like your application is using blowfish for the AuthComponent perhaps, but the string you’re using in your salt isn’t compatible |
# |
Mar 7th 2018, 14:25 |
santosh.madeti |
@neon1024 Thanks, The query format is like $this -> Estimate -> Patient -> find(array), I need to debug this query .. |
# |
Mar 7th 2018, 14:25 |
sam_indi |
This is components array for app controller: |
# |
Mar 7th 2018, 14:24 |
neon1024 |
@santosh.madeti You can use `$query->sql()` but do remember that it’s a PDO prepared statement, so the params will not be included in the output sql |
# |
Mar 7th 2018, 14:22 |
sam_indi |
I am passing the correct data, but still getting unauthorized |
# |
Mar 7th 2018, 14:20 |
sam_indi |
{ "name": "Unauthorized", "message": "Unauthorized", "url": "\/assets.json" } |
# |
Mar 7th 2018, 14:20 |
sam_indi |
Warning (512): Invalid salt: 1 for blowfish Please visit http://www.php.net/crypt and read the appropriate section for building blowfish salts. [CORE/Cake/Utility/Security.php, line 290] |
# |
Mar 7th 2018, 14:20 |
sam_indi |
This is the error I am getting: |
# |
Mar 7th 2018, 14:20 |
sam_indi |
Hi everyone. I am getting an error while calling the rest api in cakephp 2 application. |
# |
Mar 7th 2018, 14:19 |
jkpatel291289 |
i dont know hoe to print, but if you want to debug you can see actual query in debug bar sql tab. |
# |
Mar 7th 2018, 13:54 |
santosh.madeti |
Hi , How can we print the original Sql query from Cake query builder? |
# |
Mar 7th 2018, 12:40 |
iqu |
answer to myself. Collections |
# |
Mar 7th 2018, 12:33 |
ooskar1233 |
hey, anyone into crud-json-api? I’m trying to create self-referenced relationship and got some trouble inserting records |
# |
Mar 7th 2018, 12:30 |
iqu |
hmm. whats the strategy. i can send data to belongsToMany like patchEntity '_ids' => [1, 2, 3, 4]. can i access those _ids somehow easily in controller? how do i convert object to array in controller? |
# |
Mar 7th 2018, 12:19 |
neon1024 |
If I have to have to the query string, I should at least be able to map or obfuscate my param names |
# |
Mar 7th 2018, 12:16 |
neon1024 |
@dereuromark You’re right, there is no way to remove the paging params from the url. This seems very silly to me! It’s automatically exposing my schema to the url! |
# |
Mar 7th 2018, 12:14 |
jkpatel291289 |
how to set default option for date control of form helper? I don't want to pass options on every form where i use date control. |
# |
Mar 7th 2018, 12:04 |
narendravaghela |
yup, thanks :slightly_smiling_face: |
# |
Mar 7th 2018, 11:59 |
voidesc |
@narendravaghela - you can use something like: https://freegeoip.net/ to get the geolocation for the ip. or you can get the browser time / offset via js and then process that via php. |
# |
Mar 7th 2018, 11:51 |
narendravaghela |
okay..., so what is the best way to determine that? |
# |
Mar 7th 2018, 11:48 |
neon1024 |
Not reliably |
# |
Mar 7th 2018, 11:46 |
narendravaghela |
Is there any way to detect user timezone from request object? |
# |
Mar 7th 2018, 11:46 |
marcusgoede |
keys don’t matter here for me |
# |
Mar 7th 2018, 11:45 |
marcusgoede |
yes, i know, i was just confused, it did change the order of the array, but not as i wanted |