Log message #4098229

# At Username Text
# Nov 22nd 2017, 16:41 charking The server has PHP 5.4.16.
# Nov 22nd 2017, 16:40 charking (I know nothing about CakePHP.)
# Nov 22nd 2017, 16:39 charking hello. Someone built a site using CakePHP 2.2.2 years ago, and I'm trying to get it up to date. Should I upgrade to 3.5? Or is there a still-supported 2.x branch?
# Nov 22nd 2017, 16:15 unclezoot using my own functions i would probably add a myfunction(..., and$msg = array()) to enable me to build up a diagnostic array so i have something to read when i inevitably return false - does that make any sense?
# Nov 22nd 2017, 16:15 unclezoot i want to refactor a lot of logic tests from my controller into my model and pass back human readable messages to the developer as there is a lot of variation on how this plugin can be used, alongside other plugins which may or not exist, which affects the overall logic. the controller is already getting quite large so im trying to move code into beforeMarshall/beforeSave/afterSave, and i dont want to use custom validation. if i were
# Nov 22nd 2017, 16:12 neon1024 Perhaps you’re looking for Log::debug() ?
# Nov 22nd 2017, 16:09 slackebot2 !xy
# Nov 22nd 2017, 16:09 slackebot2 Command sent from Slack by neon1024:
# Nov 22nd 2017, 16:09 neon1024 What are you trying to see?
# Nov 22nd 2017, 16:08 unclezoot how would you pass diagnostic messages from Table::afterSave() into your controller (to pass into debugkit) ? am i missing something obvious here?
# Nov 22nd 2017, 16:04 neon1024 Why can’t you use DebugKIt?
# Nov 22nd 2017, 15:58 unclezoot correction, developer friendly session messages which wont be shown once debug is turned off
# Nov 22nd 2017, 15:57 unclezoot user friendly session messages basically
# Nov 22nd 2017, 15:50 neon1024 To diagnose what exactly?
# Nov 22nd 2017, 15:45 unclezoot hi, is there a way of passing diagnostics messages back from beforeSave or beforeMarshall to the controller?
# Nov 22nd 2017, 15:11 neon1024 Ahh, I can create a new response and assign the json as the body :slightly_smiling_face:
# Nov 22nd 2017, 15:09 neon1024 Returning the response directly upsets Cake with `Controller actions can only return Cake\\Http\\Response or null.`
# Nov 22nd 2017, 15:08 neon1024 If I use `_serialize` Cake tries to json encode my json
# Nov 22nd 2017, 15:08 neon1024 `echo $response->body()` is getting me the string, but as `text/html`
# Nov 22nd 2017, 15:07 neon1024 I am proxying an api call inside my application, how do I return the response body json as json?
# Nov 22nd 2017, 13:52 rudy1976s I have set up Asset timestamp to force on cake app.php
# Nov 22nd 2017, 13:52 neon1024 Or if you have a vhost on a server, perhaps the parent config has it setup
# Nov 22nd 2017, 13:52 neon1024 Perhaps your browser is adding it
# Nov 22nd 2017, 13:51 rudy1976s while using html helper there is always a cache expiration of 24 hours
# Nov 22nd 2017, 13:51 rudy1976s I have just make a test call of the same asset using curl and there is any cache settings
# Nov 22nd 2017, 13:51 neon1024 As you should be serving static assets directly from the file system and not via php
# Nov 22nd 2017, 13:50 neon1024 Server config
# Nov 22nd 2017, 13:50 rudy1976s I am trying to understand why all css and js have a cache modified expiration of 24 hours: does it depends on cake or server config ?
# Nov 22nd 2017, 13:44 johnwayne Strange tests :)
# Nov 22nd 2017, 13:44 johnwayne No, I think that my company has paid for security tests, and they should start this week so that's it :)
# Nov 22nd 2017, 13:43 neon1024 If they’re all coming from the same IP you could just block that IP in your server iptables
# Nov 22nd 2017, 13:40 johnwayne @neon1024 that can be :S
# Nov 22nd 2017, 13:38 neon1024 That’s not DDoS @johnwayne that’s someone probing your server security
# Nov 22nd 2017, 13:38 neon1024 Afternoon everyone
# Nov 22nd 2017, 13:38 johnwayne 'Unsupported HTTP method "../../../../../../../../etc" provided' Unsupported HTTP method "../../../../../../../../etc" provided
# Nov 22nd 2017, 13:38 johnwayne or
# Nov 22nd 2017, 13:37 johnwayne 'Unsupported HTTP method "' or 1=1-- " provided' Unsupported HTTP method "' or 1=1-- " provided
# Nov 22nd 2017, 13:37 johnwayne After each error I am getting email with errors, but in the last few hours I am getting around 100-200 emails with strange infos like
# Nov 22nd 2017, 13:37 johnwayne Is there a way to detect DDOS attack on your site?
# Nov 22nd 2017, 13:34 joopp i wrote these to helps to someone is looking for the same
# Nov 22nd 2017, 13:34 joopp i modified the fileupload() return 1 now its work like a charm,i can define the succes message where i called