Validation Error: WPG2 plugin cannot locate the Gallery2 file ... embed.php

hud

Joined: 2007-09-27
Posts: 2
Posted: Fri, 2007-10-12 20:22

I have Gallery 2.2.3 installed, Wordpress 2.3 installed. I put WPG2 3.0.2 into place in the plugins dir, activate it in the wordpress admin, and then when I go to the 'WPG2' tab in there, I see

"WPG2 Status: Failed
Wordpress Compatible? Success
URI to Gallery2 Ok? Success
Gallery2 can be located in G2 File Path? Failed
Gallery2 can be initialised? Skipped Due to Validation Error
..."

When I take a look on the 'WPG2 Paths' tab, I see this:

"WPG2 Paths Status: Invalid
Validation Error: WPG2 plugin cannot locate the Gallery2 file /domains/<mydomainname>.com/public_html/gallery/embed.php"

(note that I replaced my literal domain name text with the placeholder <mydomainname>; yes, the directory in that filepath is actually named the name of my domain name + ".com")

Hmmm, interesting, while typing out this posting, I just now thought to give a relative filepath a try. I just changed my "Gallery 2 File Path" field from the previous value of "/domains/<mydomainname>.com/public_html/gallery/embed.php" to a new value of "../../gallery/", click "update options", and now it says "WPG2 Paths Status: Valid", and back over on the "WPG2" tab I see "WPG2 Validation Check: Valid", all green.

So, all is well it seems.

Well, wait a minute. I just went to my site, clicked on the 'WPG2' link on the sidebar, and on the resulting page all that's displayed is the error: "Fatal error: Undefined class name 'galleryembed' in /home/<myusername>/domains/<mydomainname>.com/public_html/wordpress/wp-content/plugins/wpg2/wpg2embed.inc on line 50"

Ah HA! THAT was my problem. See, this site is on my hosting provider, to which all that I have is ftp access, and when i connect via ftp, it already places me into the '/home/<myusername>' directory, so from my perspective I never usually get to see the FULL path on the server. To me it just looks like I should be telling WPG2 that the "Gallery 2 File Path" should be "/domains/<mydomainname>.com/public_html/gallery/embed.php", as I had originally set it. But in reality, I was omitting the "prefix" part, the "/home/<myusername>" part of the full filepath that I never usually get to see. It was only upon seeing that "Fatal error" error message above that I finally realized that I needed to give the "Gallery 2 File Path" field the FULL filepath value: "/home/<myusername>/domains/<mydomainname>.com/public_html/gallery/"

Ok, so, bottom line is, during the course of typing this posting, I figured my own problem out. ;) However, I think it's still worthwhile for me to post this anyway, in case what I encountered and 'fixed' may be of help to somebody else who runs into the same situation.

Thanks.

-hud

 
hud

Joined: 2007-09-27
Posts: 2
Posted: Fri, 2007-10-12 20:24

just to be clear, i figured out my own problem (as I described above), all is well, my embedded gallery page is displaying properly.

 
ClimbingMonkey

Joined: 2005-03-18
Posts: 62
Posted: Sun, 2007-10-14 08:09

Glad you got it worked out... :)

---------------------------------------------------
Wordpress / Gallery2 (WPG2) Developer
My Site: http://www.marcnjami.com/

 
petri
petri's picture

Joined: 2005-12-15
Posts: 253
Posted: Fri, 2007-12-28 10:00

Hello,
I have the same problem but still cannot solve it with this answer.
I have Gallery 2.21, Wordpress 2.3.1 and WPG2 3.0.2 installed.
My website homepage is http://www.x.org/gallery/main.php (going there from www.x.org) and my WP url is a subdomain of my website : words.x.org

cannot find the real URL to put in the WPG2 path, I get this answer :

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/httpd/vhosts/x.org/httpdocs/gallery/embed.php) is not within the allowed path(s): (/home/httpd/vhosts/x.org/subdomains/words/httpdocs:/tmp) in /home/httpd/vhosts/x.org/subdomains/words/httpdocs/wp-content/plugins/wpg2/wpg2options.inc on line 87

Does it mean I cannot link Gallery and WP when WP is in a subdomain ?

oups..... could it be because I have Gallery 2.2.1 instead of 2.2.2 ? If yes, is there an easy way to correct it wihtout having to upgrade ?

thanx in advance to anybody having the answer to my problem

Gallery version = 2.2.1 core 1.2.0.1
PHP version = 4.3.9 apache2handler
Webserver = Apache/2.0.46 (Red Hat)
Database = mysql 4.0.25, lock.system=flock
Toolkits = ArchiveUpload, SquareThumb, Gd, Exif, Thumbnail
Acceleration = none, none
Operating system = Linux commodus.metanet.ch 2.4.21-47.0.1.ELsmp #1 SMP Fri Oct 13 17:56:20 EDT 2006 i686
Default theme = coquille
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; fr) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3
Rows in GalleryAccessMap table = 162
Rows in GalleryAccessSubscriberMap table = 5783
Rows in GalleryUser table = 20
Rows in GalleryItem table = 5770
Rows in GalleryAlbumItem table = 173
Rows in GalleryCacheMap table = 0

 
petri
petri's picture

Joined: 2005-12-15
Posts: 253
Posted: Wed, 2008-01-09 08:44

OK I got it.... my webhoster told me I cannot rewrite files from a subdomain to the main domain...

So WPG2 does not work if one puts it in a subdomain having Gallery in the main domain

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Wed, 2008-01-09 23:27

Yes Gallery2 can be in a different subdirectory but your hosting firm does not allow this, as your hosting firm has open_basedir restriction in effect (hence the Warning: file_exists() [function.file-exists]: open_basedir restriction in effect.) thus preventing WPG2 plugin from talking to/from your Gallery2 installation which is located in a different location..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
rz0001

Joined: 2008-01-19
Posts: 1
Posted: Sat, 2008-01-19 22:27

Same problem...paths are good...dir/subdir are good....perms are good.

Simply: "embed.php" does not exist anywhere. Not even in original zip file.
Just found and installed this for first time today using "wpg2.3.0.2.zip"

Is this a defective install or does it create php files on the fly?

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Tue, 2008-01-22 23:49

rz0001

FYI.. embed.php is a Gallery2 File, not a WPG2 file, it sounds like the WPG2 cannot find your Gallery2 installation..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
tritrek

Joined: 2008-01-25
Posts: 1
Posted: Fri, 2008-01-25 13:51

The funny thing is I have the same problem. Only that it is with a little curl :)

I enter:

http://www.xxxxxxxx.xxxet/g2data/

as the base url, and after saving it changes to:

http:/www.xxxxxxxx.xxxet/g2data/

That is one "/" less after the "http:"

Anyone having a resolution?

 
zinik

Joined: 2008-12-13
Posts: 2
Posted: Wed, 2009-02-11 07:21

Hi, I don't know if this will work for you... What I did was:

Deactivate WPG2 Plugin and Activate it again.

Simply reactivate the plugin and it will look for the path.

Cheers,