Keyword

k2 rebuild image cache

  • Leandro Nischida
  • Leandro Nischida's Avatar Topic Author
  • Offline
  • New Member
More
4 years 8 months ago #176801 by Leandro Nischida
k2 rebuild image cache was created by Leandro Nischida
I'm using the script to reconstruct the K2 images that were deleted, but when executing the script it reconstructs only 110 images, even using SSH.
I saw in the comments of the script that can be run in batch:
* - Add range option so you can work in batches. Set the $ from & $ to variables to the range you want converted.

// Set conversion range (set to 0 to disable - default action)
$ from = 0;
$ to = 0;

but I didn't understand how, what values I put in place of 0. Can you help me?

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #176807 by JoomlaWorks
Replied by JoomlaWorks on topic k2 rebuild image cache
This range allows you to define e.g. the last 100 newest images to be re-created. So if you want all images re-created, you need to keep the default values of 0 and 0.

If after that you only see 110 images as you say, then your images may have been deleted along with items as well. In that case, you can't recover them if you don't have a backup...

The script works by checking if a "src" image exists already.

Please Log in or Create an account to join the conversation.

  • Leandro Nischida
  • Leandro Nischida's Avatar Topic Author
  • Offline
  • New Member
More
4 years 8 months ago #176814 by Leandro Nischida
Replied by Leandro Nischida on topic k2 rebuild image cache
I have 5741 images in the src folder. Even changing the values 0, example 1 to 200, it stops at 110.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #176816 by JoomlaWorks
Replied by JoomlaWorks on topic k2 rebuild image cache
Perhaps the script is cut-off by some server limit. Can you double-check with your hosting company?

Please Log in or Create an account to join the conversation.

  • Leandro Nischida
  • Leandro Nischida's Avatar Topic Author
  • Offline
  • New Member
More
4 years 8 months ago #176818 by Leandro Nischida
Replied by Leandro Nischida on topic k2 rebuild image cache
634/5000
I'm talking to the person in charge of the server and he said he has no restrictions. I just tried to do it again, see what appears.
...
Source file 103/5741: b438a68b469c31d6e2a1609d1c36634c.jpg [OK]
Source file 104/5741: 87c8808590e99744b8435e71fad8e5f0.jpg [OK]
Source file 105/5741: 0970212f290bcb02ee7e6907701224be.jpg [OK]
Source file 106/5741: ac4dbc5bf3793d268025746e30ceec34.jpg [OK]
Source file 107/5741: 9ab8fa7a6c7a3e1b502ee5721926ea31.jpg [OK]
Source file 108/5741: 814c5fa8cc246f42c53a91bddf076dee.jpg [OK]
Source file 109/5741: 1825f9332bc782d93c6d201cd1a002d9.jpg [OK]
[p2solucion @ lnxcpanel asbra] $

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #176820 by JoomlaWorks
Replied by JoomlaWorks on topic k2 rebuild image cache
The script may fail if the memory_limit is low. What's your current value for PHP CLI scripts?

Please Log in or Create an account to join the conversation.

  • Leandro Nischida
  • Leandro Nischida's Avatar Topic Author
  • Offline
  • New Member
More
4 years 8 months ago #176822 by Leandro Nischida
Replied by Leandro Nischida on topic k2 rebuild image cache
Second hosting is 1GB

Please Log in or Create an account to join the conversation.

  • Leandro Nischida
  • Leandro Nischida's Avatar Topic Author
  • Offline
  • New Member
More
4 years 8 months ago #176823 by Leandro Nischida
Replied by Leandro Nischida on topic k2 rebuild image cache
PHPINFO
max_execution_time 3600 3600
max_file_uploads 100 100
max_input_nesting_level 64 64
max_input_time 3600 3600
max_input_vars 10000 10000
memory_limit 1024M 1024M

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #176824 by JoomlaWorks
Replied by JoomlaWorks on topic k2 rebuild image cache
Have a look at your error logs then.

Please Log in or Create an account to join the conversation.

  • Leandro Nischida
  • Leandro Nischida's Avatar Topic Author
  • Offline
  • New Member
More
4 years 8 months ago #176826 by Leandro Nischida
Replied by Leandro Nischida on topic k2 rebuild image cache
There's nothing in the logs, I'm on version 10 of K2, can that be?

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #176827 by JoomlaWorks
Replied by JoomlaWorks on topic k2 rebuild image cache
Nope. If the script did not work at all, you wouldn't get any image re-created.

If your site is on a CloudLinux server, resources may be restrained, regardless of your settings in PHP's memory_limit.

Please Log in or Create an account to join the conversation.

  • Leandro Nischida
  • Leandro Nischida's Avatar Topic Author
  • Offline
  • New Member
More
4 years 8 months ago #176840 by Leandro Nischida
Replied by Leandro Nischida on topic k2 rebuild image cache
Checking for errors in Apache, the following appeared below. This image that is linked to in an article has been deleted but the problem persists.

[Sat Aug 29 10: 17: 05.475441 2020] [mpm_winnt: notice] [pid 4092: tid 728] AH00455: Apache / 2.4.41 (Win64) PHP / 7.3.12 configured - resuming normal operations
[Sat Aug 29 10: 17: 05.475441 2020] [mpm_winnt: notice] [pid 4092: tid 728] AH00456: Apache Lounge VS16 Server built: Aug 9 2019 16:46:32
[Sat Aug 29 10: 17: 05.475441 2020] [core: notice] [pid 4092: tid 728] AH00094: Command line: 'c: \\ wamp64 \\ bin \\ apache \\ apache2.4.41 \\ bin \\ httpd.exe -d C: /wamp64/bin/apache/apache2.4.41 '
[Sat Aug 29 10: 17: 05.482437 2020] [mpm_winnt: notice] [pid 4092: tid 728] AH00418: Parent: Created child process 6808
[Sat Aug 29 10: 17: 06.364893 2020] [mpm_winnt: notice] [pid 6808: tid 708] AH00354: Child: Starting 64 worker threads.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
[Sat Aug 29 10: 32: 41.724192 2020] [core: error] [pid 6808: tid 1224] (20024) The given path is misformatted or contained invalid characters: [client :: 1: 50585] AH00127: Cannot map GET / asbraer_atual / https: //www.agenciapara.com.br/midias/2020/medias/up_ag_21465_ad44b5ea-a18c-336e-b1a8-d3c287f15f25.jpg HTTP / 1.1 to file, referer: http: // localhost / asbraer_atual /
[Sat Aug 29 10: 32: 42.228880 2020] [core: error] [pid 6808: tid 1216] (20024) The given path is misformatted or contained invalid characters: [client :: 1: 50580] AH00127: Cannot map GET / asbraer_atual / https: //www.agenciapara.com.br/midias/2020/medias/up_ag_21465_ad44b5ea-a18c-336e-b1a8-d3c287f15f25.jpg HTTP / 1.1 to file, referer: http: // localhost / asbraer_atual /
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
[Sat Aug 29 10: 40: 23.000075 2020] [core: error] [pid 6808: tid 1224] (20024) The given path is misformatted or contained invalid characters: [client :: 1: 50766] AH00127: Cannot map GET / asbraer_atual / https: //www.agenciapara.com.br/midias/2020/medias/up_ag_21465_ad44b5ea-a18c-336e-b1a8-d3c287f15f25.jpg HTTP / 1.1 to file, referer: http: // localhost / asbraer_atual /
[Sat Aug 29 10: 40: 23.712636 2020] [core: error] [pid 6808: tid 1224] (20024) The given path is misformatted or contained invalid characters: [client :: 1: 50766] AH00127: Cannot map GET / asbraer_atual / https: //www.agenciapara.com.br/midias/2020/medias/up_ag_21465_ad44b5ea-a18c-336e-b1a8-d3c287f15f25.jpg HTTP / 1.1 to file, referer: http: // localhost / asbraer_atual /

Please Log in or Create an account to join the conversation.

More
4 years 7 months ago #176856 by JoomlaWorks
Replied by JoomlaWorks on topic k2 rebuild image cache
So you're on localhost, using Windows as your OS. How are you executing the script exactly?

Please Log in or Create an account to join the conversation.

  • Leandro Nischida
  • Leandro Nischida's Avatar Topic Author
  • Offline
  • New Member
More
4 years 7 months ago #176864 by Leandro Nischida
Replied by Leandro Nischida on topic k2 rebuild image cache
I called the script through the browser.
localhost / folder / rebuild.php

But I also tried it on an online server through the terminal and it didn't reconstruct all the images.

Please Log in or Create an account to join the conversation.

More
4 years 7 months ago #176875 by JoomlaWorks
Replied by JoomlaWorks on topic k2 rebuild image cache
The script will time out when used from the browser. PHP has different settings for when being executed through a browser and through a terminal.

Please Log in or Create an account to join the conversation.

  • Leandro Nischida
  • Leandro Nischida's Avatar Topic Author
  • Offline
  • New Member
More
4 years 7 months ago #176957 by Leandro Nischida
Replied by Leandro Nischida on topic k2 rebuild image cache
I used the old version of the script and it worked. The newer version didn't work at all.

Please Log in or Create an account to join the conversation.

More
4 years 7 months ago #176963 by JoomlaWorks
Replied by JoomlaWorks on topic k2 rebuild image cache
What K2 version are you using?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum