Xaraya and G2
RDR
Joined: 2005-09-29
Posts: 16 |
![]() |
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 . Is the Xaraya module trying to create a directory in my cgi-bin directory? Any ideas are appreciated. ~Desi |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
please post a phpinfo link 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. |
|
RDR
Joined: 2005-09-29
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 |
|
valiant
Joined: 2003-01-04
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. |
|
RDR
Joined: 2005-09-29
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... |
|
valiant
Joined: 2003-01-04
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. to your problem: instead of the phpinfo, maybe better use this in all three folders: maybe chown -R the g2data folder to this user and it's hopefully fixed. |
|
RDR
Joined: 2005-09-29
Posts: 16 |
![]() |
g2sites/brmc1412/ folder: g2/install folder: xaraya folder: Regarding the chown -R, I get "operation not permitted" when I try it. |
|
RDR
Joined: 2005-09-29
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). Quote:
One way to prevent it from happening in the future is switch php version to cgi version php instead of apache mod php. cgi version of php runs under domain basis. so the files created by script will be owned by domain main user. But please ensure it is applied to your script requirement. Quote:
When comes to difference between cgi-php and mod_php, Somebody put it this way and it makes sense to me: |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
the whoami files don't work, internal server error. but your webhost confirms my suspicion. i guess your changing things right now, since nothing works on your box ATM. |
|
RDR
Joined: 2005-09-29
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". |
|
RDR
Joined: 2005-09-29
Posts: 16 |
![]() |
I was trying the .htaccess directives. The whoami scripts all showed 'apache' when I ran them... |
|
RDR
Joined: 2005-09-29
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? |
|
valiant
Joined: 2003-01-04
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? then the relativeG2Path that you should enter is g2sites/brmc1412 |
|
RDR
Joined: 2005-09-29
Posts: 16 |
![]() |
That's the relative path, but there's also an 'include path', and I don't know what to set it to. |
|
valiant
Joined: 2003-01-04
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? |
|
RDR
Joined: 2005-09-29
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? |
|
valiant
Joined: 2003-01-04
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 |
|
RDR
Joined: 2005-09-29
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. |
|
RDR
Joined: 2005-09-29
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 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: PHP: Warning At: /home/virtual/site460/fst/var/www/html/g2/modules/core/classes/GalleryPlatform.class (Line: 622) mkdir(../../g2sites): Permission denied 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? |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
ah, that remembers me of another issue. but i'm not sure what the reason was. let's try it this time with specifying the include path explicitely: relative path: |
|
RDR
Joined: 2005-09-29
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... |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
with what urls do you access your xaraya and your g2 standalone (multisite) sites ? |
|
RDR
Joined: 2005-09-29
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. |
|
valiant
Joined: 2003-01-04
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. |
|