Hello all,
I have a Xaraya 1.0 RC3 site up and running with a fresh install, and a G2 multisite standalone install that is working as intended. I added the Gallery2 module, and set the 'mode.embed.only' to true.
Then I go to the Gallery 2 module admin page in Xaraya and add the relative path to the g2 site. I don't know what to set the include path to (I could use some help here).
When I click the 'Update Configuration' button, I get an error as follows:
Quote:
At: /home/virtual/site460/fst/var/www/html/g2/modules/core/classes/GalleryPlatform.class (Line: 622) mkdir(../../../cgi-bin): Permission denied
Explanation:
There is an error in the PHP code that is being processed
.
Is the Xaraya module trying to create a directory in my cgi-bin directory? Any ideas are appreciated.
~Desi
Posts: 32509
please post a phpinfo link
FAQ: What information is required when I ask for help in the forums?
i suspect that you're using suexec or so and that the user running the xaraya directory is another user than the one running the gallery2 directory.
or it may have something to do with open_basedir.
Posts: 16
PHPInfo Link:
http://69.94.117.92/g2/phpinfo.php
I'm showing the same user for both the xaraya and gallery (g2) directories, but when gallery is running and creating directories (Under the g2data directory, for instance) the directory owner is 'apache'. This is different from the owner of gallery and xaraya files and directories.
The directory structure is a follows:
/home
..|---vascouting
........|--mainwebsite_cgi
........|....|--g2data
........|..........|--brmc1412 (Site 1 of gallery multisite install)
........|
........|--mainwebsite_html
.............|--g2sites
.............|....|--brmc1412
.............|
.............|--g2
..................| (g2 core install)
Posts: 32509
ah, cgi directory. so you're using php-cgi (directories are owned by you) for your g2 multisite and mod_php for xaraya (directories are owned by apache).
either both need to be in the cgi dir or both in the mainwebsite_html.
this is just a theory, but it's based on a few facts, e.g. you're using mod_suexec.
Posts: 16
Only the photos (g2data) are in the cgi directory. Otherwise, both the g2 and xaraya directories are under the mainwebsite_html directory. The g2sites directory contains the actual gallery multisites (The ones with main.php) - only the data is under the cgi directory.
Are you saying that my albums cannot be under the cgi directory? I guess I could move them, but I think that they still end up with the same owner. That is determined by the user context of the process that creates them, right?
I have done nothing to either xaraya or g2 to make them run under any context other than the default, and likewise I haven't set up either of them to run via either cgi or mod_php explicitly -- I guess that I'm assuming htat they would both run the same, but maybe not?
valiant, I can set you up with full access if you want - This is a brand new site and the DNS isn't even set up yet. :P You can feel free to poke around and see what you can...
Posts: 32509
i see. so then my theory is wrong. since processes run in the context of the user where the script is started and that's in mainwebsite_html.
i still see no reason why to put g2data dirs in a cgi directory. g2data should be above the webroot, not accessible from the web. else the whole permission system of g2 (image firewall) can be circumvented.
to your problem:
please put a phpinfo in your g2/install/ folder and a phpinfo in your g2sites/brmc1412/ folder and a last one in your xaraya root dir.
then we can compare the user/group of the three.
instead of the phpinfo, maybe better use this in all three folders:
<?php system('whoami'); ?>
maybe chown -R the g2data folder to this user and it's hopefully fixed.
Posts: 16
g2sites/brmc1412/ folder:
http://69.94.117.92/g2sites/brmc1412/whoami.php
g2/install folder:
http://69.94.117.92/g2/install/whoami.php
xaraya folder:
http://69.94.117.92/whoami.php
Regarding the chown -R, I get "operation not permitted" when I try it.
Posts: 16
Here's a couple of comments that I received back from the support group at my hosting company. I asked them why, during my xaraya multisites installation, some of the directories received owners of '48' (apache) and others received an owner of 'vascouting' (my user account).
Posts: 32509
the whoami files don't work, internal server error. but your webhost confirms my suspicion.
maybe, for some reason, not all of your index.php / main.php files are owned by the same user (either apache or vascouting). and that's the problem.
i guess your changing things right now, since nothing works on your box ATM.
Posts: 16
FYI, I tried including the two directives suggested above in my xaraya .htaccess file, and I got nothing but "http 500 - server errors".
Posts: 16
I was trying the .htaccess directives. The whoami scripts all showed 'apache' when I ran them...
Posts: 16
Perhaps I'm not setting the include path in xaraya and I should be? The mainwebsite_html and mainwebsite_cgi directories are really /var/www/html and /var/www/cgi-bin if I go down to the root in my ftp client and back up. 'vascouting' is the owner of both directories.
The error message indicates that it is trying to make a directory in "../../../cgi-bin", which would equate to the /var/www/cgi-bin directory according to this structure.
What directory gets created when it's in embedded mode but not in standalone mode? Could I create the directory manually, which would make 'vascouting' the owner?
Posts: 32509
nothing special gets created when it's in embedded mode. it just does the normal g2 stuff, cache some stuff in g2data/cache/, that's it.
where's your xaraya root directory?
assuming it's in
........|--mainwebsite_html
then the relativeG2Path that you should enter is g2sites/brmc1412
Posts: 16
That's the relative path, but there's also an 'include path', and I don't know what to set it to.
Posts: 32509
as the text says, leave it just empty. it will figure out the include path on its own.
where xaraya installed, what path?
Posts: 16
Xaraya is right where you said, in 'mainwebsite_html'.
I'm thinking that I'll get the cgi php working via .htaccess, and then move the g2data directory up one level, so that it is a sibling to the 'mainwebsite_cgi' directory, instead of a child under it.
Does that sound like it might work, or am I wasting my time?
Posts: 32509
what's the value it figured out for your include path?
i'd try a few things, this should work. don't know how you managed to screw it up
Posts: 16
heheh, it never did figure out a value for an include path, unless it didn't tell me about it. I enter the relative path, leave the include path blank, and press the button. The next thing I see is the error in the first post.
As usual, the problem is more than likely behind the keyboard, rather than in the computer.
Posts: 16
After much gnashing of teeth, I have reconfigured gallery so that the g2data is stored under the html directory (Forget the image firewall for now), as follows:
/home
..|--vascouting
......|
......|--mainwebsite_html
..........|--g2sites
..........|....|--brmc1412 (Site 1 of gallery multisite install)
..........|........|--g2data (Data for Site 1)
..........|
..........|--g2
..............| (g2 core install)
and I ran Bharat's Cleanup.php script against the directories from /g2sites/brmc1412 and lower. This should change the permissions to 755 on directories and 666 on files.
I then changed the permissions on the /mainwebsite_html/g2sites and /mainwebsite_html/g2sites/brmc1412 directories to 777 so that the integration plugin can write and create a directory if it needs to.
When I enter Xaraya and enter the "Modify Config" page, I enter ./g2sites/brmc1412 in the relative path and click the button, and I get:
Notice that the mkdir path has changed, but I still get the permission denied error.
Why is it trying to do a mkdir at all? It looks like it's trying to do it from the GalleryPlatform.class file, but why would the integration module kick off a directory creation?
Any ideas?
Posts: 32509
ah, that remembers me of another issue. but i'm not sure what the reason was.
what's the storage path in your brmc1412/config.php ?`
let's try it this time with specifying the include path explicitely:
relative path:
g2sites/brmc1412
include path:
/home/vascouting/mainwebsite_html/g2sites/brmc1412/
hit ok.
Posts: 16
I get the same result (../../g2sites permission denied). For the include path, I have to use
/home/virtual/site460/fst/var/www/html/g2sites/brmc1412/
since the mainwebsite_html directory is really
/home/virtual/site460/fst/var/www/html/
Could it be something with multisites interacting with the integration module? It seems like it's trying to do something in the /g2sites directory, and neither of the paths that I gave it pointed there...
Posts: 32509
with what urls do you access your xaraya and your g2 standalone (multisite) sites ?
Posts: 16
Xaraya: http://brmc1412.vascouting.org (Using multisites module)
Gallery: http://brmc1412.vascouting.org/g2sites/brmc1412 (Multisite install. Core files are at http://brmc1412.vascouting.org/g2)
NOTE: These might not be in DNS yet, so I'll send you the IP in a private message and you can add it to your HOSTS file.
Posts: 32509
maybe this has to do with your virtual thing. i don't really understand it and i don't have time to debug it right now. sorry.