Images Hijacked by Photobucket?

Discussion of non-phpBB related topics with other phpBB.com users.
Forum rules
General Discussion is a bonus forum for discussion of non-phpBB related topics with other phpBB.com users. All site rules apply.
v12mike
Registered User
Posts: 584
Joined: Thu Jul 09, 2015 5:03 pm

Re: Images Hijacked by Photobucket?

Post by v12mike »

I have created release v1.0.1 of the v12mike/imageredirect extension at: https://github.com/v12mike/imageredirect

This update should be installed by all users, regardless of whether or not a problem has been observed.

The database and configuration are not affected, so no migration is required. (just copy in the new source files).
cincen
Registered User
Posts: 11
Joined: Tue Oct 24, 2006 8:57 am

Re: Images Hijacked by Photobucket?

Post by cincen »

Thanks !!! it works perfect now on https !!!
Havym
Registered User
Posts: 62
Joined: Sun Jan 29, 2017 3:50 pm
Location: Netherlands
Name: Marco

Re: Images Hijacked by Photobucket?

Post by Havym »

Thanks for all the help!

This extension and scripts --> All images on the forum are visible again and even on https!

Ow one thing...
In the extension overview it still says version 1.0
paul_f
Registered User
Posts: 8
Joined: Thu Jun 18, 2015 7:22 pm
Name: Paul
Contact:

Re: Images Hijacked by Photobucket?

Post by paul_f »

Thank you very much for the scripts.

I have a problem with the scripts on my server in that the previous finished point isn't saved. Occasionally it does, but it is now causing the server to timeout on the extracting the links process. Even though it has checked post 850k/900k - the saved starting point is 750k. Tried all sorts of max post values with no luck.

Similar problem with the download images, except this starts with the first photo again each time I run it.

I am running the scripts on the server using Chrome, is there a better way? Unfortunately the server is windows server 2008
v12mike
Registered User
Posts: 584
Joined: Thu Jul 09, 2015 5:03 pm

Re: Images Hijacked by Photobucket?

Post by v12mike »

paul_f wrote: Wed Aug 02, 2017 7:52 am I am running the scripts on the server using Chrome, is there a better way? Unfortunately the server is windows server 2008
I think that it is better to run the scripts from a command prompt or php shell. I beelieve that it is possible on a windows platform.
paul_f wrote: Wed Aug 02, 2017 7:52 am I have a problem with the scripts on my server in that the previous finished point isn't saved. Occasionally it does, but it is now causing the server to timeout on the extracting the links process. Even though it has checked post 850k/900k - the saved starting point is 750k. Tried all sorts of max post values with no luck.
The script will not save the last ID if it terminates abnormally. Try running the script on the server from a prompt, or maybe add some debug prints to the script to see if it is choking on a particular url.
paul_f wrote: Wed Aug 02, 2017 7:52 am Similar problem with the download images, except this starts with the first photo again each time I run it.
Again the script must be terminating abnormally. try running the script from a prompt and report back
Explode!
Registered User
Posts: 50
Joined: Mon Nov 26, 2007 10:06 am

Re: Images Hijacked by Photobucket?

Post by Explode! »

I've suffered from this on my forum, not only is it sad to lose all of the pictures but the error logo is causing strange pagination if the images were in a signature etc.

I've just run the first script and it's identified 50,100 externally linked images - 37,000 of which are to photobucket :?

Thank you so much v12mike for providing your scripts, I was going to look to write something for the same task.

I might see about now downloading them??? and then using the extension.
Zepticon
Registered User
Posts: 12
Joined: Sun Dec 13, 2015 6:44 pm

Re: Images Hijacked by Photobucket?

Post by Zepticon »

I tried running the script, it gave me a long list of numbers and *, but then it gave me this output in the terminal:

Code: Select all

PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/3/m/mazda-ogn/www/scripts/extract_external_links.php:73) in /home/3/m/mazda-ogn/www/includes/functions.php on line 1954
<!DOCTYPE html><html dir="ltr"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>General Error</title><style type="text/css">
/* <![CDATA[ */
* { margin: 0; padding: 0; } html { font-size: 100%; height: 100%; margin-bottom: 1px; background-color: #E4EDF0; } body { font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; background: #E4EDF0; font-size: 62.5%; margin: 0; } a:link, a:active, a:visited { color: #006699; text-decoration: none; } a:hover { color: #DD6900; text-decoration: underline; } #wrap { padding: 0 20px 15px 20px; min-width: 615px; } #page-header { text-align: right; height: 40px; } #page-footer { clear: both; font-size: 1em; text-align: center; } .panel { margin: 4px 0; background-color: #FFFFFF; border: solid 1px  #A9B8C2; } #errorpage #page-header a { font-weight: bold; line-height: 6em; } #errorpage #content { padding: 10px; } #errorpage #content h1 { line-height: 1.2em; margin-bottom: 0; color: #DF075C; } #errorpage #content div { margin-top: 20px; margin-bottom: 5px; border-bottom: 1px solid #CCCCCC; padding-bottom: 5px; color: #333333; font: bold 1.2em "Lucida Grande", Arial, Helvetica, sans-serif; text-decoration: none; line-height: 120%; text-align: left; } 
/* ]]> */
</style></head><body id="errorpage"><div id="wrap">	<div id="page-header">		<a href="../">Return to index page</a>	</div>	<div id="acp">	<div class="panel">		<div id="content">			<h1>General Error</h1>			<div>SQL ERROR [ mysql4 ]<br /><br />User 'mazdaogn' has exceeded the 'max_updates_per_hour' resource (current value: 36000) [1226]<br /><br />An SQL error occurred while fetching this page. Please contact the <a href="mailto:[email protected]">Board Administrator</a> if this problem persists.</div><p>Please notify the board administrator or webmaster: <a href="mailto:[email protected]">[email protected]</a></p>		</div>	</div>	</div>	<div id="page-footer">		Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited	</div></div></body></html>
Looking at it, i have exceded some limit on the server side? Is this something to do with my webhotel?

Code: Select all

User 'mazdaogn' has exceeded the 'max_updates_per_hour' resource (current value: 36000)
Im sorry if this is noobish, but im running my board alone and im learning as problems come along. Never done anything like this before.
Zepticon
Registered User
Posts: 12
Joined: Sun Dec 13, 2015 6:44 pm

Re: Images Hijacked by Photobucket?

Post by Zepticon »

Okay so i talked to the guys im hosting at, and they told me that i needed to use either Staggered Upload or Bulk Insert to be able to do this on my server. And now im out of my league. Editing the script to do this is a no go :D
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Images Hijacked by Photobucket?

Post by AmigoJack »

Zepticon wrote: Fri Aug 04, 2017 10:02 amBulk Insert
Argue with them that the error message is about updates, not inserts. And also ask them if they could make an exception for i.e. 1 hour which you might also be okay to pay for.
Zepticon
Registered User
Posts: 12
Joined: Sun Dec 13, 2015 6:44 pm

Re: Images Hijacked by Photobucket?

Post by Zepticon »

AmigoJack wrote: Fri Aug 04, 2017 10:56 am
Zepticon wrote: Fri Aug 04, 2017 10:02 amBulk Insert
Argue with them that the error message is about updates, not inserts. And also ask them if they could make an exception for i.e. 1 hour which you might also be okay to pay for.
Thats what i asked them, but they said it was "stupid high already" so i had to rewrite the script, or stage it.
So i have waited each time it failed and tried again, and now the first part is completed.

I then continued to run the download script, and it runs fine until file 254:

Code: Select all

download 254 : http://tanetane92.web.infoseek.co.jp/052991.jpg 
<b>[phpBB Debug] PHP Warning</b>: in file <b>[ROOT]/scripts/download_external_images.php</b> on line <b>93</b>: <b>Illegal string offset 'info'</b><br />
<b>[phpBB Debug] PHP Warning</b>: in file <b>[ROOT]/scripts/download_external_images.php</b> on line <b>93</b>: <b>Illegal string offset 'http_code'</b><br />
<b>[phpBB Debug] PHP Warning</b>: in file <b>[ROOT]/scripts/download_external_images.php</b> on line <b>94</b>: <b>Illegal string offset 'info'</b><br />
<b>[phpBB Debug] PHP Warning</b>: in file <b>[ROOT]/scripts/download_external_images.php</b> on line <b>94</b>: <b>Illegal string offset 'size_download'</b><br />
status < FAIL
PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/3/m/mazda-ogn/www/scripts/download_external_images.php:91) in /home/3/m/mazda-ogn/www/includes/functions.php on line 1954
And give me the html error page saying:

SQL ERROR [ mysql4 ]
Incorrect integer value: '<' for column 'status' at row 1 [1366]


EDIT:
I also cant seem to be able to access the "ext" image folder that the images are stored in. FileZilla just give me this:

Command: CWD /www/images/ext
Respons: 250 CWD command successful
Command: PASV
Respons: 227 Entering Passive Mode (185,134,245,18,210,56).
Command: MLSD
Respons: 550 /www/images/ext: Permission denied
Error: Error recieving folder list
v12mike
Registered User
Posts: 584
Joined: Thu Jul 09, 2015 5:03 pm

Re: Images Hijacked by Photobucket?

Post by v12mike »

I am not 100% sure that I understand the limits of your hosting environment, but the update rate problem should be solved if you reduce the value of $interval in the script to something you are allowed, and then wait for the next period before you rerun the script.

Your permissions problem could be because the directory is being created by the script which will be inheriting user name and rights from the php process, which is probably not your user name. You need to change (or ask your provider to change) the ownership/permissions so that both you and php can see/modify the new directory.
Zepticon
Registered User
Posts: 12
Joined: Sun Dec 13, 2015 6:44 pm

Re: Images Hijacked by Photobucket?

Post by Zepticon »

v12mike wrote: Fri Aug 04, 2017 7:59 pm I am not 100% sure that I understand the limits of your hosting environment, but the update rate problem should be solved if you reduce the value of $interval in the script to something you are allowed, and then wait for the next period before you rerun the script.

Your permissions problem could be because the directory is being created by the script which will be inheriting user name and rights from the php process, which is probably not your user name. You need to change (or ask your provider to change) the ownership/permissions so that both you and php can see/modify the new directory.
Thanks for the reply, and also for making this script :) I will play around with it some more in the comming week and see what happends. But do you have any idea why it could be failing on file download #254 ?
v12mike
Registered User
Posts: 584
Joined: Thu Jul 09, 2015 5:03 pm

Re: Images Hijacked by Photobucket?

Post by v12mike »

Zepticon wrote: Fri Aug 04, 2017 8:04 pm Thanks for the reply, and also for making this script :) I will play around with it some more in the comming week and see what happends. But do you have any idea why it could be failing on file download #254 ?
If you take the link for file 254 and paste it into a browser, you will see that it is redirected to a web page (probably because the original file has been deleted). The script correctly sees this as a failure to download, but this should not stop the script running, it should just go to the next url in the database.
sp3ctre
Registered User
Posts: 321
Joined: Sun Jul 15, 2007 11:06 am

Re: Images Hijacked by Photobucket?

Post by sp3ctre »

Great job with the scripts. Out of interest how much of a challenge would it be to trawl the database and replace the url's with the local ones? I'm just concerned about relying on a plugin working with future phpbb releases.
Zepticon
Registered User
Posts: 12
Joined: Sun Dec 13, 2015 6:44 pm

Re: Images Hijacked by Photobucket?

Post by Zepticon »

v12mike wrote: Fri Aug 04, 2017 8:31 pm
Zepticon wrote: Fri Aug 04, 2017 8:04 pm Thanks for the reply, and also for making this script :) I will play around with it some more in the comming week and see what happends. But do you have any idea why it could be failing on file download #254 ?
If you take the link for file 254 and paste it into a browser, you will see that it is redirected to a web page (probably because the original file has been deleted). The script correctly sees this as a failure to download, but this should not stop the script running, it should just go to the next url in the database.
Is there a way i can get it to skip this one? Or to start from file 255?
Post Reply

Return to “General Discussion”