Change data directory

SOGJC

Joined: 2013-11-07
Posts: 3
Posted: Thu, 2013-11-07 05:03

Hello Everyone
I just install the new version of gallery3 and I'm looking a way to change the data directory. I saw some instruction doing it on the index.php but when i change that and i go the gallery it saying; the gallery is successfully install, and when i click start using gallery it doesn't do anything. Any help?

Thanks

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2013-11-07 05:46

http://codex.galleryproject.org/Gallery3:FAQ#I_want_to_move_my_.2Fvar_directory
Did you move the content of gallery3/var to the new location as well?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
SOGJC

Joined: 2013-11-07
Posts: 3
Posted: Thu, 2013-11-07 13:46

Thanks for reply,
I did that and it say Success but when i click on Start Using Gallery it doesn't do anything.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2013-11-07 14:37

Perhaps it is a server setting preventing it from working. One one of my hosts I was not able to do it either. I did not pursue seeing waht the issue was as I have enough space on this host and location.
Perhaps others can offer some guidance.
You have to install gallery first. Did you do that in the default location? Start Using Gallery should only show when you first install it.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
SOGJC

Joined: 2013-11-07
Posts: 3
Posted: Fri, 2013-11-08 14:18

Yes i install gallery first, then change the var/ path to the directory i want but it just get stuck like a new installation.

Thanks

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2013-11-08 17:57

I looked at this last night and I think there is more to change to make it work. I will investigate a bit more this weekend.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
robert12

Joined: 2014-01-02
Posts: 2
Posted: Thu, 2014-01-02 19:42

Be sure to give the respective permissions to the folder, give 777 permission to the folder if it does not work well then contact support your hosting provider to help resolve this, another good idea is to also seek help elsewhere or look youtube tutorials where on many occasions to explain how to solve this problem

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2014-01-14 22:09

In addition to the index.php change from the FAQ you need to edit a couple of functions in the items model. Edit gallery3/modules/gallery/models/item.php
find:

  public function file_url($full_uri=false) {
    $relative_path = "var/albums/" . $this->relative_path();

and change var/albums/ as needed.

find:

  public function thumb_url($full_uri=false) {
    $cache_buster = $this->_cache_buster($this->thumb_path());
    $relative_path = "var/thumbs/" . $this->relative_path();

and change var/thumbs/ as needed.

find:

 public function resize_url($full_uri=false) {
    $relative_path = "var/resizes/" . $this->relative_path();

and change var/resizes/ as needed.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team