heiglandreas
Repos
225
Followers
200
Following
34

Provide TeX-Hyphenation to PHP

49
13

Check for holidays - locale-aware

23
8

LDAP-Authentication for WordPress

57
39

A PHP-Wrapper around the Ghostscript application

29
12

Implements the X-Clacks-Overhead Header as PSR7 middleware

4
0

Create a diff from 2 JUnit-files

26
4

Events

issue comment
Float handling changes since 8.0 - on purpose?

Quoting from php.net/manual/en/migration80.incompatible.php:

var_dump() and debug_zval_dump() will now print floating-point numbers using serialize_precision rather than precision. In a default configuration, this means that floating-point numbers are now printed with full accuracy by these debugging functions.

This is not a bug.

Besides: As per https://www.php.net/float the warning is rather clear.

So never trust floating number results to the last digit, and do not compare floating point numbers directly for equality. If higher precision is necessary, the arbitrary precision math functions and gmp functions are available.

Created at 5 days ago
issue comment
Need help with discrepancy found in decoding ULID byte strings

Without having dug too deeply into it: the whole thing has 130 bits but you only need 128. So the first two bits should be ignored? But you are using the first 48 bits (0 through 47). Shouldn't you use the first 48 "usable" bits though (2 through 49)?

Created at 1 week ago
issue comment
Increase maximum size of an uploaded file to 50Mbyte

And remember that the post_max_size should be bigger than the upload_max_filesize...

Created at 2 weeks ago
opened issue
Move from Symfony security to Roave Scurity

Would it make sense to move from Symfony security to Roave security?

Created at 3 weeks ago
opened issue
Move CI from Travis to GithubActions

Currently the CI-pipeline runs via travis, which by now can be considered as dead.

We should move to something else, possibly GitHub actions as the code is already hosted on github.

Created at 3 weeks ago

Fix StyleCI issues

Created at 3 weeks ago
issue comment
Tweaks for adding hosts to events via UI

I'd leave dropping the Symfony security scanner (replacing with the Roave one?) to a separate PR. Along with replacing travis with GithubActions...

Created at 3 weeks ago
pull request opened
Provide UI to manage hosts of an event.

This allows to add multiple hosts to an event via the UI. All of the hosts have the same privileges! There is no specific validation step as adding or removing a host is super easy.

This fixes #588

Created at 3 weeks ago
pull request opened
Tweaks for adding hosts to events via UI

This commit contains some minor tweaks to make handling multiple hosts via the UI easier.

It mainly disallows adding one host multiple times.

Created at 3 weeks ago
create branch
heiglandreas create branch addHostsApi
Created at 3 weeks ago
heiglandreas create branch addMultipleHosts
Created at 3 weeks ago
Remove Ghostscript::setGsPath() in Ghostscript.php

Email was confirmed. Please also check your spam folder

Created at 3 weeks ago
Remove Ghostscript::setGsPath() in Ghostscript.php

Where can I find the email so we can talk?

See end of https://github.com/heiglandreas/Org_Heigl_Ghostscript/issues/4#issuecomment-1231878952 :wink:

Created at 3 weeks ago
Remove Ghostscript::setGsPath() in Ghostscript.php

Looks like that is something with laravel. Using @tempnam instead of tempnam seems to fix the issue... See for example https://github.com/Glavin001/atom-beautify/issues/1108

Oh. And tempnam requires the arguments the other way round: So

$filename = tempnam(sys_get_temp_dir(), 'pdf');
Created at 3 weeks ago
Remove Ghostscript::setGsPath() in Ghostscript.php

If that doesn't solve the issue, drop me an email at andreas AT heigl.org

Created at 3 weeks ago
Remove Ghostscript::setGsPath() in Ghostscript.php

Ghostscript only runs on local files! So the file needs to be available on the machine that runs the script. If - like in your case - the file is on AWS you need to create a local copy.

Created at 3 weeks ago
Remove Ghostscript::setGsPath() in Ghostscript.php

The string provided in the method setGsPath is the path to the Ghostscript executable.

As you seem to have Ghostscript in the non-standard location /opt/ghostpdl-9.53.3/bin/gs, exactly this path needs to be provided.

So your script should look as follows:


