Advanced search  

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

Pages: 1 2 [3] 4   Go Down

Author Topic: [cpg1.4.x]: Download a Zipped Album With Basic Security  (Read 162477 times)

0 Members and 2 Guests are viewing this topic.

Rebel Racer

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Download a Zipped Album With Basic Security
« Reply #40 on: August 08, 2008, 09:07:57 pm »

Hi,

Thanks for making this mod - I've been looking for something like this for ages! If only I could get it to work!  :'(

I followed your instructions carefully, but when it came time to test the script, I get a humongous error message, it reads:

Quote
Warning: Cannot modify header information - headers already sent by (output started at /home/content/d/o/c/dockingbay101/html/images/include/config.inc.php:17) in /home/content/d/o/c/dockingbay101/html/images/zip.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /home/content/d/o/c/dockingbay101/html/images/include/config.inc.php:17) in /home/content/d/o/c/dockingbay101/html/images/zip.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /home/content/d/o/c/dockingbay101/html/images/include/config.inc.php:17) in /home/content/d/o/c/dockingbay101/html/images/zip.php on line 73

...and is followed by millions of nonsensical characters.

You can see it in action on my site here: http://www.dockingbay101.com/images/thumbnails.php?album=1

Any idea what I'm doing wrong/how to fix this?

Thanks again for your time!
Logged

Nibbler

  • Guest
Re: Download a Zipped Album With Basic Security
« Reply #41 on: August 09, 2008, 02:18:51 pm »

Looks like you were hacked but didn't clean everything up. Remove the iframe from include/config.inc.php and any whitespace after the closing ?>
Logged

Rebel Racer

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Download a Zipped Album With Basic Security
« Reply #42 on: August 09, 2008, 11:23:22 pm »

Thank you for your insightful instructions, Nibbler! I did as you instructed and the script now works flawlessly.

Many, many thanks!
Logged

screech

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Download a Zipped Album With Basic Security
« Reply #43 on: October 26, 2008, 07:40:27 pm »

First i hope you can excuse me for my bad english..

I do all things i can, All works except the ZIP File i download directly.

this is the error i get after the downloading: !   "C:\Documents and Settings\Administrateur\Bureau\2008+-+Visite+de+Soumia.zip: Unexpected end of archive"

If i try to download directly from the FTP in the zipfile folder, the generated ZIP file Work, but it didn't work if i download it from the link in the galery.

I try with PCLZIP 2-5 and 2-6 the error is the same.

(I try version 1.1 and 1.2 too but no change...)

This is a link to my gallery : http://screech2.free.fr

Can you help me ?
Logged

erostew

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 63
Re: Download a Zipped Album With Basic Security
« Reply #44 on: October 27, 2008, 02:35:13 am »

First i hope you can excuse me for my bad english..

I do all things i can, All works except the ZIP File i download directly.

this is the error i get after the downloading: !   "C:\Documents and Settings\Administrateur\Bureau\2008+-+Visite+de+Soumia.zip: Unexpected end of archive"

If i try to download directly from the FTP in the zipfile folder, the generated ZIP file Work, but it didn't work if i download it from the link in the galery.

I try with PCLZIP 2-5 and 2-6 the error is the same.

(I try version 1.1 and 1.2 too but no change...)

This is a link to my gallery : http://screech2.free.fr

Can you help me ?


I can't say what the problem is for sure. If the zip file is okay by ftp then it seems the script is working okay. I would guess it is an error caused by the server configuration. For some reason it seems not to transfer the zip file correctly. Not sure what kind of Apache that server is running as the headers don't say. There is some small possibility that the problem might be caused by the "/" in the album name. You could try renaming it to something like 01.02.2008 and see if it makes any difference.

Maybe someone else will have a different suggestion but I'm afraid I don't have any other ideas. Good luck.
Logged

screech

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Download a Zipped Album With Basic Security
« Reply #45 on: October 27, 2008, 12:59:20 pm »

Thanks for your help.

I try to rename the album name without "/" (now it's 10-08-2008) but the problem is the same.

My Apache serveur is  hosted by my provider "Free" So it's impossible for me to change settings on it...

But if it's help

PHP : PHP Version 4.4.3-dev
MySQL : 5.0.51a
But i'm sorry i can't found the version of the Apache serveur...

If you think about some other hint ;) i take it ;) thank you.
Logged

primera

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Download a Zipped Album With Basic Security
« Reply #46 on: November 12, 2008, 07:11:46 am »

Hi all, i am the newbie of the php and Coppermine, i've just follow all the step ...and get the error code which is...

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

did anyone know about this ?

thx ~
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Download a Zipped Album With Basic Security
« Reply #47 on: November 12, 2008, 07:19:20 am »

Means that you haven't followed the instructions to a tee. Undo your edits and re-apply the mod extra throughly. Impossible to advise anything else, since we can't see what you did.
Logged

primera

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Download a Zipped Album With Basic Security
« Reply #48 on: November 12, 2008, 08:19:36 am »

yeah ... this time i step by step clearly. and it's work ...thanks Joachim Müller !!
but anything came out....

the page "You don't have permission to do that!" come out when i click on "download album"  even i am using administrator to log in..

Logged

stardust

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: Download a Zipped Album With Basic Security
« Reply #49 on: January 11, 2009, 08:49:15 pm »

This was actually very fast and easy to do, so thank you so much for this mod!

I would like it if the mod recognized the registered user, so we wouldn't have to change the album permission. In that way, anyone can view the content in the albums, but the Download Album link only appears when viewers are logged in. But I don't know if this is possible? Or I think somewhere in this thread, it's said that the security can only be done through album properties?  ???

Oh well, this is still a great mod. Thanks again!
Logged

