Again /var directory

otografias

Joined: 2011-10-20
Posts: 41
Posted: Sun, 2014-01-12 12:53

Hello!, i need to change var directory in a gallery instalation in use.
then:

1) I copied /var to the new location: (/homepages/8/d495792104/htdocs/home/wp-content/uploads/var)
2) I edited index.php and write the new location:

Quote:
define("VARPATH", realpath("/homepages/8/d495792104/htdocs/home/wp-content/uploads/var") . "/");

3) I rename my original Gallery "/var" to /"delete_var"

4) go to my gallery and and gallery try to make a new installation!!

5) Change my index to original file and create a local.php :

Quote:
<?
define("VARPATH", realpath("/homepages/8/d495792104/htdocs/home/wp-content/uploads/var") . "/");
?>

6) Runs Gallery ... and try to make a new installation again!
7) rename again the "/delete_var" to original name "/var". and all ok (Uffff).
I'm very confused.
thanks!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2014-01-12 18:22
Quote:
Hello!, i need to change var directory in a gallery instalation in use.

Why?
I'm very confused as well.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Sun, 2014-01-12 18:52

I ever upload photos which Lrgallery3 plugin... I can work Lightroom and Raw files, and automatics update the gallery... it´s a clean and faster way to administrate and maintain a mirrow.
At the same time, some of this photos are used in other site (wordpress). I used to get photos from gallery which wp plugins but they are very slow, and rigid in presentation...

I realized to a good way to use the same photos in Gallery3 and in a Wordpress-plugin slide was used a WPplugin that only can take images of a local directory: /home/wp-content/uploads .

And believed that Gallery3 was more flexible in the location of his /var directory.

I hope I explained well, It is a bit tricky....

better see your self:

http://paseapase.com/
and
galería.paseapase.com/

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Mon, 2014-01-13 20:14

I'm doing something wrong... But... what?!

 
floridave
floridave's picture

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

Adding items to the var directory will not auto add them to G3.
You have to use one oft he upload methods.

I'm still confused as to what you want to do.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Tue, 2014-01-14 14:59

I have a gallery installation, and need to change the location of /var directory.
I thought it was more easy to do...

 
spags

Joined: 2010-03-26
Posts: 120
Posted: Tue, 2014-01-14 21:03

Is it possible that the permissions on your new var folder are wrong? Would that make Gallery think you want to start a new installation?

 
floridave
floridave's picture

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

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

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Wed, 2014-01-15 16:16

All OK!!! .... But.
I changed the path but must to use "http" path

"http://paseapase.com/wp-content/uploads/var"

BUT Gallery start a new installation again.... >:-(((

But then revising again the "index.php" and found at the end of a file this:

Quote:
default:
print "To install:\n";
print " php index.php install -d database -h host -u user -p password -x table_prefix -g3p gallery3_admin_password \n\n";
print "To upgrade:\n";
print " php index.php upgrade\n\n";
print "Developer-only features:\n";
print " ** CAUTION! THESE FEATURES -WILL- DAMAGE YOUR INSTALL **\n";
print " php index.php package # create new installer files\n";
print " php index.php test # run unit tests\n";
exit(1);
}
} else {
define("TEST_MODE", 0);
define("VARPATH", realpath("/var") . "/");
}
define("TMPPATH", VARPATH . "tmp/");

then edited

Quote:
define("VARPATH",realpath("my/new/realpath/var")."/");

an all works FINE!!!

thanks to all

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Wed, 2014-01-15 16:18

ok this folder has 777 permissions, but i changed permissions to root folders too ...

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Mon, 2014-01-20 21:24

Only two bugs... neither cooliris presentation, nor Photowidget works.... can't see any error menage, but not work!

http://galeria.paseapase.com

:-S

thanks for help!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2014-01-20 22:00

Your RSS feeds don't work either.
http://galeria.paseapase.com/photowidget/recent_xml
you have the domain twice.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Tue, 2014-01-21 20:47

sorry.. don´t understand. this...
how can i make this mistake?
where is it duplicate?
...
¿!
thanks... again!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2014-01-22 01:48

What do you have for

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

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Wed, 2014-01-22 15:54
Quote:
public function thumb_url($full_uri=false) {
$cache_buster = $this->_cache_buster($this->thumb_path());
$relative_path = "http://paseapase.com/wp-content/uploads/var/thumbs/" . $this->relative_path();

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2014-01-22 16:05

Does changing
$relative_path = "http://paseapase.com/wp-content/uploads/var/thumbs/" . $this->relative_path();
to
$relative_path = "/wp-content/uploads/var/thumbs/" . $this->relative_path();
work?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Wed, 2014-01-22 22:10

nope...
All thumbs are lost.... and rss error:

Quote:
<images>
<image href="http://galeria.paseapase.com/T_2013/Zafr/Ferrera-Morante-Talavant/Oto_05octubre2013_300">
http://galeria.paseapase.com//wp-content/uploads/var/thumbs/Tempora/Zafr/Ferrera%2CMorante%2C-Talavant/Oto_05octubre2013_300.jpg?m=1390338827
</image>
<image href="http://galeria.paseapase.com/T_2013/Zafr/Ferrera-Morante-Talavant/Oto_05octubre2013_296">
http://galeria.paseapase.com//wp-content/uploads/var/thumbs/Tempora/Zafr/Ferrera%2CMorante%2C-Talavant/Oto_05octubre2013_296.jpg?m=1390338803
</image>
....etc...

:-(

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Thu, 2014-01-23 16:41

I tried to type the internal path:

Quote:
$relative_path = "/homepages/8/d495792104/htdocs/home/wp-content/uploads/var/thumbs/" . $this->relative_path();

and same error: Thumbs are lost. and in widget link:

http://galeria.paseapase.com/photowidget/recent_xml

Quote:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<images>
<image href="http://galeria.paseapase.com/T_2013/Zafr/Ferrera-Morante-Talavant/Oto_05octubre2013_300">
http://galeria.paseapase.com//homepages/8/d495792104/htdocs/home/wp-content/uploads/var/thumbs/Tempora/Zafr/Ferrera%2CMorante%2C-Talavant/Oto_05octubre2013_300.jpg?m=1390338827
</image>

etc...

the thumbs must be in "paseapase.com/wp-content/uploads/var/thumbs/"

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2014-01-23 17:59

Must be something about the sub-domain. It might be something that was not accounted for. I bet it might work if your gallery was not installed in a sub-domain.
I don't have time right now to install gallery in a sub-domain to test on moving the /var directory. It is not that common a request.
Perhaps others have been successfully in doing so and can report back.

Post back if you can sort it out for others to benefit.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Thu, 2014-01-23 18:33

ok :-)
i´m still working hard to resolved

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Tue, 2014-01-28 13:35

i just translate a copy of installation to a new folder:

http://paseapase.com/galeria

and again rss has a duplicate domain....

:-S

any suggestion?

 
floridave
floridave's picture

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

Do other aspects work? If so then I suggested editing the RSS module.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
otografias

Joined: 2011-10-20
Posts: 41
Posted: Tue, 2014-01-28 21:10

glubs... i read codes.... but not very sure what are looking for! but...

... I´ts very funny!! i have two gallerys and only One Var directory :-S

um... I can think of several uses for this.
jajaja