./albums/ outside of coppermine root? ./albums/ outside of coppermine root?
 

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]

Main Menu

./albums/ outside of coppermine root?

Started by soccerbs, October 27, 2004, 07:00:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

soccerbs

I moved my albums/ directory outside of the coppermine root.  For example coppermine is installed in httpdocs/gallery and I moved my album to httpdocs/images/storiesalbums.  I could not upload pictures and I had the path correct in the config.   

My album is working fine for all the images i batch loaded using ftp.  I just could not use the single file upload.  The directorys are all set to 777, but I still get the upload error that "has been asked a million times"

After a little time I think I solved my problem, but I am still a little confused.....

I peeked in the uploads.php it seemed to me that ./albums/edit was hardcoded in several places.    I changed this to my new directory location ../imagesstories/albums/edit and it seemed to work.  Does this upload.php file not pull the directory info from the config file?  Should it?  Should I have approached this differently?  Thanks

Brad

PS this coppermine gallery is sweet and I have it working well with my mambo install - not fully integrated by any means, but now I can share my images between the two!

Joachim Müller

there are indeed some buggy lines of code that have "albums/" hardcoded in them, instead of respecting the albums folder settings from the config. Those bugs should have been ironed out by now in the cvs, but apparently not in the package that is available for download. You should either modify the files yourself (enough PHP know-how needed) or get the files from the web cvs (stable branch). If you're feeling adventurous, you could check out the devel version (cpg1.4.0) as well, but you have to understand that you will have to use all devel files or none (no mish-mash of file versions), and there's no suport for it (the devel version is not recommended yet for production sites).
You should however use a relative path (something along the lines "../images/storiesalbums/") instead of an absolute path in your coppermine settings anyway.

Joachim

redtroll

What if I whish to save my album on another disk?
I would prefer if I was able to specify the real path eg, /home/user1/albums, not relative path.

Joachim Müller

That's easy: leave the albums path in coppermine config as it is right now, and use symlinks. Create one symlink in the coppermine dir that points to wherever you want.

Joachim

redtroll

I allready uses symlinks, but it would be nice if it was possible to enter a absolute UNC path or just an ordinary absolute path in Coppermine.

/Paul

Joachim Müller

I think the possibility to specify absolute paths was not included as an option into coppermine, because of two reasons:
  • portability: most people use coppermine in a webhosted environment. Having relative paths makes changing hosts a lot easier than absolute ones.
  • usability: most newbie users don't realize there's a difference between an absolute path and the path from their webroot to a subfolder. As PHP usually is set up not be able to read the whole file system, it's impossible for a script to determine where it actually resides in (and server vars are not an option either, as they don't exist in the same way on all server setups).
  • permissions: it's not easy for a php script to determine the permissions for folders - it's more likely users will be confused and have permission issues if they store files outside the coppermine path, that's why we recommend to keep them inside the coppermine folder
So basically, what you request would be technically possible, but for ease of use is not recommended. Advanced users like you should be able to work with relative paths and the workarounds discussed above, it's no "life or death" situation, just nice to have. Leaving everything as-is just makes it easier for newbies - coppermine setup is hard enough already for them (making life hard enough for us supporters as well ;)), that's why I'd vote for allowing only relative paths for that setting in the future.

Joachim