Closed (fixed)
Project:
upload (simple)
Version:
master
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Feb 2005 at 11:18 UTC
Updated:
1 Oct 2007 at 15:12 UTC
When I try to upload a file using public method, I get the following:
http://domain.com/files/_0 bytes
When I change it to private method, I get the following:
system/files?file=_0 bytes
I've tried changing my file and tmp paths a million times, and have even chmoded the directories to 777, still nothing!
Sadly no errors in the logs. If anyone can help I would appreciate it as I'm going totally mad.
Thanks
Geoffrey
Comments
Comment #1
(not verified) commentedWhat drupal version are you using? I haven't update it to 4.5 or CVS HEAD yet so I dont think it will work on anything except 4.4.
Comment #2
djhomeless commentedAhh,
I'm using 4.5.2. Any plans to update? I suppose I could try rolling back Drupal but I'm not sure what I would lose out on...
Sorry,
Geoffrey
Comment #3
shane birley commentedHaving exact same issue on 4.5.2 with Private turned on.
http://drupal.org/node/12598
Comment #4
shane birley commentedYes, the odd thing is that there is no error in the logs. Very strange.
Comment #5
shane birley commentedI have been chatting with one of my hosts and I believe they are on to something. I did a comparison with several different hosts and their PHP setups and have noticed something: every host that has "safe-mode" off, the upload module and attachment module (which both appear to exhibit the same issue) work fine. But, if PHP has "safe-mode" turned on, the modules don't allow for file uploads. Here is what we has been discovered / investigated / looked at / etc:
Thus, here we are.
Comment #6
shane birley commentedSo, it would appear a few lines of code for the uploading of files is requiring some attention.
Comment #7
shane birley commentedhttp://drupal.org/node/12598
Comment #8
shane birley commentedWill this issue be corrected in 4.6.0? Is this why there is no movement on this problem?
Comment #9
praseodym commentedI get the same with 4.6.0.
Comment #10
vidyak commentedHi all
I like having safe_mode on .. but fortunately I have root access to our server so we did a thing and created the directories with the script owner being the directory owner. This is not a tidy work around, but a small thing to ensure security.
Otherwise, I am in love with drupal.
Yours
Vidya
Comment #11
shane birley commentedI have updated several sites with 4.6.0 now and I still get the same error. Hopefully, this will be corrected soon. I know that "safe mode" on a PHP server is not overly helpful, but I had a coder review it (who doesn't want to repair it) but he has indicated (as my previous helper) that the code is simple to fix.
(whine)
Comment #12
Yoshia Makino commentedPerhaps this thread will shed some light on this problem for shared hosted people:
http://drupal.org/node/5961
4.6.0 did not fix this issue but for those willing, just patch file.inc with
http://drupal.org/files/issues/file_open_basedir_03.patch
ini_set() will not work since the upload_tmp_dir is a PHP_INI_SYSTEM meaning php.ini is the only way to set the variable.
Hope this helps.
Comment #13
shane birley commentedComment #14
morimo commentedIf you have webmin go to php configuration and check your maximum upload file size.