v12mike / imageredirect

phpBB extension for redirecting external image links to a local store and/or a secure proxy server
GNU General Public License v2.0
6 stars 2 forks source link

How can I be sure it's working? #2

Open TwitterLover opened 3 months ago

TwitterLover commented 3 months ago

First of all, thank you for this amazing work.

Secondly, I have a question. I followed all your steps, and I got all the images for my website, then I uploaded them to a folder with this path (public_html/ext/media) and put the path in the settings as (ext/media).

But until now, the images are still displayed with their external link; for example: https://i.ibb.co/NTzzSXd/test.jpg

Are things going well, or is there something wrong with what I did?

I feel exhausted because I have 7500 images for my phpBB forum, and I'm tired of searching for them, then downloading them to my computer, and then uploading them via FTP."

PS: My Board version: 3.3.12

v12mike commented 3 months ago

I will try to help you. Can you confirm that you used my scripts to download the images? Can you show me screenshots of the imageredirect configuration pages? It would be helpful if you could provide a link to your forum and a page where there is an image that should be redirected.

TwitterLover commented 3 months ago

Unfortunately, I could not use your script.

I have tried other methods to find out the number of my images and their links.

image w

try: this

v12mike commented 3 months ago

The imageredirect extension needs to know the file location for the image which it calculates from the original image URL. The extension does this by calculating the MD5 checksum of the URL. My script for saving the images calculates the MD5 and uses this as the filename, which makes it very efficient to find the file when the page is served.

If you have given the image files different naming, the the extension won't be able to find the files.

The extension does add a database table: phpbb_external_images which contains the original url and the filename, but (currently) the data in this table is not used by the extension (I use it for debugging).

TwitterLover commented 3 months ago

Candidate posts to check=5713, maximum number to check each run=20000, starting after post_id=0 Actual posts to check=5713 All Done!!

I have 11087 topics

TwitterLover commented 3 months ago

+

After run: download_external_images.php

we have:

[phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 1 : https://i.ibb.co/f8m3P6L/2223.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 2 : https://i.ibb.co/khpbnWX/keto.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 3 : https://i.ibb.co/h2WMjf9/We-used-these.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 4 : https://i.ibb.co/fNnygyS/Bath-room-tile-ideas.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 5 : https://i.ibb.co/DtWdd0z/2022-08-11-135529.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 6 : https://i.ibb.co/djQNtCg/2022-08-11-135914.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 7 : https://i.ibb.co/8sMQPBy/2022-08-11-140616.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 8 : https://i.ibb.co/dBtBc9P/2022-08-11-175826.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 9 : https://i.ibb.co/CtvBgf8/232.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 10 : https://i.ibb.co/RP2hcgV/2022-08-13-150242.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 11 : https://i.ibb.co/6R0qm8b/2022-08-13-152953.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 12 : https://i.ibb.co/cvL8QvY/2022-08-13-153601.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 13 : https://i.ibb.co/kyrn6mt/2022-08-13-154041.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 14 : https://i.ibb.co/PNfjk0y/2022-08-15-182447.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 15 : https://i.ibb.co/478bdGg/2022-08-15-190329.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 16 : https://i.ibb.co/m6k0nLb/2022-08-15-190503.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 17 : https://i.ibb.co/ZJBTnN6/2022-08-15-190556.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 18 : https://i.ibb.co/d6Y1LSS/2022-08-15-190656.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 19 : https://i.ibb.co/HCQqpGX/2022-08-15-190833.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 20 : https://i.ibb.co/W31Xnvm/2022-08-15-190926.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 21 : https://i.ibb.co/6Nx1CqJ/2022-08-15-191017.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 22 : https://i.ibb.co/Vw9mMn8/2022-08-16-173532.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 23 : https://i.ibb.co/ZKYXp9k/2022-08-16-173712.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 24 : https://i.ibb.co/m5BfWx5/2022-08-16-173906.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 25 : https://i.ibb.co/BzQRdcw/2022-08-16-174119.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 26 : https://i.ibb.co/NTNQ05T/2022-08-16-174400.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 27 : https://i.ibb.co/XVwzrMZ/2022-08-16-174449.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 28 : https://i.ibb.co/8MSBfCD/2022-08-16-174558.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 29 : https://i.ibb.co/S600FjC/2022-08-16-174635.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 30 : https://i.ibb.co/g64yB8F/2022-08-16-174855.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 31 : https://i.ibb.co/Kyq7Zxh/2022-08-16-175000.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 32 : https://i.ibb.co/BKkT403/2022-08-16-175138.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 33 : https://i.ibb.co/2Yx2S5X/2022-08-16-180345.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 34 : https://i.ibb.co/Pm3xJNH/2022-08-16-180505.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 35 : https://i.ibb.co/M59yB69/2022-08-16-180835.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 36 : https://i.ibb.co/0XZNk9R/2022-08-16-180948.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 37 : https://i.ibb.co/Mn5142V/2022-08-16-194144.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 38 : https://i.ibb.co/mH6pcYg/2022-08-16-194319.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 39 : https://i.ibb.co/tsN4QKS/2022-08-16-194427.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 40 : https://i.ibb.co/6w2SftS/2022-08-16-194541.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 41 : https://i.ibb.co/PMPbKG9/2022-08-17-143931.gif [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 42 : https://i.ibb.co/y02VRsC/2022-08-20-152018.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 43 : https://i.ibb.co/wMbXkjk/2022-08-20-152247.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 44 : https://i.ibb.co/G0dk9tv/2022-08-20-152233.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 45 : https://i.ibb.co/x5k7wL8/2022-08-20-152453.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 46 : https://i.ibb.co/3BZJBvg/2022-08-20-153121.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 47 : https://i.ibb.co/DYMSspN/2022-08-20-153225.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 48 : https://i.ibb.co/YynMpff/2022-08-20-153354.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 49 : https://i.ibb.co/wBzNTXT/2022-08-20-164519.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 50 : https://i.ibb.co/tDmWwSP/2022-08-20-165422.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 51 : https://i.ibb.co/S5dVYxF/2022-08-20-170015.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 52 : https://i.ibb.co/CP272Vh/2022-08-20-170151.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 53 : https://i.ibb.co/wyqvNs9/2022-08-20-170305.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 54 : https://i.ibb.co/GxW3ZtF/2022-08-20-172438.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 55 : https://i.ibb.co/8rLhYGX/2022-08-20-172538.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 56 : https://i.ibb.co/BfsPPwB/2022-08-20-172655.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 57 : https://i.ibb.co/2nQQBTK/2022-08-20-173518.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 58 : https://i.ibb.co/VDtdWm8/2022-08-20-173811.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 59 : https://i.ibb.co/R2vVGY5/2022-08-20-174614.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 60 : https://i.ibb.co/ypZ9Yww/2022-08-20-175230.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 61 : https://i.ibb.co/cQwDBMd/2022-08-20-181014.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 62 : https://i.ibb.co/mNvrjp7/2022-08-20-181251.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 63 : https://i.ibb.co/9vjGkY8/3-00-in-savers.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 64 : https://i.ibb.co/BcVpCtQ/2022-08-24-145924.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 65 : https://i.ibb.co/HqrJ0wb/Northeast-trip.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 66 : https://i.ibb.co/LSfnghq/2022-08-28-170222.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 67 : https://i.ibb.co/ZVB9RhD/amaz.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 68 : https://i.ibb.co/gVpysqF/2022-08-30-150915.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 69 : https://i.ibb.co/0chQz15/Murphy.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 70 : https://i.ibb.co/Xs6DN63/2022-08-30-151221.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 71 : https://i.ibb.co/PC7DzZ5/2022-08-30-151319.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 72 : https://i.ibb.co/zHjnbfB/2022-08-30-153002.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 73 : https://i.ibb.co/GHfwM1L/2022-08-30-163127.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 74 : https://i.ibb.co/Jnt5vdV/2022-08-30-180557.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 75 : https://i.ibb.co/VWmXH90/couch-covers.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 76 : https://i.ibb.co/rFjCjx9/2022-08-31-175611.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 77 : https://i.ibb.co/LnyYWRg/2022-08-31-175715.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 78 : https://i.ibb.co/3BMwpFf/2022-08-31-175812.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 79 : https://i.ibb.co/WyGFrQn/2022-08-31-181827.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 80 : https://i.ibb.co/syPVvjb/2022-09-04-174100.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 81 : https://i.ibb.co/3TBdsTG/2022-09-08-084617.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 82 : https://i.ibb.co/k1tXz2L/2022-09-08-190151.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 83 : https://i.ibb.co/V9J0hs0/2022-09-08-193236.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 84 : https://i.ibb.co/wdn0mPm/2022-09-08-193353.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 85 : https://i.ibb.co/8rCBdnm/2022-09-08-193443.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 86 : https://i.ibb.co/Zz2cvys/2022-09-08-193807.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 87 : https://i.ibb.co/3r18k51/Ange.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 88 : https://i.ibb.co/ch6rddx/cornices.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 89 : https://i.ibb.co/T12kqYN/2022-09-12-175444.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 90 : https://i.ibb.co/jg3zsJn/2022-09-22-150044.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 91 : https://i.ibb.co/T4Dm1d1/2022-09-22-160524.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 92 : https://i.ibb.co/3cYC9V5/2022-09-22-161710.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 93 : https://i.ibb.co/whtHpKR/2022-09-22-163910.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 94 : https://i.ibb.co/rvfxRSk/2022-09-22-164424.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 95 : https://i.ibb.co/G7BFmQ0/2022-09-22-164631.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 96 : https://i.ibb.co/Ks9FjSv/306859910-10160439696688701-7769039648946697826-n.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 97 : https://i.ibb.co/ByYn2X7/2022-09-22-165806.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 98 : https://i.ibb.co/nbfDLKN/2022-09-24-161144.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 99 : https://i.ibb.co/YXs1nFK/ddd.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 100 : https://i.ibb.co/4Zs3VLd/sss.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 101 : https://i.ibb.co/BBTZQQT/SDS.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 102 : https://i.ibb.co/4ZDjn24/2022-11-07-195005.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 103 : https://i.ibb.co/520pJYG/333333333333334.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 104 : https://i.ibb.co/dk3f046/315891994-5870184039699036-2634134265438673432-n.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 105 : https://i.ibb.co/x11JBdk/112.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 106 : https://i.ibb.co/wMSMTwW/223.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 107 : https://i.ibb.co/LhtrBmF/pic4.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 108 : https://i.ibb.co/nkpSPKp/pic3.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 109 : https://i.ibb.co/5M8DXxR/pic2.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 110 : https://i.ibb.co/dDLn5pR/pic1.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 111 : https://i.ibb.co/41WM97Z/pic5.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 112 : https://i.ibb.co/f4FFgh1/pic4.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 113 : https://i.ibb.co/k0NJ0fn/pic3.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 114 : https://i.ibb.co/sgYL7gr/pic2.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 115 : https://i.ibb.co/DG5S6wf/pic1.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 116 : https://i.ibb.co/G2sJxr9/decorative.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 117 : https://i.ibb.co/Z8nc8CM/Fedtrim-post-covers.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 118 : https://i.ibb.co/JyxhJXT/This-built-in.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 119 : https://i.ibb.co/NFzf6td/V-Groove-encasing-the-TV.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 120 : https://i.ibb.co/q1dzwsB/VJ-groove-panelling.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 121 : https://i.ibb.co/W5s7bVL/Invisigard.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 122 : https://i.ibb.co/G7vTSwN/the-front-door.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 123 : https://i.ibb.co/GFc8HxM/dusty.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 124 : https://i.ibb.co/cFp34g2/Not-built-yet.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 125 : https://i.ibb.co/0cBYvX5/This-one-is-from-Harbor-Freight-and-I-love-it.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 126 : https://i.ibb.co/ZTLHs8n/My-husband-and-I-built-this-one.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 127 : https://i.ibb.co/sj2BR2X/I-initially-was-looking-at-a-smaller-greenhouse-to-save.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 128 : https://i.ibb.co/QH8XM0v/My-content-was-good.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 129 : https://i.ibb.co/J37fSkg/Cloud-Flare-Enterprise-CDN.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 130 : https://i.ibb.co/2SMYXrf/Martin-Lewis.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 131 : https://i.ibb.co/CnjMnLr/work-right.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 132 : https://i.ibb.co/5McFX1c/beautiful-custom-vanity.gif [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 133 : https://i.ibb.co/ZWQNWnQ/2022-12-09-165326.gif [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 134 : https://i.ibb.co/0cj3hgb/2022-12-09-165300.gif [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 135 : https://i.ibb.co/1J0h5wK/2022-12-09-165723.gif [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 136 : https://i.ibb.co/4SD3MrR/2022-12-09-165802.gif [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 137 : https://i.ibb.co/t2xRc4Q/2022-12-09-165856.gif [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 138 : https://i.ibb.co/LSDKTGQ/2022-12-09-173017.gif [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 139 : https://i.ibb.co/B24t593/2022-12-09-173111.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 140 : https://i.ibb.co/4dFZ3zX/2022-12-09-173610.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 141 : https://i.ibb.co/nf5GMBZ/2022-12-09-174954.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 142 : https://i.ibb.co/J2w8qLg/2022-12-09-175051.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 143 : https://i.ibb.co/cwbJK51/2022-12-09-175158.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 144 : https://i.ibb.co/GPT7h8s/2022-12-09-180230.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 145 : https://i.ibb.co/BPcHgZs/2022-12-09-180356.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 146 : https://i.ibb.co/j6bw289/2022-12-09-180511.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 147 : https://i.ibb.co/VjCgh48/2022-12-09-180602.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 148 : https://i.ibb.co/xhz6gFR/2022-12-09-181128.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 149 : https://i.ibb.co/0r8v6Xh/2022-12-09-183213.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 150 : https://i.ibb.co/1R8qJJ5/2022-12-09-183427.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 151 : https://i.ibb.co/6F6FyGL/2022-12-09-183643.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 152 : https://i.ibb.co/xsYyFQW/2022-12-09-183620.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 153 : https://i.ibb.co/grgZVQM/2022-12-09-183606.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 154 : https://i.ibb.co/qxp6kYs/2022-12-09-183753.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 155 : https://i.ibb.co/bKqnWJY/2022-12-09-183941.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 156 : https://i.ibb.co/fr1hx1d/Beautiful3.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 157 : https://i.ibb.co/K0t0CPC/Beautiful2.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 158 : https://i.ibb.co/QjfHLCB/Beautiful.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 159 : https://i.ibb.co/gT1WNKN/furniture1.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 160 : https://i.ibb.co/190pjNr/furniture.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 161 : https://i.ibb.co/wsxGVd4/dulux-natural-white.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 162 : https://i.ibb.co/2MQLXhX/Taubmans-cotton-sheets.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 163 : https://i.ibb.co/xFgDKHG/subtracts-light.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 164 : https://i.ibb.co/pRNR2JL/The-lighting.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 165 : https://i.ibb.co/NNymsx3/Plungie-original.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 166 : https://i.ibb.co/FxJ2zsb/4m-x3m.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 167 : https://i.ibb.co/FzrBFyJ/Perfect-size-for-me-5x3-very-happy-with-it.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 168 : https://i.ibb.co/BfXF2Kf/10-000-litres.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 169 : https://i.ibb.co/LCQy2C9/6x4-including-spa.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 170 : https://i.ibb.co/9yq9W4T/7x3m.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 171 : https://i.ibb.co/g32gJ9d/spinach.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 172 : https://i.ibb.co/mN2k0XG/Chimichurri.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 173 : https://i.ibb.co/xDqssss/I-do-almost-entirely-tropicals.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 174 : https://i.ibb.co/3WYNQd3/Southern-Michigan.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 175 : https://i.ibb.co/RQ98XqS/img.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 176 : https://i.ibb.co/mbYz3nW/greenhouse.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 177 : https://i.ibb.co/vYGnKY0/worth-the-time.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 178 : https://i.ibb.co/fYcBV37/fragrances.gif [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 179 : https://i.ibb.co/1TxpSKz/Donna-4.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 180 : https://i.ibb.co/3NFGhC9/Donna-3.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 181 : https://i.ibb.co/rx2T23P/Donna-2.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 182 : https://i.ibb.co/2jWzyyf/Donna.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 183 : https://i.ibb.co/tCHXXjt/cushion.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 184 : https://i.ibb.co/W6RdNL8/Kitchen-design-question.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 185 : https://i.ibb.co/hcP81b6/Julie.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
status OK 200 for 186 : https://i.ibb.co/9nqPz3P/modern-Hamptons-look.jpg [phpBB Debug] PHP Warning: in file [ROOT]/scripts/download_external_images.php on line 234: Undefined variable $url
TwitterLover commented 3 months ago

After the recent update,

I conducted a test [scripts/download_external_images.php], and I was presented with a page that performed various tasks, but then stopped generating new image links.

Upon counting, I found approximately 300 generated links.

Now, my question is: Is this all? Should I try again? Will there be additional results in subsequent attempts?

I ask all these questions because I have 7,500 images, which is a significant number.

Thank you very much for your help and patience.

image b

v12mike commented 3 months ago

I have done some testing today and the scripts are basically working OK,. on one of my forums I was able to generate links and download about 1000 images (because the script had not been run on that forum for a few years).

There is a warning at the beginning of your log (I don't think that was present with the version of PHP I originally used). It is probably benign, but I want to test a couple of alternate fixes to see which one is best.

with regard to your current problem, it could be due to your PHP configuration having a timout which causes the script to terminate abnormally. To test this, find (at line 24) in extract_external_links the line: $interval = 20000; and change it to: $interval = 200; and see if the script asks to run again. if it does then you can either rerun the script (many times) until the links are all extracted, or find your PHP engine timeout setting and increase it suitably.

TwitterLover commented 3 months ago

and see if the script asks to run again.

Posts with external links=2113, maximum number to check per run=200, starting after post_id=60126 Actual posts to this run=200 More to do, please run the script again

Now, sir, I have some questions as a beginner, not a professional.

UPDATE: after many clicks:

Posts with external links=113, maximum number to check per run=200, starting after post_id=84829 Actual posts to this run=113 All Done!!

v12mike commented 3 months ago

OK, if you got the "All Done!!" then you run the download script (which may also have a timeout issue on your system.

Are you running on Microsoft or Linux? I have previously only known timeouts on Microsoft systems.

TwitterLover commented 3 months ago

Are you running on Microsoft or Linux? I have previously only known timeouts on Microsoft systems.

Linux

TwitterLover commented 3 months ago

UPDATE-1: Yes, 300 links were generated initially. Upon clicking again, 470, then 550, and then 692 links were generated. However, it stopped generating more links even after repeated attempts.

UPDATE-2: After numerous attempts, the links were updated to 778.

Is this normal? Should I continue or stop?

v12mike commented 3 months ago

I don't know what is going on with your system.
Can you confirm that extract_external_links.php is terminating with the "All Done!!" message without generating all the expected link data in the phpbb_external_image_links table in the database?

TwitterLover commented 3 months ago

Sorry, that's my mistake.

I meant I'm working on: download_external_images.php

I actually did: extract_external_links.php

v12mike commented 3 months ago

At line 19 of the script: define('MAXIMUM_FILES_TO_FETCH', 50000);

try reducing that to 250 and see what happens.

I have found an unrelated problem while while testing, which is causing some file downloads to fail form some sites. I hope to fix that tomorrow.

TwitterLover commented 3 months ago

and see what happens.

We have returned to the starting point, albeit with very slow progress. We began with 89, then moved on to 175, then 316, but then encountered a 'Gateway Timeout' error, forcing us to restart from the beginning, resulting in only 80, 180.. etc

TwitterLover commented 3 months ago

The process has halted once again due to a 'Gateway Timeout' error, forcing me to restart from the beginning.

This setback has left me feeling frustrated, and I have closed the tab.

v12mike commented 3 months ago

I need more information. Can you share the output from the download_external_images.php script, or at least the last 20 lines? When the script has downloaded a file, it should skip that file on any subsequent runs, so I don't understand "forcing me to restart from the beginning"

Are you running the scripts on the server command line, or through the web server?

TwitterLover commented 3 months ago

In all honesty, I am manually entering this URL into my browser: https://decembearduk.org/scripts/download_external_images.php "You can do it yourself"

This is how: image W

After the download and content generation stop, I refresh the page (by clicking the reload button or pressing F5) to generate more links as instructed.

But after some reloads, I find a white page "Gateway Timeout"

v12mike commented 3 months ago

Do you have command-line access to your server? If so I think that your problem would be solved by running the php scripts on the command line. If you dont have command line access, you will either need to find an adjust the web-server timeouts to enable the script to run, or you could set up the database and php environment on another machine, then upload the resulting files to your server.

TwitterLover commented 3 months ago

I have access to my server's dashboard data (2083/login), but I'm a novice user, as you might say. If you could explain what you need, I'd be happy to assist.

v12mike commented 3 months ago

If you have shell (command-line) access to your server, probably via ssh, then on the command line try typing "php -i" which should give 100 lines or so of php engine parameters, and shows that you can run php scripts from the command line.

if that works, then run php [path-to-your-forum-directory]/scripts/download_external_images.php and see what happens.

v12mike commented 3 months ago

OK, my mistake, you need to cd to the script directory under your forum directory and run ./download_external_images.php so that the required phpBB files appear in the correct relative path.

TwitterLover commented 3 months ago

OK, sir I do: php /home/dec/public_html/scripts/download_external_images.php

and I get:

image F

What now, sir?

v12mike commented 3 months ago

No you MUST run the exact command: php ./download_external_images.php from the script directory, or the phpBB libraries will not be found

v12mike commented 3 months ago

Sorry, I did not read your last post correctly. It seems that the script ran correctly, and you can probably increase the limit value in the script that you previously reduced. As it is, you need to run the script again until it says "All done!!"

BTW ibb.co apparently has rate limiting which causes some files not to download, and to make things ore complicated, the site gives the wrong status 503, rather than status 429 (see https://wordpress.org/support/topic/customize-error-code-503-for-locked-out-users/). rerunning the script a few times should mop up those failures.

TwitterLover commented 3 months ago

OK, sir I do this: /home/dec/public_html/scripts$ php ./download_external_images.php

And I get: It's been 10 minutes and I haven't gotten anything, is this normal?

Note: I have about 7500 images.

v12mike commented 3 months ago

You should be getting output similar to that which you posted above (which showed the script running and terminating normally.
Did you change the MAXIMUM_FILES_TO_FETCH ? perhaps there is an error introduced?

On my main site there are nearly 50,000 image files and the script runs OK.

TwitterLover commented 3 months ago

No. I didn't change anything.

Should I close the tab and start over?

TwitterLover commented 3 months ago

UPDATE: finally I get: [ERROR] AJAX: error

in red font :(

v12mike commented 3 months ago

No. I didn't change anything.

Should I close the tab and start over? Probably a good idea.

  • Is it a good idea to run extract_external_links.php again? There is benefit in that at this time.

UPDATE: finally I get: [ERROR] AJAX: error

in red font :(

I don't know what that is about. Try again... But I would recommend increasing the limit so that you dont need to rerun the script so many times.

TwitterLover commented 3 months ago

Update 2: I closed the tab and started again, and it worked fine, 250 image links found, and the message: More to do, please run the script again

Now, should I put the same command: php ./download_external_images.php again?

TwitterLover commented 3 months ago

I would recommend increasing the limit so that you dont need to rerun the script so many times.

How? And how much?

v12mike commented 3 months ago

yes just keep running the same thing

Undo this change that you made earlier:

At line 19 of the script: define('MAXIMUM_FILES_TO_FETCH', 50000);

try reducing that to 250 and see what happens.

TwitterLover commented 3 months ago

Here's what happened: After many permissions and updates within the server, etc., we tried a value of 5000, but each time the server would crash.

Then we tried a value of 3000 and the first round was completed, resulting in 3600 links. Unfortunately, many of them had a result of: BAD STATUS existing file status 0 for..

We repeated the process and it extracted 1001 more links, also with many results of: BAD STATUS existing file status 0 for

Then it showed: All Done!!

For your information, I'm sure I have around 7500, so how did we only get 4600?

Also, I don't know what happened to the images that had the result: BAD STATUS existing file status 0 for

Are there any steps to verify what we did?

Are there any other steps that need to be taken? Because I still find all images on my pages that start with the link: https://i.ibb.co/ So, did the task fail?"

v12mike commented 3 months ago

I don't entirely understand what has happened on your last run, but as I said earlier, ibb.co has some problems.

I have made a couple of minor improvements to the script which I will upload tomorrow, but you could try running download_external_images.php again and see if any more files are downloaded. I had to run it about 5 times to get all the files from ibb.co (because the site gave error status).

TwitterLover commented 3 months ago

Very well, sir. The results were satisfactory this time. We found 7886 images, and the results were consistent across five search rounds.

I believe this is indeed the correct number. I am pleased with that.

However, during the search, I encountered the following results:

image L

What does "BAD STATUS" mean in this context? Even though the file itself exists three times, could you please explain?

Note: This is an example of 1600 results that also carry a "BAD STATUS".

TwitterLover commented 3 months ago

Sir, could you please provide an explanation for what is happening to me? Or perhaps I should forget about the whole matter and consider alternative solutions.

Thank you for your time.

v12mike commented 2 months ago

The BAD STATUS message was added while developing the script to catch mismatch between the file status in the database and the actual file saved on disk.

In the cases shown here, the same url has been linked multiple times (maybe in the same post, maybe in different posts), resulting in multiple entries in the database (one per link), but only one copy of the file is saved on disk because the filename is generated from the url. The BAD STATUS message is given for subsequent download attempts because for those (subsequent) links no file was downloaded, because the same file with the same name already exists on disk. This is normal behaviour and not a problem.

I will update the script to suppress the BAD STATUS messages if the file is already existing, but you do not need to take any action.

TwitterLover commented 2 months ago

Very well, sir, but I haven't seen any results yet. All the images still have their original links. Is there something I'm missing?

image a

v12mike commented 2 months ago

In the screenshot you sent earlier, the image storage path was shown as ext/media I think that maybe it needs a trailing slash ext/media/ assuming that is the correct path relative to the forum root directory.

You can test by taking an image url and generate the MD5 hash on https://www.md5hashgenerator.com then create a url for your image store. e.g. on one of my sites, an original url is http://i.imgur.com/qF81qyV.jpg which generates an MD5 of f1eae4855af9da9d55a23fca521be104 so the link to the saved image is https://frenchcarforum.co.uk/images/ext/f1eae4855af9da9d55a23fca521be104.jpg which is what the extension should be generating. Note that the extension will not translate the link unless it finds the local copy of the image is present on disk.

TwitterLover commented 2 months ago

Unfortunately, I changed the settings to: ext/media/

However, look here for example "link"

You will find many images,

One of them: https://decembearduk.org/ext/media/Replace-tile-b.jpg

And the original one is: https://i.ibb.co/DVm46L4/Replace-tile-b.jpg

But its link hasn't changed, and it still appears as an external link from i.ibb.co.

This is very unfortunate.

v12mike commented 2 months ago

Do you have a downloaded file ext/media/7a33d7d9356a1e9f51bc539ab8be2bae.jpg ? Check that the file has ownership and permissions that can be read by the web server process.

TwitterLover commented 2 months ago

Oh my goodness, what is this image exactly? I don't have any files with this name.

Here's what I did: I downloaded the extension. I installed it and configured its settings. I ran the script: extract_external_links.php I ran the script: download_external_images.php I downloaded all the images to a folder on my computer. I uploaded all the images to the folder: ext/media/

image P

That's all I did, so I really don't know what this file format is or where it came from?"

v12mike commented 2 months ago

I do not understand what the screenshot in your post above represents. All of the downloaded image files should be in a single directory and the filenames should be MD5 sums of the original urls with the original file extension appended.

To look at it differently... In the database table phpbb_external_images, for each row in the table there should be (among other data), a url, a file, an ext and a status. For every row that has a status of 200, there should have been downloaded (and be in your local image directory) a file with a matching (MD5) name and extension.

v12mike commented 2 months ago

If you did not modufy the script, then the downloaded files would have been placed in the directory images/ext/

TwitterLover commented 2 months ago

I have not made any modifications. This is not part of the instructions.

The screenshot above represents a portion of the list of images that I uploaded "manually" to the ext/media folder.

However, I have now changed the settings to images/ext/.

And it seems there is some good news...

Look at what happened! ♥

image 8

v12mike commented 2 months ago

OK, that is great news.

TwitterLover commented 2 months ago

Now I have some exciting questions:

Most importantly, I want to thank you for your patience, knowledge, and dedication in responding and following up. This is a great thing from you, sir.

v12mike commented 2 months ago

Now I have some exciting questions:

  • Is my problem with imgbb.com finally over? I believe so.

  • Will my images remain visible and stored on my website forever, even if imgbb.com deletes them from their site? Yes, you now have your own copy of the images (take a backup).

  • Are all the images I manually uploaded to the ext/media folder now irrelevant? Can we delete this entire folder now? Yes, you can delete those.

  • Are there any future precautions or warnings? No, it should just keep working. I intend to maintain the extension for future versions of phpBB there are a few sites using it, one with more than 250,000 image files which have been lost from the original hosting site.

Most importantly, I want to thank you for your patience, knowledge, and dedication in responding and following up. This is a great thing from you, sir. You are welcome.