// First we need to create a local file from the remote one.
// Check out the AWS SDK, there are possibly better solutions to that than this ;-)
$filename = tempnam('pdf', sys_get_temp_dir());

$localHandle = fopen($filename, "w");
$remoteHandle = fopen('https://appbk.s3.sa-east-1.amazonaws.com/2022/08/3683f47a-5712-4ac6-802d-0ae258c43398.pdf', 'r');
if (FALSE === $remoteHandle) {
    exit("Failed to open stream to URL");
}

while (!feof($remoteHandle)) {
    fwrite($localHandle, fread($handle, 8192));
}
fclose($remoteHandle);
fclose($localHandle);

// Run the Lib
$gs = new Ghostscript();
Ghostscript::setGsPath('/opt/ghostpdl-9.53.3/bin/gs');
$gs->setDevice('jpeg')
   ->setInputFile($filename)
   ->setResolution(150)
   ->setTextAntiAliasing(Ghostscript::ANTIALIASING_HIGH)
   ->setOutputFile($guid . '%d');

if (true === $gs->render()) {
    for ($i = 1; $i <= $paginas; $i++) {
        $arquivoImagem[] = ['nome' => $guid . $i, 'diretorio' => $paginas_path . '/', 'extensao' => $extensao, 'pagina' => $i];
    }
    return $arquivoImagem;
}
// As you are returning in the `if`-part, you do not need the `else` ;-)
return false;
Created at 3 weeks ago
Remove Ghostscript::setGsPath() in Ghostscript.php

Let me dig into that....

Created at 3 weeks ago
opened issue
As an event host I would like to add other hosts

Currently adding and removing additional hosts for an event is possible via the API using the following authenticated cURL request:

curl --location --request GET 'http://api.joind.in/v2.1/events/:eventId/hosts' \
--header 'Authorization: Bearer {your-bearer-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "host_name": "{joindin-username-of-additional-host}"
}'

See the authentication how-to to see how to get {your-bearer-token}

Created at 1 month ago
issue comment
Fully ignore invalid lines

Thanks!

Created at 1 month ago
issue comment
ldap timeouts not enforced for ldaps protocol

And BTW: You are not testing the actual bind operation to time out but the tls connection to time out. Otherwise you'd need an LDAP-server to terminate the bind (the login credential verification and LDAP session creation process) process. Which doesn't work by simulating a disruption to any traffic on port 636.

Created at 1 month ago
issue comment
ldap timeouts not enforced for ldaps protocol

And did you try the recommended solution from the referenced bug?

Created at 1 month ago
issue comment
Use `Clock` interface for PSR-6 operations

To me that's fine as the clocks now will make sure that the production code uses the right time

Created at 1 month ago
issue comment
Modernize top half of Thanks page

I wouldn't worry too much about the size on mobile.

I'm more asking myself whether there is a possibility to randomize an unordered list via CSS. So that not always the same sponsors are "above the fold". Or at the top of the list on mobile.

Created at 1 month ago
issue comment
Remove PHPDI Support

Do I see that right that due to this issue we currently do not have a way to use the mezzio-skeleton to install a sample application with PHP8.0 or PHP8.1?

Created at 1 month ago
issue comment
Add backslash to the ReturnTypeWillChange annotation to fix a new php 8.1 compatibility issue

See https://windows.php.net/downloads/releases/archives/ for older releases

Created at 1 month ago
issue comment
Add backslash to the ReturnTypeWillChange annotation to fix a new php 8.1 compatibility issue

So far I wasn't able to reproduce it with the snippet that Marco provided via 3v4l.org on a dockerized build of 8.1.8

PHP 8.1.8 (cli) (built: Jul 12 2022 08:28:43) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.8, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.8, Copyright (c), by Zend Technologies
    with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
Created at 1 month ago
issue comment
Add backslash to the ReturnTypeWillChange annotation to fix a new php 8.1 compatibility issue

Which version of PHP are you encountering this issue with? Can you provide the output of php -v? Thanks.

PHP 8.1.8 (cli) (built: Jul 5 2022 23:03:41) (NTS Visual C++ 2019 x86) Copyright (c) The PHP Group Zend Engine v4.1.8, Copyright (c) Zend Technologies with Xdebug v3.1.3, Copyright (c) 2002-2022, by Derick Rethans

Is that a Windows-build? Might that be the issue?

Created at 1 month ago