Path to images (2 instances of CPG, 1 DB) Path to images (2 instances of CPG, 1 DB)
 

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

Path to images (2 instances of CPG, 1 DB)

Started by jriba, January 14, 2005, 05:44:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jriba

Hello,

I have installed 2 instances of coppermine (i.e.- one is in "http://mysite.com/CPG/" (instance 1) and another one in "http://mysite.com/CPG/instance2/" (instance 2).

I changed the DB info in ../include/config.inc.php for instance 2 to match those for instance 1, so that I can use both instances with the same DB.

At first, none of the pictures in instance 2 showed up.  I solved this problem by changing the path stored in "fullpath" in the "cpg_config" table from "albums/" to "../albums/".  Once I did this, I could see all the pictures from both instances of CPG.

The problem that I encounter now is that I cannot send e-cards, because the pictures do not show up.  The path that the ecard tries to show the picture looks like this "http://mysite.com/../albums/pic.jpg"  when it should look like this: "http://mysite.com/albums/pic.jpg".

Obviously, this problem I caused it when I changed the path in the DB under "fullpath".

My question here is:  Is there an easier way for me to run 2 instances of CPG with the same DB (and on the same server), just in different directories (as I'm trying to do), and have everything work fine?

Thanks!

Abbas Ali

Do not change the full path of albums directory in config. Keep it albums/

Delete the albums directory from Instance2 and make a sym link albums in instance2 of cpg which points to the albums directory of instance1.
albums -> /path/to/cpgInstance1/albums/

I think this will solve your problem.
Chief Geek at Ranium Systems

jriba

Thanks for your reply Ali.. Quick questiom (not too familiar with these things).   I assume the "sym link" is something setup in the server itself, and nothing to do with coppermine's code, Right?

If so, do you know howyo do this (or anyone)? (my hosting has CPanel)..

thanks!

Tranz

sym link is used on *nix servers and likely, you would need your sys admin to set it up for you.

Abbas Ali

I dont know whether you can make a sym link through CPanel or not.

But if you have shell access (SSH) to the server then you can make a sym link (if you have permissions).

Log on to the server through shell. Go to the directory of instance2 of cpg. Then type following command.

ln -s /path/to/cpgInstance1/albums/ albums

P.S.: The web server must have 'follow sym links' set to on (Contact web master to know) for the above procedure to work

If you dont have shell access or you dont have permissions to make a sym link then contact you web master or sys admin and tell him to do the needfull.
Chief Geek at Ranium Systems