1
jimbofoxman
I hate xcgal, can't get it to upload

I did some batch uploads many months ago when I set my site. Now I cannot upload any picture to the public galleries or to my private gallery.

I get the famous error...

Failed to create directory ../../../gallery/../../../usergallery/10001 !

If 
the page does not automatically reloadplease click here


And the php debug shows...

function.mkdirNo such file or directory in file modules/xcgal/db_input.php line 113

function.chmodNo such file or directory in file modules/xcgal/db_input.php line 114


BUT......if I uncomment the SILLY_SAFE_MODE in include/init.inc.php then I get only the following

Destination directory ../../../gallery/../../../usergalleryis not writable by the script!!!


I would like to use this rather than MYALBUM as I can determine which groups can do what.

I'm pretty sure I have the permissions set on the directories, 777

I swear I've searched hi and low on these forums and can't resolve it. Very frustrating

2
irmtfan
Re: I hate xcgal, can't get it to upload
  • 2006/8/28 3:28

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


try to chmode usergallery to 777

also upgrade to xcgal 2.0.2

3
jimbofoxman
Re: I hate xcgal, can't get it to upload

I have 2.0.2 (sorry forgot to mention that in original post)

I've tried the 777 already.

I swear I've done everything in the forums, but to no avail.

4
McNaz
Re: I hate xcgal, can't get it to upload
  • 2006/8/28 12:35

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Quote:
I've tried the 777 already.


I've experienced this very recently and it is 100% to do with permissions.

My xcgal worked once I set my usergallery to 777. If you do not have a usergallery directory then the albums directory needs to chmodding to 777 as Apache might not have the priveldges of creating the usergallery for you.

Quote:
Failed to create directory ../../../gallery/../../../usergallery/10001


I seem to recall that the correct directory is xcgal and not gallery. Is this the case or did you type the above by hand to illustrate your error?

HTH.

Cheers.

5
jimbofoxman
Re: I hate xcgal, can't get it to upload

Quote:

McNaz wrote:
Quote:
I've tried the 777 already.


I've experienced this very recently and it is 100% to do with permissions.

My xcgal worked once I set my usergallery to 777. If you do not have a usergallery directory then the albums directory needs to chmodding to 777 as Apache might not have the priveldges of creating the usergallery for you.


I have both the usergallery and the main gallery, both with CHMOD 777. I even tried changing the chmod to 777 for all my main galleries subdirectories.

Quote:
Quote:
Failed to create directory ../../../gallery/../../../usergallery/10001


I seem to recall that the correct directory is xcgal and not gallery. Is this the case or did you type the above by hand to illustrate your error?


No I changed the xcgal to gallery on my own. I've upload 400+ photos into it many months ago and it displays them ok. Just having problems uploading new photos to either the main galleries or private galleries.

6
McNaz
Re: I hate xcgal, can't get it to upload
  • 2006/8/28 14:33

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


The last thing I suggest is that you go through the xcgal source code and trace what is causing it to fail.

I know for certain that xcgal 2.02 works (which means it can upload directories) which suggests that the issue is on your server and not with the module.

if (!is_dir($dest_dir)) {
                    
mkdir($dest_diroctdec($xoopsModuleConfig['default_dir_mode']));
                    
chmod($dest_diroctdec($xoopsModuleConfig['default_dir_mode']));
                        if (!
is_dir($dest_dir)) redirect_header('index.php',2,sprintf(_MD_DB_ERR_MKDIR$dest_dir));
                        
$fp fopen($dest_dir.'/index.html''w');
                        
fwrite($fp' ');
                        
fclose($fp);
                }


.. either the mkdir or the chmod commands are failing to trigger the direct_header error message you are getting...

My money is still on permissions. That's as much as I can help without having access to your modified xcgal module and your server...

Good luck.

7
jimbofoxman
Re: I hate xcgal, can't get it to upload

Ok, contact my hosting support and got this response.

Quote:
We checked your XOOPS directory. The permissions of the following directories are set to (777):

uploads
templates_c
cache

This is not allowed by our servers configuration and is probably causing the problem. Our servers are running SuExec, which is the most secure environment for a shared hosting server. The scripts are run with the user of their owner (your CP user) and not with the user of the web server (apache). Thus, if a script has to be able to write to a file/directory - world-writable permissions are no longer needed. Actually, such permissions are considered as insecure and files with world-writable permissions will not be executed - the result will be "500 Server Error".

If your installation manual says that you should set world-writable permissions to some files/directories, you need to set permissions 775 or 755 instead - and your script will work properly. It is just not presumed that the server may be running a CGI wrapper (such as Suexec).

You can change the permissions in your Control panel -> File manager. The interface is located at the bottom of the page.

Please, contact us back if the problem persists. We will need the exact steps in order to reproduce the errors on our side, including all user names and passwords required to access your XOOPS application.


In regards to above, I changed both galleries to 775, tried it and then 755 and tried it. Still the original error.

Now that I've read that, I wonder if it relates to the GROUP permissions options in the module setup.

See below

Quote:
Pub. Upl. approval (1) and Priv. Upl. approval (2)


It shows notes for (1) and (2) as follows:

Quote:
(1) Uploads in a public album need admin approval
(2) Uploads in an album that belong to the user need admin approval


Do I want to check those YES or NO. I want certain groups to be able to upload public and private.

8
McNaz
Re: I hate xcgal, can't get it to upload
  • 2006/8/28 17:35

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Quote:
Now that I've read that, I wonder if it relates to the GROUP permissions options in the module setup.


Possibly but the error is being generated by the file creation instructions, which makes me think that it is not related to GROUP permissions, as that is XOOPS related and the server (?).

suExec... hmm....

Give this one last shot.

Can you lookup what the group permissions are on your albums directory? If not, can you ask your hosting company to change the albums directory group and user ownership to the same user and group at which your Apache server runs in.

Tell them that the suExec Apache process does not have the required permissions to create folders in the albums directory and ask them to set that directory to the correct permissions.

Again, good luck.

Cheers.

9
jimbofoxman
Re: I hate xcgal, can't get it to upload

Ok, I actually had my host support group look at my site and this is what they said.

Quote:
We managed to configure the XOOPS gallery module for you. We made the following changes to your Galleries Module Preferences:

Path to ImageMagick/Netpbm 'convert' utility: /usr/local/bin/
The album directory: ../../../gallery/
The directory for user pictures: [empty]

Then tested the upload functionality and managed to upload two test images to the server. The image files and the thumbnails generated from the ImageMagick program were properly saved to the /www/www/gallery/10023 directory on the server.


It did work, but forget using the USER PICTURES option. I set that back up just to see what would happen and it's back to this....

Quote:
Failed to create directory ../../../gallery/../../../usergallery/10001


So, is it a bug is the module that you can't setup both a main gallery directory and a user picture gallery? Unless I am misunderstanding it.

Now, if I leaver user pictures directory EMPTY, it works fine. I can create more public galleries, and my own private galleries. But what I don't like is the fact that everything goes into ONE giant folder so you have no way of sorting out the categories later on if you swith modules or something.

MyAlbum doesn't support user galleries, I don't think. Any other gallery options?

10
svaha
Re: I hate xcgal, can't get it to upload
  • 2006/8/29 0:07

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


As far as I know you should not use the usergallery (as Admin)for batch uploads.

I make subdirs in the gallery, ftp the files and than use batch upload to generate thumbs and so on. (as Admin)

Login

Who's Online

412 user(s) are online (365 user(s) are browsing Support Forums)


Members: 0


Guests: 412


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits