!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

76 Members
A room for PHP developers running on Nix22 Servers

Load older messages


SenderMessageTime
4 Oct 2022
@drupol:matrix.orgPolThat would be an amazing improvement20:36:49
@drupol:matrix.orgPolSo we can get rid of the cronjob20:36:59
@drupol:matrix.orgPolI've already looked for that20:37:09
@drupol:matrix.orgPolI haven't found anything20:37:12
@drupol:matrix.orgPolLet me know if you have found something, I'm highly interested20:38:51
12 Oct 2022
@jtojnar:matrix.orgJan 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
@jtojnar:matrix.orgJan 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
@drupol:matrix.orgPoltrying19:58:38
@drupol:matrix.orgPolWhen it comes to DomDocument, I use this construction: https://github.com/ecphp/cas-lib/blob/master/src/Utils/Response.php#L6320:00:31
@drupol:matrix.orgPolMaybe you should try and see if it fails20:00:41
@jtojnar:matrix.orgJan Tojnar Pol: should not the restore_error_handler(); be in a finally block, or otherwise it will never run? 21:04:14
@jtojnar:matrix.orgJan Tojnar * Pol: should not the restore_error_handler(); be in a finally block, or otherwise it will never run? 21:04:19
@drupol:matrix.orgPolGood question, will check tomorrow, I left the pc21:06:05
@jtojnar:matrix.orgJan TojnarI had to introduce a similar fix in https://github.com/ddeboer/transcoder/pull/521:06:18
@drupol:matrix.orgPolI remember I got inspired by symfony.21:07:20
@jtojnar:matrix.orgJan 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
@jtojnar:matrix.orgJan Tojnar Looks like loadXML works, though, (since I made the sample HTML document a well-formed XML document) 21:11:20
@jtojnar:matrix.orgJan Tojnarso it looks like only HTML loading is busted, an only in Apache. Will try to switch to php-fpm next21:12:11
@drupol:matrix.orgPolCurious21:13:10
@drupol:matrix.orgPolI will query google tomorrow. Off to bed now 21:13:33
@drupol:matrix.orgPolRedacted or Malformed Event21:13:49
@drupol:matrix.orgPolWho's coming to NixCon btw?21:14:12
13 Oct 2022
@drupol:matrix.orgPol Jan Tojnar: https://github.com/fossar/nix-phps/pull/157 06:53:46
@jtojnar:matrix.orgJan Tojnarlooks like the domdocument error might be due to a regression in libxml2. It still makes no sense that is works in a CLI, though07:01:16
@drupol:matrix.orgPolAh !)07:55:50
@drupol:matrix.orgPol * Ah !07:55:51
15 Oct 2022
@tinybronca:sibnsk.netunderpantsgnome! changed their display name from underpantsgnome to underpantsgnome!.00:32:17
@etu:failar.nuetu joined the room.10:15:19
@etu:semi.socialetu left the room.11:00:05
20 Oct 2022
@drupol:matrix.orgPolNixCon today ?12:04:11

There are no newer messages yet.


Back to Room ListRoom Version: 6