I recently got this error (this happened with php 7.4 afaik).
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in include/template.class.php:1024
This is because crc32 can return negative integers. According to php documentation, this happens a lot with 32 bit systems, and sometimes with 64 bit systems.
I changed the base_convert call to base_convert(hash("crc32b", $compile_id), 16, 36), and this fixes the problem. Unless I'm mistaken this should be equivalent to the current code.
Sorry I'm too lazy too submit a PR for a one-liner.
Hello,
I recently got this error (this happened with php 7.4 afaik).
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in include/template.class.php:1024
This is because crc32 can return negative integers. According to php documentation, this happens a lot with 32 bit systems, and sometimes with 64 bit systems.
I changed the `base_convert` call to `base_convert(hash("crc32b", $compile_id), 16, 36)`, and this fixes the problem. Unless I'm mistaken this should be equivalent to the current code.
Sorry I'm too lazy too submit a PR for a one-liner.
<!-- github-sync-id:828245606 -->
I'm getting four deprecated messages at the top of the web page when I first go to my piwigo site:
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in .../piwigo/include/template.class.php on line 215
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in .../piwigo/include/template.class.php on line 1024
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in .../piwigo/include/template.class.php on line 1024
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in .../piwigo/include/template.class.php on line 1899
I'm in the process of upgrading from debian stretch to bullseye on a 32 bit pentium 4 machine. I've got both debian versions installed in a multiboot config. I haven't upgraded to piwigo 12 yet. From what I can tell looking at the source, commits and this issue, these haven't been fixed in 12. I'll go back to stretch and upgrade to piwigo 12, WHEN/IF the plugins I use are supported on 12. Then I'll periodically check bullseye when there are new piwigo releases. But, if there are patches to test, I'd like to help. Ideally (for me) they would be backward compatible with debian stretch because I'm using a partition shared by my bullseye and stretch installs for piwigo.
I'm getting four deprecated messages at the top of the web page when I first go to my piwigo site:
- Deprecated: Invalid characters passed for attempted conversion, these have been ignored in .../piwigo/include/template.class.php on line 215
- Deprecated: Invalid characters passed for attempted conversion, these have been ignored in .../piwigo/include/template.class.php on line 1024
- Deprecated: Invalid characters passed for attempted conversion, these have been ignored in .../piwigo/include/template.class.php on line 1024
- Deprecated: Invalid characters passed for attempted conversion, these have been ignored in .../piwigo/include/template.class.php on line 1899
I'm in the process of upgrading from debian stretch to bullseye on a 32 bit pentium 4 machine. I've got both debian versions installed in a multiboot config. I haven't upgraded to piwigo 12 yet. From what I can tell looking at the source, commits and this issue, these haven't been fixed in 12. I'll go back to stretch and upgrade to piwigo 12, WHEN/IF the plugins I use are supported on 12. Then I'll periodically check bullseye when there are new piwigo releases. But, if there are patches to test, I'd like to help. Ideally (for me) they would be backward compatible with debian stretch because I'm using a partition shared by my bullseye and stretch installs for piwigo.
<!-- github-comment-id:968156745 -->
I am having this same issue on the raspbian bullseye, with raspberry pi 4.
@ludo-c , since you added a fix on your fork, would it be possible to issue a pull request here?
I am having this same issue on the raspbian bullseye, with raspberry pi 4.
@ludo-c , since you added a fix on your fork, would it be possible to issue a pull request here?
<!-- github-comment-id:1003764761 -->
I am having this same issue on the raspbian bullseye, with raspberry pi 4. @ludo-c , since you added a fix on your fork, would it be possible to issue a pull request here?
Tested on Raspberry Pi 4 / 64 bits; issue is not present for me.
> I am having this same issue on the raspbian bullseye, with raspberry pi 4. @ludo-c , since you added a fix on your fork, would it be possible to issue a pull request here?
@alexmogavero: Issue is related to 32bits processors. That mean for 32 bits operating systems. I bet you raspberry pi 4 run in 32 bits mode, not in 64 bits. Try to install 64 bits version: https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
Tested on Raspberry Pi 4 / 64 bits; issue is not present for me.
<!-- github-comment-id:1030416345 -->
Tested on Raspberry Pi 4 / 64 bits; issue is not present for me.
So what's your point? We know it's a 32 bit issue. Until recently, there wasn't an official 64 bit version of raspberry pi os, and if you want to stream drm content, you still have to install the 32 bit version of chromium. Plus, rpi4 isn't the only hardware where one would want to run piwigo on a 32 bit OS. I have an old pentium 4 desktop computer where I'm running piwigo 11.5. I would like to upgrade to piwigo 12, but if the project isn't willing to support 32 bit OSs by accepting ludo-c's PR, then maybe I need to rethink my commitment to piwigo.
> Tested on Raspberry Pi 4 / 64 bits; issue is not present for me.
So what's your point? We know it's a 32 bit issue. Until recently, there wasn't an official 64 bit version of raspberry pi os, and if you want to stream drm content, you still have to install the 32 bit version of chromium. Plus, rpi4 isn't the only hardware where one would want to run piwigo on a 32 bit OS. I have an old pentium 4 desktop computer where I'm running piwigo 11.5. I would like to upgrade to piwigo 12, but if the project isn't willing to support 32 bit OSs by accepting ludo-c's PR, then maybe I need to rethink my commitment to piwigo.
<!-- github-comment-id:1030519661 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hello,
I recently got this error (this happened with php 7.4 afaik).
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in include/template.class.php:1024
This is because crc32 can return negative integers. According to php documentation, this happens a lot with 32 bit systems, and sometimes with 64 bit systems.
I changed the
base_convertcall tobase_convert(hash("crc32b", $compile_id), 16, 36), and this fixes the problem. Unless I'm mistaken this should be equivalent to the current code.Sorry I'm too lazy too submit a PR for a one-liner.
There are other calls to crc32 which should be fixed as well.
Will including this cause an issue with 64 Bit OS's?
I'm getting four deprecated messages at the top of the web page when I first go to my piwigo site:
I'm in the process of upgrading from debian stretch to bullseye on a 32 bit pentium 4 machine. I've got both debian versions installed in a multiboot config. I haven't upgraded to piwigo 12 yet. From what I can tell looking at the source, commits and this issue, these haven't been fixed in 12. I'll go back to stretch and upgrade to piwigo 12, WHEN/IF the plugins I use are supported on 12. Then I'll periodically check bullseye when there are new piwigo releases. But, if there are patches to test, I'd like to help. Ideally (for me) they would be backward compatible with debian stretch because I'm using a partition shared by my bullseye and stretch installs for piwigo.
I am having this same issue on the raspbian bullseye, with raspberry pi 4.
@ludo-c , since you added a fix on your fork, would it be possible to issue a pull request here?
@alexmogavero Hello,
A PR is already opened : https://github.com/Piwigo/Piwigo/pull/1420
@alexmogavero: Issue is related to 32bits processors. That mean for 32 bits operating systems. I bet you raspberry pi 4 run in 32 bits mode, not in 64 bits. Try to install 64 bits version: https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
Tested on Raspberry Pi 4 / 64 bits; issue is not present for me.
So what's your point? We know it's a 32 bit issue. Until recently, there wasn't an official 64 bit version of raspberry pi os, and if you want to stream drm content, you still have to install the 32 bit version of chromium. Plus, rpi4 isn't the only hardware where one would want to run piwigo on a 32 bit OS. I have an old pentium 4 desktop computer where I'm running piwigo 11.5. I would like to upgrade to piwigo 12, but if the project isn't willing to support 32 bit OSs by accepting ludo-c's PR, then maybe I need to rethink my commitment to piwigo.
ive got the same issue
Thank you all for your report and clean solution. Merged.
Any chance this commit can be backported to 12.x?