Artin1

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Download a Zipped Album With Basic Security
« Reply #50 on: April 04, 2009, 03:36:21 am »

I installed the script. And when I click on the download album link i get this error:

Code: [Select]
Warning: opendir(zipfiles/) [function.opendir]: failed to open dir: No such file or directory in /home/deltadai/public_html/gallery/zip.php on line 13

Warning: readdir(): supplied argument is not a valid Directory resource in /home/deltadai/public_html/gallery/zip.php on line 15

Warning: closedir(): supplied argument is not a valid Directory resource in /home/deltadai/public_html/gallery/zip.php on line 20
Error : PCLZIP_ERR_READ_OPEN_FAIL (-2) : Unable to open archive 'zipfiles/Madison+-+April.zip' in wb mode

 ??? Any ideas?

Thanks,
Artin
Logged

Artin1

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Download a Zipped Album With Basic Security
« Reply #51 on: April 04, 2009, 03:45:34 am »

Sorry, I fixed it! Sorry about that. I can't edit my previous post.

Artin
Logged

quake_jatekos

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
I cannot use this f*cking forum
« Reply #52 on: April 10, 2009, 10:56:02 am »

Hi all.
I post here since I can post here. I do not find any button to make a new discussion or whatever.
Here is a Tar downloader (All, large pictures, norm pictures)
There is a short info inside the Zip.
Hope it works.

By
Logged

quake_jatekos

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: I cannot use this f*cking forum
« Reply #53 on: April 10, 2009, 11:06:58 am »

Hi all.
I post here since I can post here. I do not find any button to make a new discussion or whatever.
Here is a Tar downloader (All, large pictures, norm pictures)
There is a short info inside the Zip.
Hope it works.

By

Sorry, the help txt was not saved :):)
Here:

Coppermine "download all" easy

I created a coppermine patch to everyone who do not like shopping carts and others.
To whom want to share their coppermine gallery for download (.tar).
- Download cpg1.4.21.zip
- Owerwrite the files you can find here

You will see the change in the coppermine having icons with title for categories and albums:
   Video Camera icon: "Videók és nagy képek letöltése" == Download ALL Recursively
   Big Camera icon: "Nagy képek letöltése" == Download Only images (mime=image/*)
   Small Camera icon: "Csak normál képek letöltése" == Download normal_* images

- No security considerations! Since Coppermine security is suxx.
- No internationalization Since I'm lazy (there is only 4 new text, above 3 plus "Letöltés" == Download)
- Needs Pear installed with "Archive_Tar"

Have fun
quake_jatekos@freemail.hu
Logged

modrej

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Download a Zipped Album With Basic Security
« Reply #54 on: April 10, 2009, 04:44:12 pm »

hi... i've just installed this MOD, it's great, but...

is it possible to change it some easy way, so archive name includes the last directory, which album is inside?

for example album is in this directory tree: year -> month -> event -> album and i would like to have archive name like this: event+album.zip

i cant do that myself

thx for help
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: I cannot use this f*cking forum
« Reply #55 on: April 11, 2009, 09:58:59 am »

I post here since I can post here. I do not find any button to make a new discussion or whatever.
Sure. Whatever. Read up "Modifications/Add-Ons/Hacks > About this board - READ".
Logged

GecKoTDF

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Download a Zipped Album With Basic Security
« Reply #56 on: June 19, 2009, 02:43:49 am »

I tested in my Coppermine Photo Gallery 1.4.24 (stable) and works great no problem y download SecureZip 1.2 and the last version of the plugin in the web PCLZIP Release 2.8, and no problem, i follow the steps one by one and everything okay, thanks for the mod.
Logged

FireBird2003

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Download a Zipped Album With Basic Security
« Reply #57 on: June 22, 2009, 06:08:14 pm »

Hi,

I implemented a better security check. These few lines should check the user-groups for the current user against the user-group which is used by the album:

Code: [Select]
/* updated Check up by FireBird2003 {*/
$sql = 'SELECT user_group_list FROM `'.$CONFIG['TABLE_PREFIX'].'users` where `user_id` = ' . USER_ID;
$result = mysql_query($sql) OR die(mysql_error());
$priv2 = mysql_fetch_assoc($result);
$user_group_list = split ("[, ]", $priv2["user_group_list"]);
if (($priv["visibility"] != '0') && (!in_array($priv["visibility"], $user_group_list))){
/* } // updated Check up by FireBird2003 */

it shoud be placed after
Code: [Select]
$sql = 'SELECT visibility FROM `'.$CONFIG['TABLE_PREFIX'].'albums` where `aid` = ' . $aid;
$result = mysql_query($sql) OR die(mysql_error());
$priv = mysql_fetch_assoc($result)

replacing the followed if-clause.

There is still a problem: If I choose a big album I get a file sized 0kb. Any ideas for that?

Attached you wil find my changed zip.php.tx. Rename it to zip.php.

Thx in advance.
Logged

the1shadow

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Download a Zipped Album With Basic Security
« Reply #58 on: August 23, 2009, 07:43:48 pm »

Just wanted to throw in a quick note... This mod works GREAT and is exactly what I needed.  The instructions are very clear and easy to follow for installation.  Worked great off the bat.  Thanks so much!
Logged

nellygrl

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Download a Zipped Album With Basic Security
« Reply #59 on: September 01, 2009, 04:57:28 pm »

The second step says to add the code you posted just above the "?>" at the end of template.php. I looksed on my theme to add the code, but the ?> wasn'y on it. I was thinking that it was because I have a different them, so I checked the classic, rany_day, and water_drop themes to see what it should look like, but none of them had it either and I've never even touched those themes.

Can anyone offer any insight on this problem?
Logged
Pages: 1 2 [3] 4   Go Up
 

Page created in 0.092 seconds with 20 queries.