Thread: [openupload-devel] Can't upload my first file !
Status: Beta
Brought to you by:
tsdogs
|
From: Guillaume B. <gui...@gm...> - 2010-09-12 07:52:04
|
Hi ! I successfully (as I thought...) installed openupload. I'm using MySQL as db backend. The openupload folder has www-data:www-data rights (this is user and group which apache uses). But, as an admin or a registered user, I can't upload anything ! I select the file (very little, about 1k size), I click "Send"... and I juste see a blank page. The URL is mysite/index.php Nothing else happens. When I come back to see my list of files, I can't see it. I set syslog level to 5, and I don't see any error, only the line : "Sep 12 09:38:09 stock apache2: [openupload] IP=62.212.103.29 LOGIN=gUI MODULE=files ACTION=u REALACTION=uploadForm PLUGIN= RESULT=ALLOW MSG= " If you have any idea. Thank you very much ! gUI -- Pour la santé de votre ordinateur, préférez les logiciels libres. Lire son mail : http://www.mozilla-europe.org/fr/products/thunderbird/ Browser le web : http://www.mozilla-europe.org/fr/products/firefox/ Suite bureautique : http://fr.openoffice.org/ |
|
From: Alessandro B. <ts...@br...> - 2010-09-13 06:26:08
|
On Sun, 12 Sep 2010 09:51:57 +0200, Guillaume Betous <gui...@gm...> wrote: > Hi ! > > I successfully (as I thought...) installed openupload. I'm using MySQL as > db > backend. The openupload folder has www-data:www-data rights (this is user > and group which apache uses). > > But, as an admin or a registered user, I can't upload anything ! > > I select the file (very little, about 1k size), I click "Send"... and I > juste see a blank page. The URL is mysite/index.php > > Nothing else happens. When I come back to see my list of files, I can't see > it. > > I set syslog level to 5, and I don't see any error, only the line : > "Sep 12 09:38:09 stock apache2: [openupload] IP=62.212.103.29 LOGIN=gUI > MODULE=files ACTION=u REALACTION=uploadForm PLUGIN= RESULT=ALLOW MSG= > " > Hi, could you check your apache log file for any error. It could be many things, the data and templates_c directory must also be writable, which I suppose it already is. Are file uploads enabled in your php.ini? Alessandro |
|
From: Guillaume B. <gui...@gm...> - 2010-09-13 08:04:22
|
> could you check your apache log file for any error. > bingo ! thank you for your answer. here is the error message I found in apache.log : PHP Fatal error : Call to undefined method FilesModule::error() in /var/www/openupload/lib/modules/default/files.inc.php on line 164, referer: http://xxxxxx/index.php?action=u I checked on phpinfo() and file_uploads is On. My PHP installation is a standard LAMP install on Ubuntu 10.04. gUI |
|
From: Alessandro B. <ts...@br...> - 2010-09-14 22:58:16
|
On Mon, 13 Sep 2010 09:52:25 +0200, Guillaume Betous <gui...@gm...> wrote: >> could you check your apache log file for any error. >> > bingo ! > > thank you for your answer. > > here is the error message I found in apache.log : > PHP Fatal error : Call to undefined method FilesModule::error() in > /var/www/openupload/lib/modules/default/files.inc.php on line 164, > referer: http://xxxxxx/index.php?action=u > > I checked on phpinfo() and file_uploads is On. > > My PHP installation is a standard LAMP install on Ubuntu 10.04. > Ok, the problem of a blank page is the error. Probably at line 164 of that file it should be app()->error(... and not $this->error( beside that it probably means that your "data" directory is not writable by the apache user (www-data) or it does not exist, or that some other thing is blocking my script from moving the uploaded file to the destination path. Maybe an apparmor rule. If the latter is the case there should be some reference in some other system log. Alessandro |
|
From: Guillaume B. <gui...@gm...> - 2010-09-15 06:00:45
|
> Ok, the problem of a blank page is the error. > Probably at line 164 of that file it should be > app()->error(... > and not > $this->error( > I corrected that and now it seems to work : after clicking on "send" I have a new page where I can parameter various things (description, password etc.) > beside that it probably means that your "data" directory is not writable > by the apache user (www-data) or it does not exist, > I think I have the answer. The directory existes and has correct rights, but I set it to a path outside the ROOT of openupload. Maybe that is the problem ? I'd like to stock all files outside of /var/www. Is it possible ? Thank you very much for your help. gUI -- Pour la santé de votre ordinateur, préférez les logiciels libres. Lire son mail : http://www.mozilla-europe.org/fr/products/thunderbird/ Browser le web : http://www.mozilla-europe.org/fr/products/firefox/ Suite bureautique : http://fr.openoffice.org/ |
|
From: Alessandro B. <ts...@br...> - 2010-09-15 12:39:23
|
On Wed, 15 Sep 2010 08:00:38 +0200, Guillaume Betous <gui...@gm...> wrote: >> Ok, the problem of a blank page is the error. >> Probably at line 164 of that file it should be >> app()->error(... >> and not >> $this->error( >> > > I corrected that and now it seems to work : after clicking on "send" I have > a new page where I can parameter various things (description, password > etc.) > > >> beside that it probably means that your "data" directory is not writable >> by the apache user (www-data) or it does not exist, >> > > I think I have the answer. The directory existes and has correct rights, > but > I set it to a path outside the ROOT of openupload. Maybe that is the > problem > ? > > I'd like to stock all files outside of /var/www. Is it possible ? > Absolutely, that's the correct way of doing it. Only the openupload/www directory must be published on the web server, everything else should be outside the documentroot. If you get the page for the settings mean that the upload is done correctly only confirm the options to confirm the upload. Alessandro |
|
From: Guillaume B. <gui...@gm...> - 2010-09-15 11:09:24
|
> I'd like to stock all files outside of /var/www. Is it possible ? > I made /var/www/openupload/data a link from another directory (with huge disk space) and it works great ! Thank you again. gUI -- Pour la santé de votre ordinateur, préférez les logiciels libres. Lire son mail : http://www.mozilla-europe.org/fr/products/thunderbird/ Browser le web : http://www.mozilla-europe.org/fr/products/firefox/ Suite bureautique : http://fr.openoffice.org/ |
|
From: Alessandro B. <ts...@br...> - 2010-09-15 12:45:31
|
On Wed, 15 Sep 2010 13:09:15 +0200, Guillaume Betous <gui...@gm...> wrote: >> I'd like to stock all files outside of /var/www. Is it possible ? >> > > I made /var/www/openupload/data a link from another directory (with huge > disk space) and it works great ! > I'm not sure this is the right solution. If apache followsymlinks is enabled this would allow somebody to download the file directly. My suggestion is change the config to point to that path, and be sure that the upload tmp directory is in the same partition. Alessandro |