Difficulties in uploading have been observed in some fresh installation, some of them where using php safe mode.
Then the problem is present, it is impossible to upload a file.
A patch has been proposed and has been reported to solve the issue.
http://drupal.org/node/1099160
Should this patch been comited to core?

CommentFileSizeAuthor
#8 d8_drupal_realpath-1226786-8.patch811 bytesAnonymous (not verified)
#2 drupal_realpath-1226786-2.patch722 bytesAnonymous (not verified)

Comments

yaworsk’s picture

subscribing.

Had this issue and updating line 1524 in file.inc resolved it. Not sure what detail is needed but I originally tried:

- 777 permissions on the tmp directory and sites/default/files directory, both unsuccessful.
- Turned off php safe mode in php.ini and was unsuccessful.
- created and defined a different temp directory via admin/config/media/file-system
- defined a temp directory in php.ini

I can also provide the modules installed if that helps...
pete

Anonymous’s picture

StatusFileSize
new722 bytes

This patch was posted on the thread linked in the first issue and needs to be reviewed.

Anonymous’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, drupal_realpath-1226786-2.patch, failed testing.

Anonymous’s picture

Version: 7.4 » 7.x-dev
Anonymous’s picture

Status: Needs work » Needs review
Anonymous’s picture

#2: drupal_realpath-1226786-2.patch queued for re-testing.

Anonymous’s picture

Version: 7.x-dev » 8.x-dev
StatusFileSize
new811 bytes

Patch for 8.x-dev attached.

eric_a’s picture

Status: Needs review » Closed (duplicate)

The patch from Akaoni in #109 of #1002048: Work around move_uploaded_file issues with safe_mode and open_basedir is similar to the one here. That issue has had reviews and is close to a definite RTBC status. It needs an issue summary and the patch itself needs a little polishing up. You're very welcome to join in over there!

Nnet’s picture

Status: Closed (duplicate) » Needs review

#8: d8_drupal_realpath-1226786-8.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, d8_drupal_realpath-1226786-8.patch, failed testing.

bensnyder’s picture

Priority: Normal » Major

This solved my problem in #1600610: Media allowed file size not used on file/add/upload. It took me more than 3 weeks of off and on debugging to find this core hack to temporarily fix the problem. I have many sites running on this VPS and this is the only D7 install that I have this problem. Weird!

Bumping to major.

bensnyder’s picture

Status: Needs work » Needs review
tim.plunkett’s picture

Priority: Major » Normal
Issue tags: +Needs issue summary update, +Needs backport to D7

Not sure that this qualifies as major.

Can someone post clear steps to reproduce in the issue summary?

jbrown’s picture

bensnyder’s picture

Status: Closed (duplicate) » Needs review

@jbrown - not a duplicate since I am having this issue with a site and only the patch provided in #2 in *this issue* resolves the problem.

bensnyder’s picture

Updated to latest Drupal core 7.x-dev today (which is the 7.15 code) and uploads started to fail again. After re-applying the fix in #2, I am able to upload files successfully again.

This is an anomaly to this one drupal site sitting on the VPS. I have about 20 other site on the VPS that all work fine without the patch.

Thoughts?

Status: Needs review » Needs work

The last submitted patch, 8: d8_drupal_realpath-1226786-8.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

20th’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)