Images revisited

I am reposting because after 26 hours, I have somewhat narrowed my problem down.

Why is it that I can upload and resize an avatar, choose whichever folder I want place it in but, cannot get the media library to do the same.

I have gone into the backend settings and moved the directories around which made absolutely no difference, the urls stayed the same.

I understand that the files when uploaded go into a folder in wp-content/blogs.dir/files/1/2009/10 and that the "finished product" is to go into a folder in the wordpressmu root directory called "blog" to a folder called "files" (which by the way doesn't exist I even created said same without any luck)

What functions/scripts differ between the way uploads are handled via the media gallery/upload dialogue in the "editors" box and the way an avatar is uploaded and handled (I have in fact uploaded some HUGE avatar files that got thumb nailed down quite nicely)

Yes I realize I was foolish enough to go out spend money on a real server versus going out and grabbing freebsd and apache and spending hours with a text editor creating configs, and exploding tulips and then like, but this makes absolutely no sense. All worked fine when I was running 2.7

Anyone? Thank you

  • rgrone

    Thanks!


    RewriteEngine On
    RewriteBase /blog/

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

  • rgrone

    out of the box, even has a url rewrite update.. I guess Microsoft wants to make certain they don't get sued over their source code for servers much like the browser incident.

    Of course, with the purchase of Microsoft products, you have thousands of developers, and security experts working around the clock to provide the support however, I think if I called and stated that my Server was broken because MU won't cooperate, they'd probably laugh at me...

    You know this problem only cropped up in October and I just finished up with a server migration for a client that had a plethora of standard WP users some with databases over 300 megs (that was no easy task getting those sites up and running)

    One user I found, and posted on the other board had a similar problem only because WP was looking for a directory named 10. that is with a period after it. I created a 10. directory in the thing worked on a LINUX server... there is something quirky going on.. I see plenty of posts regarding these same issues on both flavor servers not only on WP's forums but out on the net.

    I did however, get involved on a trial basis with this forum for I am attempting to get a news site up and running by week's end. I have writers and columnists waiting now. That is how this problem was discovered. I spend very little of my free time blogging. The folks cannot get their photo's uploaded.

    Back to the migration issue, one of the clients (on a clean 2.8 install) had a trailing backslash in the file path to the upload directory (if I can recall correctly). So over the 20+ blogs I migrated with the exception of the extremely large database issues to overcome, there was approximately a 30% failure rate with the new clean installs, and importing the wp database files.

    So I can appreciate your pride in the product however, with open source servers and other open source products, you are completely taking a chance when you get involved. One of the folks that steered me this direction was/is a big Apache FreeBSD person, he gave up trying to install this on his server.

    So stated simply regarding open source products, you are pretty much left out on a limb if it breaks. So be it.

    It still seems very odd to me that one function of gif upload and manipulation can work (Avatars) and then an identical function regarding the WYSIWYG editor doesn't work, I am simply attempting to get the correlation between the two. Are the using separate java modules, mootools, json, jquery? There is probably an open bracket somewhere in file that is causing the problem, who knows. I still have 2.7 working fine on my 2008 IIS 7 here that I am typing on now, if this problem cannot get resolved, I will take the server down Friday night and place a copy of what have on the remote server...

    What about this plug-in that will strip the WordPressMu logo information from MU, do you think that might sanitize the installation I have now or, completely break it. It is an honest and open question.

  • Andrew

    What about this plug-in that will strip the WordPressMu logo information from MU, do you think that might sanitize the installation I have now or, completely break it.

    It would help if you either provided us with the exact name of the plugin or a link to it.

    So stated simply regarding open source products, you are pretty much left out on a limb if it breaks. So be it.

    Most of the larger open source project have commercial support solutions. WP/WPMU is no different:
    http://automattic.com/services/support-network/

    I'm not sure if they would be able to help you with IIS though.

    Thanks,
    Andrew

  • rgrone

    Well enough with the tit-for-tat about who has the better tricycle:

    Have been tinkering around here, I can now load .docx, .pdf, and .txt files in the gallery.

    I checked my mime types on the server, all ok

    I am one my last 4 cans of a 12 pack of Pepsi proceeded by an 8 fridge pack of coke (the local convenient mart does not carry coke) anyway, 37.5 hours later without sleep can someone now narrow this down for me.

    Why is it that the, upload.php/media.php (media gallery in general) not recognizing the fact that it has indeed placed the IMAGE files in the exact location as the above state text file types.

    My guess it is some sort of binary vs. ascii problem...

    Any ideas?

  • rgrone

    Well I am going to post one last item here and then move-on

    I am not a code guru or anything but, notice in this chucnk of code from wp-settings-php whereas the "/" and the end of the last two lines. This doesn't look right to me

    <br />
    if( !defined( "UPLOADBLOGSDIR" ) )<br />
    	define( "UPLOADBLOGSDIR", 'wp-content/blogs.dir' );</p>
    <p>if( !defined( "UPLOADS" ) )<br />
    	define( "UPLOADS", UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" );</p>
    <p>if( !defined( "BLOGUPLOADDIR" ) )<br />
    	define( "BLOGUPLOADDIR", WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );<br />
  • Andrew

    Other than the added HTML the code looks fine to me. I'm assuming the actual code looks like the following?

    if( !defined( "UPLOADBLOGSDIR" ) )
    define( "UPLOADBLOGSDIR", 'wp-content/blogs.dir' );
    if( !defined( "UPLOADS" ) )
    define( "UPLOADS", UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" );
    if( !defined( "BLOGUPLOADDIR" ) )
    define( "BLOGUPLOADDIR", WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );

    If that's the case then I'm not spotting a problem.

    Thanks,
    Andrew

  • rgrone

    So, I go out and get this "ISAPI rewrite manager. run the .htaccess file that is being created by the server following whatever rules WordPress sends to it (not certain how this works with WordPress but I am guessing neither does WordPress at this time) and here's what I get:

    (By the way, this is a dedicated server, I run it, I set it up)

    RewriteEngine On
    RewriteCompatibility2 On
    RepeatLimit 200
    RewriteBase
    # # Line 0: (Unknown expression) RewriteEngine On
    RewriteBase /wordpressmu/

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    Noticing how the rewrite module remarked the 4th rule out

    This is no different from the results if I allow IIS 7 to import and apply the same rules via the built in IIS 7 url rewrite module.

    So, I've given up placed a copy of single WP on the server, spend another day or two looking at it, then will (which I already have) investigate whether Drupal is a little more stable then WordPress...

    Any thoughts as to why my permission to my WYSIWYG editor window is set to not allow me to cut and paste pictures, (text works fine) and why no matter what privileges I set the wordpressmu/wp-content/blogs.dir/1/files chain of directories to, when browse the file that has been uploaded I get a 404 file not found error.

    If I simply browse the folder with explorer then choose to view with IE, the file is there d:\wordpresmu\wp-content\blogs.dir\1\files\some.jpg

    I suspect that it is due to the fact that the \blogs.dir\ directory may actually look like a file to some web servers and not know how to handle the permissions correctly

    But like I say, single WordPress works almost correctly with the exception of the avatars just being uploaded anywhere they feel like being uploaded to, they do appear by the way. Single WordPress appears to be working. The only drawback is, that every time another user logs into the dashboard at the same time, fast-cgi creates another process, memory hog

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.