Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

problem using Master Profile
https://www.tinywebgallery.com/forum/viewtopic.php?f=13&t=2152
Page 1 of 1

Author:  reiver [ 20. Sep 2009, 09:38 ]
Post subject:  problem using Master Profile

I am trying to develop a site which I hope will use the JFU but am having problems when I use a Master Profile.

Everything works fine if I just let the users upload files to a directory called 'users'. This is OK but I'd like the users to upload to their own directory.

So if I then change it to use a Master Profile the JFU creates a new directory for each user and gives it CHMOD 777. The upload appears to work because the progress bar takes a few seconds to complete but the process then fails with the message.

Upload failed. 1 file(s) of 1 could not be uploaded.

I get an email saying that no files were uploaded but I cannot find a tfu.log file so don't have any clues why it failed.

If anyone can help then it would be much appreciated.

John
(using JFU v2.10)

Author:  TinyWebGallery [ 20. Sep 2009, 10:38 ]
Post subject: 

without master profiles it work? So it seems to be permission problem of the new folder. have you tried to give this folder other permissions?

do you get any errors in the server logs?

you can enable upload debugging in TFU 2.10.

in administration/components/com_joomla_flash_uploader/tfutfu_config.php

you find $enable_upload_debug = false;
set it it
$enable_upload_debug = true;

then each upload will debuged in tfu.log in the same directory.

then you see a little bit more details.

- Michael

Author:  reiver [ 20. Sep 2009, 16:10 ]
Post subject: 

Quote:
without master profiles it work? So it seems to be permission problem of the new folder. have you tried to give this folder other permissions?


The target directory has CHMOD 777 but I can change it if necessary.

I enabled error logging as you said and just ran two tests. The first was with Master Profile set to NO and this worked and the file was uploaded. It went into a directory called 'users' as it should have done, and not to the user's own directory.

The second was with Master Profile set to YES and this one failed. The part of the logfile says:

09.20.2009 14:48:09 - ERROR 2 in joomla_flash_uploader/tfu/tfu_upload.php, line 114: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 10003 is not allowed to access /var/www/vhosts/domain_snipped.org.uk/images/users/brian owned by uid 48

So although the user's own directory - called 'brian' - has write permissions, there is some reason why the JFU won't write to it.

I'm afraid I'm out of my depth when it comes to server configuration, but if you could point me in the right direction then that would be much appreciated.

Thanks for your help.

John

Author:  TinyWebGallery [ 20. Sep 2009, 18:03 ]
Post subject: 

Then it is clear.

The directory brian is created with php. But the directory users with ftp. and with save mode enabled you get a problem here because the owner of script is different.

currently the only solution is to disable save mode on your server. Ask your hoster if this is possible. if this is your server you can do this in php.ini.

- Michael

Author:  reiver [ 20. Sep 2009, 19:57 ]
Post subject: 

OK I'll ask the hosting company if it's possible.

Thanks for your help!

John

Author:  Fredric [ 1. Jan 2011, 23:40 ]
Post subject:  SAFE MODE Restriction in effect. The script whose uid/gid i

I have the same problem I use TWG 1.8.3 that I've puchased today. The safe_mode are set to on, and the cachesize for PHP is 32 MB.
In the fileuploader I am able to create directories etc, but when uploading the file are uploading but after this I get a message that says has failed.

Please help med solve this, it should be no problems to move files on the disk via FTP... But it seems that PHP fails.

The log:
01.01.2011 22:23:56 - 1. Config loaded
01.01.2011 22:23:56 - 2. Authenification sucessfull
01.01.2011 22:23:56 - 3. Directory read: __/__/pictures/2012-NewYearsEve
01.01.2011 22:23:56 - 3a. $_FILES content:
Array
(
[Filedata] => Array
(
[name] => DSC_1793.JPG
[type] => application/octet-stream
[tmp_name] => /tmp/phpKRdJP6
[error] => 0
[size] => 4491093
)

)

01.01.2011 22:23:56 - 4. Check valid extension: DSC_1793.JPG
01.01.2011 22:23:56 - 4a. Extension valid.
01.01.2011 22:23:57 - 5. Before move_uploaded_file : /tmp/phpKRdJP6 -> __/__/pictures/2012-NewYearsEve/DSC_1793.JPG
01.01.2011 22:23:57 - ERROR 2 in g.se/galleri/admin/upload/tfu_upload.php, line 106: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid/gid is 183328/183328 is not allowed to access /hsphere/local/home/verklig/verklig.se/galleri/pictures/2012-NewYearsEve owned by uid/gid 398/398
01.01.2011 22:23:57 - 5a. After move_uploaded_file.
01.01.2011 22:23:57 - 5b. Retry move_uploaded_file : /tmp/phpKRdJP6 -> __/__/pictures/2012-NewYearsEve/dsc_1793.jpg
01.01.2011 22:23:57 - ERROR 2 in g.se/galleri/admin/upload/tfu_upload.php, line 122: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid/gid is 183328/183328 is not allowed to access /hsphere/local/home/verklig/verklig.se/galleri/pictures/2012-NewYearsEve owned by uid/gid 398/398
01.01.2011 22:23:57 - 6. NOT uploaded.
01.01.2011 22:23:57 - 9. End upload
01.01.2011 22:23:57 - 10. End store session

Author:  TinyWebGallery [ 2. Jan 2011, 11:17 ]
Post subject:  Re: problem using Master Profile

The safe mode is your problem:

SAFE MODE Restriction in effect. The script whose uid/gid is 183328/183328 is not allowed to access /hsphere/local/home/verklig/verklig.se/galleri/pictures/2012-NewYearsEve owned by uid/gid 398/398

you can use the ftp mode to create directories. This would help if you can upload to the main folder! I have written a big howto about the safe mode if you like more details.

- Michael

Author:  Fredric [ 2. Jan 2011, 11:40 ]
Post subject:  Re: problem using Master Profile

I just received a Email from my ISP that they will change my server for a newer one, which means that I get safe_mode = off, 128 MB PHP Memory and a newer version of PHP... So I guess this will solve my problems?

What's the reason that the software are not moving the pictures from one folder to another. I don't get sense in this after reading the FAQ's... Probably this will help my problems I have in the Wordpress TFU/Sync?
IS it possible to integrate the Gallery in Wordpress easily? Where do I find a walk through...

Thanks!

Author:  TinyWebGallery [ 2. Jan 2011, 12:33 ]
Post subject:  Re: problem using Master Profile

Yes.

safe mode is explained here: http://www.tinywebgallery.com/de/faq.php#h30

It's not a problem of the software but a restriction of the server.

To integrate the gallery simply use an iframe wrapper which you can integrate into your page with the shortcode api. If I have some time i can provide a preconfigured.

- Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/