# |
Dec 12th 2017, 15:52 |
flavius |
``` $time = new Time('last day of this year'); dump($time); dump($time->i18nFormat('YYYY')); ``` |
# |
Dec 12th 2017, 15:52 |
flavius |
code |
# |
Dec 12th 2017, 15:52 |
hmic |
might be using some auth plugin? - check there |
# |
Dec 12th 2017, 15:51 |
hmic |
usually done in appcontroller |
# |
Dec 12th 2017, 15:51 |
hmic |
checking authcomponent setup |
# |
Dec 12th 2017, 15:51 |
V99 |
and how i can determine what i use? |
# |
Dec 12th 2017, 15:48 |
hmic |
very basic stuff in there |
# |
Dec 12th 2017, 15:48 |
hmic |
there are distinct password hasher classes |
# |
Dec 12th 2017, 15:48 |
V99 |
the correct function |
# |
Dec 12th 2017, 15:48 |
V99 |
im reading the documentation but i cant see |
# |
Dec 12th 2017, 15:48 |
V99 |
i have a webpage develop in cakephp and now i have to make an application to change users passwords, this app is being developed under vb net (requirement of the client), i read the mysql database user structure but i cant generate the hash, how cakephp generate those hash? |
# |
Dec 12th 2017, 15:43 |
V99 |
hi |
# |
Dec 12th 2017, 15:43 |
flavius |
in php.ini |
# |
Dec 12th 2017, 15:43 |
flavius |
```[Date] date.timezone=Europe/Bucharest``` |
# |
Dec 12th 2017, 15:42 |
hmic |
does not neccessarily need to be correct :P |
# |
Dec 12th 2017, 15:42 |
hmic |
show your php setting though :D |
# |
Dec 12th 2017, 15:42 |
flavius |
so its 0 now |
# |
Dec 12th 2017, 15:41 |
flavius |
DST+1 ended on 287 oct |
# |
Dec 12th 2017, 15:41 |
hmic |
*fg* |
# |
Dec 12th 2017, 15:41 |
dereuromark |
gmt+2 with or without DST+1? |
# |
Dec 12th 2017, 15:40 |
flavius |
it should still say 2017, yet it doesnt |
# |
Dec 12th 2017, 15:40 |
flavius |
im gmt+2 btw, so it should be 23:59:59.... 1 second away from 2018 |
# |
Dec 12th 2017, 15:40 |
dereuromark |
seems like php doesnt |
# |
Dec 12th 2017, 15:39 |
flavius |
i18nFormat ignores the timezone? |
# |
Dec 12th 2017, 15:39 |
dereuromark |
then it should stay :slightly_smiling_face: |
# |
Dec 12th 2017, 15:39 |
flavius |
well lets say im in UTC |
# |
Dec 12th 2017, 15:39 |
dereuromark |
why? if you are in gmt+ this is expected for utc datetime |
# |
Dec 12th 2017, 15:38 |
flavius |
`$time->i18nFormat('YYYY')` outputs 2018 instead of 2017 |
# |
Dec 12th 2017, 15:38 |
flavius |
```Cake\I18n\Time {#163 +"time": "2017-12-31T21:59:59+00:00" +"timezone": "UTC" +"fixedNowTime": false }``` |
# |
Dec 12th 2017, 15:38 |
flavius |
this is so strange |
# |
Dec 12th 2017, 14:47 |
rafael.junqueira.sant |
Thank you, @admad |
# |
Dec 12th 2017, 14:47 |
dereuromark |
isnt that were the ide helper would come in? :slightly_smiling_face: |
# |
Dec 12th 2017, 14:46 |
neon1024 |
PHPStan is upset that I’ve not declared class properties in my controller for all the table classes I load |
# |
Dec 12th 2017, 14:46 |
admad |
this way all your code files go 1 level above public_html and are safe |
# |
Dec 12th 2017, 14:46 |
admad |
to mitigate the issue rename your app's "webroot" to "public_html" and then update the WWW_ROOT constant here https://github.com/cakephp/app/blob/master/config/paths.php#L52 |
# |
Dec 12th 2017, 14:44 |
admad |
@rafael.junqueira.sant theoretically yes, if your URL rewriting gets borked and php file could be directly executed |
# |
Dec 12th 2017, 14:43 |
rafael.junqueira.sant |
Greetings. In shared hosting, is it a considerable flaw to put all cakephp files in public_html? Can it be exploited? |
# |
Dec 12th 2017, 14:41 |
admad |
that automatically gonna happen if they are taken out of webroot :slightly_smiling_face: |
# |
Dec 12th 2017, 14:40 |
neon1024 |
..and ensure that your web server is passing file requests to PHP |
# |
Dec 12th 2017, 14:39 |
hughbertd |
Cool, I’ll give that a look, thanks @admad |
# |
Dec 12th 2017, 14:39 |
admad |
You can then check how the `AssetMiddleware` serves files for example. |