Thursday, June 13, 2013

PHP Error Reporting in Plesk 10.x

Seems like I always run into some new bullshit every time I upgrade servers, control panels or a new version of PHP. Nothing ever works as expected, it's never just a simple upgrade no matter how much the marketing worms say it's compatible with the previous version, it's not.

I know a lot of people have this same fucking problem because Plesk is a POS (piece of shit) so I thought I'd make sure to post the same information here a) so I don't forget it and b) so it's easier for others to find because it took me a while to locate this tidbit.

Sometimes, if you're lucky, you can find answers like this on StackOverflow except the fucking moderators always close the thread before the actual answer is posted with some bullshit excuse like it's "too narrow in focus to be of general interest" when in fact there are millions of Plesk hosting accounts out there but I'm not an all-knowing StackOverflow moderator so what the fuck do I know.

Anyway, after digging and digging I finally found a fucking answer...

If you can't get PHP to display errors in Plesk your need to set a custom error reporting value of "6135" in the PHP permissions tab for your domain in the Plesk control panel. Also, set the option "display errors" to ON.

There you go, now you should be able to control the error display in your script with error_reporting(E_ALL) to show errors or error_reporting(0); to turn it off.

Still don't have a solution to why flush() doesn't work as every solution to the problem doesn't solve it and I've tried everything. It's not just PHP either as Perl isn't able to flush() either so it's definitely something in the Apache config fucking it up but that's another post when I figure it out.


Another silly surprise I got was older versions of PHP 5 allowed trailing spaces to be present in IP2LONG() so "127.0.0.1 " would actually work. In PHP 5.4 it just blows a fucking gasket. Why in the fuck wouldn't a number conversion function just trim() the goddamn string in the fucking function instead of forcing me to do it and bloat the goddamn code? Seems like there's no harm allowing IP2LONG() to trim() preceding or trailing spaces but who am I to wonder why it's better to leave more little potential ways for the code to bomb for no fucking reason and why they changed it is a mystery to me as it certainly wasn't broken before but it was obviously a bug up someone's ass so they made the change and the one place I forgot to add a trim() brought the goddamn software to it's knees.

 I know shit happens but why do I seem to get more than my fair share of the shit?


Spread it around, let others have some shit too, don't save it all for me.

1 comment:

Colin said...

why flush() doesn't work as every solution to the problem doesn't solve it and I've tried everything

Mod_deflate buffers the entire response before sending it to the client.