PDA

View Full Version : problem with uploading attachments in Dynamics


larina
03-14-2008, 03:40 AM
Hello,

I tried so many hours and found no solution.

The uploaded attachments in Dynamics are not shown.

I looked at the chmod of the direction ... the "attach" folder itself is at 777, but all folders that are made under it for each user has chmod 755. When I change those sub-folders manually to 777, the attachment-uploads function. But as those sub-folders are created by the system, I cannot always have a look at it and change chmod.

I have spent hours searching a way to chmod 777 all new created folders under "attach" automatically. I give it up now. As I saw, in the newattachment.php is a row: @chmod($filesavepath, 0777);
... but why doesn't it function at my site?

My server has save mode on, is this the problem? If yes, is there a way to fix this problem without turning safe mode off? I don't really like to turn it off.

Please excuse my bad english :rolleyes:

larina

Brian
03-14-2008, 09:54 AM
Any new folders for attachments should have it's permissions set to 0777 automatically when the folder is created. You can see this in the fetch_upload_folders() function in the forum/includes/vba_dyna_class_image.php file.
mkdir($makepath, 0777);

You could try adding this line right below that one and see if it helps.
chmod($makepath, 0777);

There's not really anything else I'm aware of (including safe mode) that would create a problem with the folder permissions. If that doesn't help though and you would like to submit a support ticket via the Members' Area here then I'll be glad to take a look at things for you.

Our Sponsors
 

larina
03-14-2008, 07:02 PM
Hi Brian,

thank you very much! The second line did help to make the new subfolders automatically to 777. But now there is a new problem ... it doesn't write anymore into these subfolders, the images don't get saved there. I don't have a clue, I will open a support ticket.

There is a further problem that I yesterday forgot to mention ... I also tried with some bigger ypg-images ... when I try uploading those, I get the following messages:

Warnung: copy(): SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /var/www/vhosts/domain.com/httpdocs/dynamics/attach/2 owned by uid 33 in /includes/vba_dyna_class_image.php (Zeile 249)

Warnung: copy(/var/www/vhosts/domain.com/httpdocs/dynamics/attach/2/diadem_1205531396_thumb.jpg): failed to open stream: No such file or directory in /includes/vba_dyna_class_image.php (Zeile 249)

Warnung: imagecreatefromjpeg(/var/www/vhosts/domain.com/httpdocs/dynamics/attach/2/diadem_1205531396_thumb.jpg): failed to open stream: No such file or directory in /includes/vba_dyna_class_image.php (Zeile 341)

Anyway, as I thought the problem would be solved when the subfolders get writable, I didn't think to much about this. But something seems to be very wrong with my Dynamics or something around at my site. I also don't think it's a real safe mode problem, if so others should have it too.

larina

larina
03-16-2008, 04:34 PM
In the meanwhile I tried changing the owner of all directories and files at the website to a ftp-user, as I installed everything as root. But this also doesn't help. So I changed everything back to owner root.

Any help, Brian?