| 4 Oct 2022 |
Pol | That would be an amazing improvement | 20:36:49 |
Pol | So we can get rid of the cronjob | 20:36:59 |
Pol | I've already looked for that | 20:37:09 |
Pol | I haven't found anything | 20:37:12 |
Pol | Let me know if you have found something, I'm highly interested | 20:38:51 |
| 12 Oct 2022 |
Jan Tojnar | gah, I am having a weird issue where DOMDocument, where loadHTML does not do anything, with no errors reported. But only when running the script from Apache, it works completely fine on CLI with the same PHP derivation and php.ini. Tried both 8.0 and 8.1. | 13:20:47 |
Jan Tojnar | The following script, in case someone wants to try to reproduce it:
<?php
// phpinfo();
// die;
var_dump(libxml_use_internal_errors(true));
$domDocument = new \DOMDocument();
$html = <<<HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Test</title>
</head>
<body>
Test.
</body>
</html>
HTML;
$domDocument->loadHTML($html);
var_dump($domDocument->textContent);
var_dump(libxml_get_errors());
| 13:23:40 |
Pol | trying | 19:58:38 |
Pol | When it comes to DomDocument, I use this construction: https://github.com/ecphp/cas-lib/blob/master/src/Utils/Response.php#L63 | 20:00:31 |
Pol | Maybe you should try and see if it fails | 20:00:41 |
Jan Tojnar | Pol: should not the restore_error_handler(); be in a finally block, or otherwise it will never run? | 21:04:14 |
Jan Tojnar | * Pol: should not the restore_error_handler(); be in a finally block, or otherwise it will never run? | 21:04:19 |
Pol | Good question, will check tomorrow, I left the pc | 21:06:05 |
Jan Tojnar | I had to introduce a similar fix in https://github.com/ddeboer/transcoder/pull/5 | 21:06:18 |
Pol | I remember I got inspired by symfony. | 21:07:20 |
Jan Tojnar | I do not think the custom error handler will help here, I already have display_errors=1 and error_reporting=E_ALL | 21:09:24 |
Jan Tojnar | Looks like loadXML works, though, (since I made the sample HTML document a well-formed XML document) | 21:11:20 |
Jan Tojnar | so it looks like only HTML loading is busted, an only in Apache. Will try to switch to php-fpm next | 21:12:11 |
Pol | Curious | 21:13:10 |
Pol | I will query google tomorrow. Off to bed now | 21:13:33 |
Pol | Redacted or Malformed Event | 21:13:49 |
Pol | Who's coming to NixCon btw? | 21:14:12 |
| 13 Oct 2022 |
Pol | Jan Tojnar: https://github.com/fossar/nix-phps/pull/157 | 06:53:46 |
Jan Tojnar | looks like the domdocument error might be due to a regression in libxml2. It still makes no sense that is works in a CLI, though | 07:01:16 |
Pol | Ah !) | 07:55:50 |
Pol | * Ah ! | 07:55:51 |
| 15 Oct 2022 |
| underpantsgnome! changed their display name from underpantsgnome to underpantsgnome!. | 00:32:17 |
| etu joined the room. | 10:15:19 |
| etu left the room. | 11:00:05 |
| 20 Oct 2022 |
Pol | NixCon today ? | 12:04:11 |