Posted by ultimike on October 10, 2008 at 6:16pm
| Project: | Memcache API and Integration |
| Version: | 7.x-1.x-dev |
| Component: | memcache_admin |
| Category: | bug report |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
When "memcache admin" is enabled, and the "show memcache statistics at the bottom of each page" option is selected on admin/settings/memcache, file uploads fail.
The fix is easy, just replace the following line in memcache_admin_init():
if (($user->uid == 0) || strstr($_SERVER['PHP_SELF'], 'update.php') || strstr($_GET['q'], 'autocomplete')) {
with this (heavily borrowing from devel module)
if (($user->uid == 0) || strstr($_SERVER['PHP_SELF'], 'update.php') || strstr($_GET['q'], 'autocomplete') || $_GET['q'] == 'admin/content/node-settings/rebuild' || $_GET['q'] == 'upload/js' || substr($_GET['q'], 0, strlen('system/files')) == 'system/files') {
-mike
Comments
#1
Can someone test this and confirm it solves the problem? (Attaching a real patch would certainly help...)
#2
#3
Hi,
i run into this issue on a drupal installation using imagecache. for some reason imagecache is redirecting to itsself if a picture is rebuild with imagemagick or gd-lib. in this case drupal has not run the full bootstrap so no theming is available. memcache admin still wants so theme the memcache stats, and therefor has to implement theming functions. but in php's shutdown function working directory is set to / so no relative requires or includes are possible.
in memcache.admin on line 223 you still check for soe content-types which don't like text outputs, maybe it is usefull to check some more (dunno what header exists while processing images) here?
#4
Memcache is responsible for many instances of file uploads breaking in the FileField queue, see #297035: HTTP error 0 . Rather than checking certain paths however, a more reliable method would be checking headers for any type other than "text/html", as Devel module currently does.
#5
I just installed memache, and when i try to upload a file i get AHAH problem and it breaks - Version 6.x - 1.6. Any solutions?
#6
Are you able to duplicate with the latest -dev snapshot?
#7
Problem is still active in 6.x-1.8.
I'll fix this soon as it would be nice to have memcache admin not break all upload fields ...
#8
Re-opening this. #372810: Lots of failed include_once errors is duplicate.
#9
#10
Duplicated, and patch applied (with some minor changes). Confirmed that file uploads were broken before the patch, and work after the patch (using the core upload module).
http://drupalcode.org/project/memcache.git/commitdiff/566d3e9
#11
Whoops, needs to be ported to 7.x-dev.
#12
Applied fine via cherry pick. Pushed.
#13
Automatically closed -- issue fixed for 2 weeks with no activity.