Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 2 3 [4] 5   Go Down

Author Topic: External Images Links / Use "remote" storage servers  (Read 106661 times)

0 Members and 1 Guest are viewing this topic.

viperpurple

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
    • Viperpurple
Re: External Images Links / Use "remote" storage servers
« Reply #60 on: July 04, 2006, 04:37:53 pm »

stupid file permissions! i'm sure i'd checked them, ahh well it works super now  ;D

cheers and sorry for the stupidly simple post
Logged
TTFN :P

Adam

viperpurple

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
    • Viperpurple
Re: External Images Links / Use "remote" storage servers
« Reply #61 on: July 07, 2006, 03:37:01 pm »

Hey,

I have been uploading and adding over 1000 photos at a time using this mod on cpg1.4.8 and have found the following problems, i'm not sure whether its bugs in the mod but i have followed the instructions exactly and  seem to get the problems consistantly.

  • 1. The script produces extra files called 1_filename.jpg and 2_filename.jpg, sometimes a file is missed out and replaced by the numbered version
  • 2. Even when i use the autorun option the script requires a manual reload after 7-10 files have been added, the script then creates the page again with the just added files at the top saying that they've already been added this continues until the set file limit is reached.  Once the limit is reached the page automatically reloads if the autorun is ticked.
  • 3. The files and folders created have the permission of 750 which means i have to manually set them all to 755 to allow the gallery to work
  • 4. A rare problem, well it happened once, was that it totally missed a couple of file saying that they had failed even though those files where no different to the others, these files were in the first few to be added

I hope i've explained the above problems enough, if not then please let me know and i'll answer any questions and try to expand on the details.

TTFN  :P

Adam
Logged
TTFN :P

Adam

viperpurple

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
    • Viperpurple
Re: External Images Links / Use "remote" storage servers
« Reply #62 on: July 07, 2006, 03:47:32 pm »

hey,

i've just found another 2 problems,

  • 5. Two files appear in the gallery as the same name and reference although they have different photos
  • 6. A couple of files have ended up in the wrong album, they were put in the next album instead even though the text file was correct

I'd be interested to hear about other peoples experiences of adding files in cpg1.4.8 with the beta4 mod

TTFN  :P

Adam
Logged
TTFN :P

Adam

flux

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 80
    • CPG Remote Hack Demo
Re: External Images Links / Use "remote" storage servers
« Reply #63 on: July 07, 2006, 06:29:42 pm »

most of the "problems" you've encountered are probably caused by the fact the script does not execute normaly with your server setup.

1. X_ name prefix is added when the exact image path/name already exists, the script is designed to check the db for an existing file not the ondisc file which could very well be missing in the db.
The fact it had to create "new" files with the same original name obviously follows a problem when executing the script. File was probably being added and the script failed for a reason. Reloading the script would try to add the very same file thus producing a 1_, then 2_ new files if several failures occur.. and that you want to force it by reloading..

2. The automated execution is not perfect, it's basically designed to try avoiding script timeouts but that doesn't work 100% and i even saw on some setups that it won't work at all.. i'd suggest you lower the number of pictures added in one pass, it won't matter if you add 5 pics or 10 at a time.. the only thing you want here is to avoid script failures..

3. look for "0750" values in the script and change them to whatever you want, "0755" in your case maybe.. i've also seen some setups that will not let mkdir change the default chmod value so it may not work..

4. failure to add pictures are probably cpg functions related, the script only makes sure the pics are not already in the database and then tries to add the new pictures using available cpg functions.. Once again it could fail if your remote picture takes too long to be fetched but then that's another timeout problem you'll have to deal with..

5. no idea where that come from, make sure you didn't see them in a gallery being updated. the relative index that cpg produces to access pictures in ablums is really relative and a single link would point to different pictures at different times if the gallery you browse is being updated..

6. Funny, i had the very same bug but only after i introcuded it myself while making modifications to my script..
So in your case it could also be related to your various script failures and so on..


My opinion is that it's absolutely not related in any ways to your cpg version, i've added like 5k pics to my demo gallery upgraded to 1.48 and had no problems whatsoever..

failure to add pictures can occur for various reasons since you rely on ip transfers which are themselves not reliable..

viperpurple

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
    • Viperpurple
Re: External Images Links / Use "remote" storage servers
« Reply #64 on: July 07, 2006, 08:19:57 pm »

thanks flux for such an indepth answer to my questions, you exceeded my expectations by miles

keep up the great work, i only hope that one day my web programming progresses to such a level  :)

Logged
TTFN :P

Adam

jko

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: External Images Links / Use "remote" storage servers
« Reply #65 on: July 29, 2006, 08:56:25 pm »

1st post and a big thanks to flux for this addon.

I've just taken delivery of a new Linkstation NAS and set it up as a webserver with all my photos on it - lots more than I could ever put on my hosted webspace. I've been a long time user of a different image gallery but it doesn't have the facility to link to remote files.
I found this post after a bit of web searching and decided to try Coppermine - flawless install. Then had a quick play with this facility and it just worked.
OK, so I've got a bit of work to do arranging my photo albums and creating the file lists, but it's exactly what I'm looking for, so, once again a big thumbs up and thanks.

John
Logged

igor666

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: External Images Links / Use "remote" storage servers
« Reply #66 on: August 23, 2006, 04:42:17 pm »

Just found this thread - installed the mod and, so far, it's working great - many, many thanks for a superb job!
Logged

HinDu

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: External Images Links / Use "remote" storage servers
« Reply #67 on: August 30, 2006, 08:29:37 pm »

hi flux,

first of all thank you for the great work - with your hack, Coppermine seems to be the exactly what I need.
I have a problem however with "uploading" the images, I made a few screens, so you can see what I mean.

ok, the database is working properly, I can upload (the normal way) pics and everythings fine. I have a category "Winterzeit" and the album "Weihnacht"

see here: http://img179.imageshack.us/img179/9400/databasefh4.jpg

Now I want to upload the following picture: http://foto.arcor-online.net/palb/alben/85/357385/3164386530316330.jpg (don't mind the size, I have everything set up correctly. If I upload it normally everything works great with the pic - it's just for testing purpose)
I have a pic.txt that says
Code: [Select]
/Winterzeit/Weihnacht/
http://foto.arcor-online.net/palb/alben/85/357385/3164386530316330.jpg
And I execute the files.php, point it to the txt file and let it begin. Then I get this error message:
http://img113.imageshack.us/img113/8383/errorox7.jpg
If I continue, it says "file has already been added"

Now, if I go to my album, I see this:
http://img106.imageshack.us/img106/1537/thumbgl5.jpg
If I click on the picture, I get this
http://img113.imageshack.us/img113/6534/normaljh0.jpg

And the strange part is, if I click on the picture, I get a (fullsized) picture, hosted by arcor. So it seems that only the thumbs and normal album view is not working. The fullsize picture itself is correctly linked in the database.

What could that be? Any help?
Logged

HinDu

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: External Images Links / Use "remote" storage servers
« Reply #68 on: August 30, 2006, 08:33:43 pm »

If I continue, it says "file has already been added"

It actually says

Code: [Select]
Picture already added: http://foto.arcor-online.net/palb/alben/85/357385/3164386530316330.jpg to path: /Winterzeit/Weihnacht

Back to the main form : Back
Logged

HinDu

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: External Images Links / Use "remote" storage servers
« Reply #69 on: August 31, 2006, 12:47:26 pm »

oh and here is the debug from the "database error":

===============================================
There was an error while processing a database query.

While executing query "Select rlogid FROM cpg149_remote_log WHERE picurl='http://foto.arcor-online.net/palb/alben/85/357385/3164386530316330.jpg'" on 0

mySQL error: Table 'db175712587.cpg149_remote_log' doesn't exist

File: /homepages/21/d13576347/htdocs/cpg149/include/functions.inc.php - Line: 249
===============================================
Logged

karpate

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: External Images Links / Use "remote" storage servers
« Reply #70 on: September 30, 2006, 10:17:19 am »

hi
I installed the hack. It worked so far on my cpg version 1.4.9. But when I checked the albums on my webspace, I got the thumb,normal and original picture of the remote file. I installed the hack according to the installation.txt. What went wrong?
Thanks for helping!
Logged

gandhi51

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 17
    • La Hutte en mousse!
Re: External Images Links / Use "remote" storage servers
« Reply #71 on: October 04, 2006, 07:30:48 pm »

Hi all!

First, thanx you Flux for your contribution! I'm using your hack (beta4) since 2 weeks now. It works fine.

I want to add a little contribution too.
The hack is only usable by the administrator. If you want to let some (trusted) people to use it, see my solution for an Apache server (certainly not very good for security, but it works!):


First found the eight line of files.php
Quote
if (!GALLERY_ADMIN_MODE) die('Access denied');
and delete it (wooow, it is bad for the security... i know :-[).

Next, add a .htaccess file in the directory where you put files.php
Quote
<Files files.php>
PerlSetVar AuthFile /path/to/your/.htpasswd
AuthName "Restricted acces"
AuthType Basic
require valid-user
</Files>

Be carreful, my webhost is 'Free'. And i need to use special syntax in my htaccess file because Free is using a modified apache server.

I give this only as an exemple. I'm not a programmer and not a expert in security (as you can see  ;))

Lots of websites gives information about htaccess.

Thanx!
Logged
Sans douceur, pas de torture ?

sectioni

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: External Images Links / Use "remote" storage servers
« Reply #72 on: November 13, 2006, 04:16:00 am »

My webhost (Powweb) switched to new servers and now will not allow fopen on remote urls.  I'm not very good with php and I know this is a loaded question, but is there an alternative to using fopen?  I've used this mod for over a year and I love it, but now my host won't let me use it with fopen.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: External Images Links / Use "remote" storage servers
« Reply #73 on: November 13, 2006, 07:56:48 am »

No.
Logged

cmatte

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: External Images Links / Use "remote" storage servers
« Reply #74 on: March 05, 2007, 07:02:08 pm »

Hi,
I installed this mod with cpg1.4.10 .
Everything seems to work fine except the fact that nothing happens:
Code: [Select]
File Uploaded : monum.txt
File Size : 2728
Category already exists: Foto Parigi 2007
Album already exists: Monumenti e oggetti
Adding to list:[...]
39 Remote Pictures Links Found
0 Remote Pictures in the database
After filtering 39 NEW Remote Pictures will be added.
Then, nothing happens, the category is being created but no photos appear there...
What's wrong?
Logged

ElEsteban

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: External Images Links / Use "remote" storage servers
« Reply #75 on: April 24, 2007, 03:34:33 pm »

There are one free hosting that have "allow_url_fopen" set to on?

Post here please...

Thanks ;)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: External Images Links / Use "remote" storage servers
« Reply #76 on: April 24, 2007, 06:54:43 pm »

Free webhosting is not being discussed here - there's a sticky thread on the General discussion board that discusses free webhosts, and it's the only thread where we allow this type of discussion. Reasons: (1) we don't want other threads to become cluttered with adverts (2) free webhosts frequently change their policy on what they allow and disallow. Any information would soon be outdated.

allow_url_fopen is a security hole, that's why free webhosts disable it - you will hardly find one that has it enabled.

This entire mod is silly in the first place - imo we should close it; either get decent webspace (which is cheap) or review the idea to host a web gallery if you can't afford it. Use one of the many free picture/multimedia hosting sites that are already available.
Logged

sevy

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: External Images Links / Use "remote" storage servers
« Reply #77 on: August 20, 2007, 09:45:01 am »

Stealing other sites bandwidth this? This is great idea, I hope you guys get it too work. You could can add a little check box host remote from this site when the user uploads the picture or video. I'm operating a couple of sites and saving space is the name of the game. There are hundreds of Image hosting sites out there. I know I'll switch to this gallery if I had an option like this one. Good luck!!
Logged

zendiz

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: External Images Links / Use "remote" storage servers
« Reply #78 on: January 14, 2008, 12:31:12 pm »

I don't get it.

It seems like great hack but when I have like 20000 pics sitting on server, and I need to manually make a txt file with each pic location..pff
 :( ....sounds a lot of work.

Why not write something that detects all images in remote folder(s), then stores that in local db with pointing to remote url.  Doesn't that sound cleaner?

server 1 (image/video data storage) <- modscript -> server 2 database coppermine website/database with remote urls.


Or am I missing something?
Logged

eK3eKyToPa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
Re: External Images Links / Use "remote" storage servers
« Reply #79 on: January 18, 2008, 04:19:07 pm »

I'm trying to put in the gallery , picture from remote server, but as I see there is error.
Picture is here http://webek.data.bg/cpg_2.JPG
and the Error is :
Code: [Select]
1. http://webek.data.bg/cpg_2.JPG HTTP/1.1 302 FoundIf not possible to import this URL please say how to trace the original url of the picture
Logged
Pages: 1 2 3 [4] 5   Go Up
 

Page created in 0.048 seconds with 20 queries.