# |
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 |
# |
Mar 7th 2018, 11:45 |
neon1024 |
If you do not want to preserve the key ordering perhaps you need to use a callback and your own sort function |
# |
Mar 7th 2018, 11:45 |
neon1024 |
Sorting on the registrationDate would put them in order of the value, it will not order the keys |
# |
Mar 7th 2018, 11:43 |
marcusgoede |
yes, but the keys are not sorted as well. 0, 11, 18, 17, … if i use ksort the values are still not ordered |
# |
Mar 7th 2018, 11:43 |
neon1024 |
Not sure, sorry, seems like it should be working |
# |
Mar 7th 2018, 11:41 |
neon1024 |
Those are not keys, they are values. |
# |
Mar 7th 2018, 11:40 |
slackebot |
(int) 17 => [ ‘registrationDate’ => ‘2018-02-28’, ... ], (int) 16 => [ ‘registrationDate’ => ‘2018-02-28’, ... ], (int) 15 => [ ‘registrationDate’ => ‘2018-02-28’, ... ], the keys are not orders |
# |
Mar 7th 2018, 11:40 |
marcusgoede |
ok, i understand and i changed the code. but it’s still strange. $collection = new Collection($users[‘users’]); $collection = $collection->sortBy(‘registrationDate’); $users = $collection->toArray(); $users: [ (int) 0 => [ ‘registrationDate’ => ‘2018-02-28’, ... ], (int) 11 => [ ‘registrationDate’ => ‘2018-02-28’, ... ], (int) 18 => [ ‘registrationDate’ => |
# |
Mar 7th 2018, 11:39 |
neon1024 |
Currently I can only see rolling my own PaginatorHelper as a solution |
# |
Mar 7th 2018, 11:39 |
neon1024 |
I don’t recall having this issue before |