Skip to content
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

delete-stray-images.php is totally broken as of c483e12 #350

Closed
ctrlcctrlv opened this issue Sep 22, 2019 · 6 comments
Closed

delete-stray-images.php is totally broken as of c483e12 #350

ctrlcctrlv opened this issue Sep 22, 2019 · 6 comments

Comments

@ctrlcctrlv
Copy link
Member

ctrlcctrlv commented Sep 22, 2019

Apparently we forgot about this script when we added multi image posting...in 2013.

c483e12

No one noticed until @tunayuyar opened #345, which is an as yet unknown bug probably in post.php, where it calls clean($pid).

I'm not going to be fixing this (for free anyway), but am opening an issue so people are aware.

@Couchy
Copy link

Couchy commented Nov 4, 2019

That fix prevents a lot of orphaned files, but I still get them regularly for whatever reason, mostly with multi-image uploads. I threw together a script to move the orphan files that you can try.
orphan.zip

@tunayuyar
Copy link

@Couchy i tried this but doesnt seem to be working, having problem moving files to orphan directory, could you check that again?

@Couchy
Copy link

Couchy commented Jan 23, 2023

@tunayuyar Did you change the variables at the start with your root directory, database, and credentials? I can't test this because I don't use vichan anymore.

@tunayuyar
Copy link

@Couchy yes i did. if i run it from browser it shows just 1 image moved and gives link(which not moved to orphan directory)

if i run it through cli, see below




Board: /b/
PHP Warning: Undefined property: stdClass::$thumb in /orphan.php on line 33


Source files1560509946012.jpg
PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / string in /orphan.php:49
Stack trace:
#0 {main}
thrown in /orphan.php on line 49

@Couchy
Copy link

Couchy commented Jan 23, 2023

@tunayuyar Ah, in the rename calls, put quotes around the second argument. Not sure how that happened.

@tunayuyar
Copy link

@Couchy i think that worked. Also line 58 thumbnails was missing the quotes around second argument too, that fixed everything.

ctrlcctrlv added a commit that referenced this issue Mar 23, 2023
Close #543.
Close #544.
Close #543.
Close #417.
Close #384.
Close #351.
Close #350.
Close #345.
Close #327.
Close #188.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@Couchy @ctrlcctrlv @tunayuyar and others