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

Thumbnail creation script #2

Open
paesc opened this issue Oct 8, 2017 · 7 comments
Open

Thumbnail creation script #2

paesc opened this issue Oct 8, 2017 · 7 comments

Comments

@paesc
Copy link

paesc commented Oct 8, 2017

Hi Kris

after having timeout issues with thumbnail creation after uploading many pictures I added the following script to the nano_photo_provider: thumbnailcreator.php.zip

It based on your plugin and largely uses the nano_photos_provider2.cfg. It can be run via crontab at any intervall.

It only need two more settings in the nano_photos_provider2.cfg:
[thumbnails]
thumbnailHeight="200"
thumbnailWidth="auto"

Feel free to include the script in the Photo_provider if you find this useful.

@imoxx
Copy link

imoxx commented Jan 10, 2018

Hello,

I think I have the same problem as you. I added a lot of photos and I got errors all the time. Also I'm wondering why the nano_photos_provider2.php copies all images to the thumdnail folder too. When I it local sometimes it works but when I copy it to my webspace it will be crashed all the time. Maybe 4 or 5 photos works but not more.

how to the thumbnailcreator? only add the two thins to the cfg does not work. Also I'm wondering how should work because you have to tell the nano_photos_provider2.php to use script right?

Could someone help to get it work?

Cheers
Imox

@paesc
Copy link
Author

paesc commented Jan 14, 2018

Hi Imox

I run the script as a cronjob every 15 minutes independent from the photos_provider2 .

Like this, I am sure that lates 15minutes after the last upload the thumbnails are created.

just add the following line to your etc/crontab :

*/15 * * * * user php "path to thumbnailcreator.php" >/dev/null 2>&1

Hope it works out like this.

Paescsuper

@imoxx
Copy link

imoxx commented Feb 26, 2018

Hi Paescsuper,

thanks for the instructions but I mean how to use the script. I put it in the same folder "nano_photos_provider2" where also the nano_photos_provider2.cfg and nano_photos_provider2.php located and run the script but I got errors:

Fatal error: Uncaught Error: Call to undefined function debug_to_console() in nano_photos_provider2/thumbnailcreator.php:13
Stack trace:
#0 {main}
  thrown in nano_photos_provider2/thumbnailcreator.php on line 13

Maybe could you exactly explain me how do you use it?

Thanks a lot
Imox

@paesc
Copy link
Author

paesc commented Mar 10, 2018

Hi Imox

I don‘t have access to the script now, but looks like theres an error in the thumbnailscript in line 13. Probably a path you‘ll need to adjust?

Did you anmend the settings as descibet above?

Cheers

paescsuper

coenvl added a commit to coenvl/nano_photos_provider2 that referenced this issue Oct 23, 2018
@osturnus
Copy link

Hi!

I'm migrating my gallery from flickr to webhosting space and I runned into this issue. It seems, that webhosting is too slow to generate thumbnails on-the-fly. I would like to run this script but first there was issue with "auto" width (non-number on line 52) which I solved be setting it to 200 too.
Now, few thumbnails are generated but than fatal error occurs (running out of memory)...

Is there anything new about this issue? Otherwise, provider2 seems to be rather limited in use.
And other question: is result of this script the same as if I would hit F5 on gallery page until all thumbnails are generated? (in other words - does it solve the issue with not-yet-generated thumbnails?)

Thanks!
I like nanogallery a lot, but moving away from flickr (guess why;) happens to be unexpectedly difficult...

@supersexy
Copy link

supersexy commented Sep 17, 2019

Are there any plans to add this script to the distribution or add some command line functionality to nano_photos_provider2?

vm75 pushed a commit to vm75/nano_photos_provider2 that referenced this issue Feb 8, 2021
@BillTheGoat
Copy link

An easy workaround to this is to add ini_set('max_execution_time', '6000'); whenever you trigger an update, before rewinddir( $dh ); - on approx line 215 in nano_photos_provider2.json.class.php. What is missing with this workaround is a recursive update through the various albums. But this script did not work well for me since I still wound up timing out after running it. Your php setup might need tweaking to allow long timeouts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants