![]() |
File upload Problems - Printable Version +- LetoDMS Community Forum (https://community.letodms.com) +-- Forum: LetoDMS Support (https://community.letodms.com/forumdisplay.php?fid=4) +--- Forum: Technical Support (https://community.letodms.com/forumdisplay.php?fid=10) +--- Thread: File upload Problems (/showthread.php?tid=127) |
RE: File upload Problems - alekseyn - 08-10-2010 (08-10-2010, 03:08 PM)matteo lucarelli Wrote: Your settings seem ok and the error message MUST be a hosting issue. I support the above. sometimes with Linux hosting, "www" is a symlink to "public_html" folder... so please check your folders. RE: File upload Problems - spacecop - 08-12-2010 my home directory is on the hosting server ist /users/schule/www/ my URL is http://schule.square7.ch/ These are the information from my hoster (square7.ch). under the home directoy I make other subdirectories. In /1/ I uploaded your Script via FTP. Before I created a database via phpmyadmin. I created a folder /users/schule/www/1/download chmod 777 and I recieved a error when I try to upload a file (as a test a pdf file 44kb). I created a folder /users/schule/www/download chmod 777 and I recieved a error when I try to upload a file (as a test a pdf file 44kb). I have no more ideas, suggestions or what ever. Seems to me that your script is not running on my hoster. RE: File upload Problems - alekseyn - 08-12-2010 Spacecop, hang in there ![]() Matteo... coding question for you: this function causes the problem when the safe_mod or open_basedir is in effect: function called by lines: PHP Code: // copy file so the function explodes a path into this: PHP Code: Array ( and then you check if each element is a folder and if not, you recreate it with PHP Code: if( !is_dir( $mkfolder ) ){ so in this case, the restriction in effect, does not allow folder /users to be even checked... then my question is, why can't we just do the checking for any folder ONLY inside the $_contentDir? why checking the full path? RE: File upload Problems - alekseyn - 08-12-2010 so, below is my suggested replacement for this function in inc.FileUtils.php: PHP Code: function makeDir($path) I am also attaching the modified file. PLEASE ALWAYS BACKUP YOUR FILES BEFORE ANY FILE REPLACEMENT OR MODIFICATION. try is spacecop - use the attached file (replace yours in /inc/ folder) and let us know... Matteo... please check my logic.... RE: File upload Problems - matteo lucarelli - 08-12-2010 Good solution spacecop, I'll apply the patch in the next (1.10) version BTW: I cannot aswer to your why: I've not written all the code in LetoDMS! RE: File upload Problems - alekseyn - 08-12-2010 that was me Matteo )))) RE: File upload Problems - spacecop - 08-12-2010 UNBELIEVABLE!!!! YOUR'RE GREAT!!! IT WORKS!!!! Thank your very, very much!!!! But I have another question. I uploaded a pdf file. When I click on it I have two options: view online or download. Download works, but online viewing is not possible. Is there somewhere a file which I can modify to see various uploaded fils online? (For example: word, excel, powerpoint, openoffice documents, pdf, jpg, gif etc.) And when I upload a document the script create automaticly a new folder named with the filename which I uploaded. Is it possible that no folder will be created when I upload a file? Thanks a lot again for your solution!!!!!!!! RE: File upload Problems - matteo lucarelli - 08-12-2010 The view on line is browser dependable function (not every system has embedded viewers). You can set wich document will have view online option inside the inc/inc.Settings.php file modifing the variable: var $_viewOnlineFileTypes RE: File upload Problems - spacecop - 08-12-2010 ok. I tried to upload a word file and recieved this error Warning: exec() has been disabled for security reasons in /users/schule/www/1/inc/inc.ClassDocument.php on line 1599 Warning: Cannot modify header information - headers already sent by (output started at /users/schule/www/1/inc/inc.ClassDocument.php:1599) in /users/schule/www/1/op/op.AddDocument.php on line 166 What means that? Sorry that I make so much trouble.... RE: File upload Problems - alekseyn - 08-12-2010 (08-12-2010, 07:55 PM)spacecop Wrote: ok. it means that the file conversion will not be possible, because your host desabled this command... sorry... but you can still upload if you disable this option in settings |