-
-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pihole -a -t fails since update to 5.1 #1497
Comments
Oh, i have found a hint to the Bug on php.net: https://www.php.net/manual/de/phardata.compress.php#118891 Perhaps, this is the same here? What about to replace the dots in the hostname withe underscores? |
Ok, I have tested my idea This fixes it: $hostname = gethostname() ? str_replace(".","_",gethostname())."-" : ""; But I‘m wondering about the change because of the bash script the filename which generated in the php script was not used, so the hostename addon reaches never the backup file name which was stored by the shell script:
|
When looking at #1503, I thought @PromoFaux's most recent changes to Teleporter (#1417) were not causing this, however, they actually do.
It likely was forgotten that the CLI method exists. It was buried in my memory as well. That's the danger of adding more and more features only a few use. We forget about them. Usually this is not harmful, but it can result in such things. |
This issue has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/teleporter-backup-error-500/35883/18 |
No, not relevant. And I think the solution is (no dots in the filename excepted the extensions dot): #1497 (comment) |
I'm a little confused by all the tags being changed, has this issue been fixed/patched and if so how can I apply it to my current install? Thanks. |
The current active tags are:
This will be fixed in the next version of the web interface that gets released. |
Thanks, but got impatient and patched the file myself - confirmed now all working again, thanks |
I just updated to the latest test release of 5.2 (release/v5.2, vDev-905994e, because the service kept dying) and the manual patch I applied for this issue disappeared. Is this fix really going to get included in the next release because it hasn't made it to the test one yet, at least for me. |
This has been fixed a long time ago. |
In raising this issue, I confirm the following:
{please fill the checkboxes, e.g: [X]}
How familiar are you with the the source code relevant to this issue?:
{Replace this with a number from 1 to 10. 1 being not familiar, and 10 being very familiar}
Expected behavior:
A new backup file without errors.
Actual behavior:
Error after start: pihole -a -t
PHP Warning: filesize(): stat failed for /tmp/pi-hole-pihole.fritz.box-teleporter_2020-07-16_18-36-06.tar.gz in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 581
PHP Warning: readfile(/tmp/pi-hole-pihole.fritz.box-teleporter_2020-07-16_18-36-06.tar.gz): failed to open stream: No such file or directory in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 585
PHP Warning: unlink(/tmp/pi-hole-pihole.fritz.box-teleporter_2020-07-16_18-36-06.tar.gz): No such file or directory in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 587
Steps to reproduce:
run: pihole -a -t
In Line $archive->compress(Phar::GZ); // Creates a gziped copy the command seam to create a file with the name: /tmp/pi-hole-pihole.tar.gz
If I comment out the unlink command: unlink($archive_file_name); // Unlink original tar file as it is not needed anymore
I get:
/tmp/pi-hole-pihole.fritz.box-teleporter_2020-07-16_19-17-35.tar
/tmp/pi-hole-pihole.tar.gz
It's look like that the $archive->compress(Phar::GZ) use a wrong name for the File while gzipping? But I don't know why.
PHP Version: PHP 7.0.33-0+deb9u8 (cli) (built: Jul 5 2020 06:34:50) ( NTS ) on
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
The text was updated successfully, but these errors were encountered: