External Images Links / Use "remote" storage servers - Page 4 External Images Links / Use "remote" storage servers - Page 4
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

External Images Links / Use "remote" storage servers

Started by flux, October 10, 2005, 01:32:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

viperpurple

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
TTFN :P

Adam

viperpurple

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
TTFN :P

Adam

viperpurple

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
TTFN :P

Adam

flux

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

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  :)

TTFN :P

Adam

jko

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

igor666

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

HinDu

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
/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?

HinDu

Quote from: HinDu on August 30, 2006, 08:29:37 PMIf I continue, it says "file has already been added"

It actually says

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

Back to the main form : Back

HinDu

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
===============================================

karpate

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!

gandhi51

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
Quoteif (!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!
Sans douceur, pas de torture ?

sectioni

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.

Joachim Müller


cmatte

Hi,
I installed this mod with cpg1.4.10 .
Everything seems to work fine except the fact that nothing happens:
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?

ElEsteban

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

Post here please...

Thanks ;)

Joachim Müller

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.

sevy

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!!

zendiz

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?

eK3eKyToPa

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 :
1. http://webek.data.bg/cpg_2.JPG HTTP/1.1 302 Found
If not possible to import this URL please say how to trace the original url of the picture