# |
Dec 19th 2019, 19:59 |
admad |
if you are using cake 4 you need `initialize(): void`, though what you have should throw and error not crash php |
# |
Dec 19th 2019, 19:46 |
japerlman |
putting it right under class xxxxController extends AppController{ |
# |
Dec 19th 2019, 19:45 |
japerlman |
``` public function initialize() { parent::initialize(); $this->loadComponent('RequestHandler'); }``` |
# |
Dec 19th 2019, 19:45 |
japerlman |
Anyone have any idea why the below snippet would crash the PHP service on my device? It's straight from the cake book. |
# |
Dec 19th 2019, 18:41 |
alexmax |
(it's a dev site, so I can blow it up if I need to) |
# |
Dec 19th 2019, 18:41 |
alexmax |
Is there some way I can log the _reason_ for why authentication invalidates a session? |
# |
Dec 19th 2019, 18:40 |
alexmax |
I'm running a Cake 3.5 site and am running into some mysterious instances where sessions just seem to....die randomly, and users are getting logged out of auth-component-protected pages. |
# |
Dec 19th 2019, 18:13 |
noel |
huzzah! |
# |
Dec 19th 2019, 17:46 |
noel |
ok I suppose I need to figure out where PHP is logging errors to then. |
# |
Dec 19th 2019, 17:44 |
admad |
cake and log shit and it didnt even get past the bootstrapping stage |
# |
Dec 19th 2019, 17:43 |
noel |
Yeah.. phew.. ok I found the error. It's a syntax error I made recently in bootstrap.php but wtf am I not getting any logged errors – neither to screen nor to cake logs nor to apache logs... just a white-out. |
# |
Dec 19th 2019, 17:37 |
savant |
are you running the right php version? |
# |
Dec 19th 2019, 17:23 |
noel |
no errors logged by apache either |
# |
Dec 19th 2019, 17:21 |
noel |
it's not making it as far as `bootstrap.php` even... I put a die command in there. Seems to make it into `webroot/index.php` and then chokes on `emit($server->run());` |
# |
Dec 19th 2019, 17:17 |
noel |
just the folder |
# |
Dec 19th 2019, 17:17 |
noel |
the log files don't even exist. |
# |
Dec 19th 2019, 17:17 |
noel |
@savant nope... logs are still empty.. even with debug on. |
# |
Dec 19th 2019, 17:15 |
savant |
just comment out that code then |
# |
Dec 19th 2019, 17:14 |
noel |
nope... can't use debug because debugKit isn't installed because `composer install no-dev` |
# |
Dec 19th 2019, 17:14 |
japerlman |
I'm having trouble with CakePdf on Cake 3, it doesn't appear the plugin is loading, I have '$this->addPlugin('CakePdf', ['bootstrap' => true]);' in my Application.php and I've tried the way the documentation says to load it with 'Plugin::load('CakePdf', ['bootstrap' => true]);' in bootstrap.php |
# |
Dec 19th 2019, 17:14 |
admad |
RHEL and derivates love carrying on with outdated libs in name of stability |
# |
Dec 19th 2019, 17:14 |
savant |
@noel turn on debug mode, maybe it’ll complain louder? |
# |
Dec 19th 2019, 17:13 |
savant |
oh boy selinux is great |
# |
Dec 19th 2019, 17:10 |
noel |
LOL I saw a cake error, fixed that and now I just get a white screen and no logs of any kind :S |
# |
Dec 19th 2019, 17:10 |
noel |
I do have a choice... but I'm so used to Centos and all my servers run that... changing is also hard. |
# |
Dec 19th 2019, 17:01 |
admad |
if you have a choice/say on it, switch to Debian :) |
# |
Dec 19th 2019, 16:24 |
noel |
Aye.. I've done it before.. just rusty and they've gone and upgraded everything in the interim. |
# |
Dec 19th 2019, 16:21 |
alexmax |
And I think on balance, the juice is worth the squeeze. |
# |
Dec 19th 2019, 16:21 |
alexmax |
It's just another thing you gotta learn. |
# |
Dec 19th 2019, 16:20 |
alexmax |
It _is_ possible to use in production without tearing your hair out, and I can say this with personal experience backing it up. |
# |
Dec 19th 2019, 16:19 |
alexmax |
Okay. Keep that manual page handy though, because SELinux might come back to bite you. |
# |
Dec 19th 2019, 16:19 |
noel |
I don't think it's that... if it was echoing my php code via the web it can't be a security issue. |
# |
Dec 19th 2019, 16:18 |
alexmax |
Most of the labels are irrelevant for your use case, as they apply only to packages that are supplied by the OS. |
# |
Dec 19th 2019, 16:17 |
alexmax |
it has a complete list of labels |
# |
Dec 19th 2019, 16:17 |
alexmax |
the online one is accurate |
# |
Dec 19th 2019, 16:17 |
noel |
hmm.. `no manual entry for httpd_selinux` |
# |
Dec 19th 2019, 16:17 |
alexmax |
https://linux.die.net/man/8/httpd_selinux |
# |
Dec 19th 2019, 16:17 |
alexmax |
as is `man httpd_selinux` |
# |
Dec 19th 2019, 16:17 |
noel |
What would I be looking for? |
# |
Dec 19th 2019, 16:16 |
noel |
I am on Centos 8 |
# |
Dec 19th 2019, 16:16 |
alexmax |
`ls -lZ` ought to be helpful |