• Hi all.

    I recently installed wordpress and just started using a new theme today, f8 lite 1.3.

    The problem is when I upload a new picture the uploader crunches it, and says it has uploaded but gives me no preview thumbnail of the image.

    When I subsequently go to use that image in my post, or on the homepage as a thumbnail or rotating header, it also is missing. The link is there to it, and when I check smartftp the files are actually there as well (and I can download and open them).

    It even creates a thumbnail of correct size and all.

    I’ve used both the flash and browser uploader, I’ve ensured the directory is correct (as my blog is in a subdirectory) and now that’s all sorted, and I’ve cleared the media library, the actual directory with smartFTP, and done it all from scratch but still face the exact same problem.

    It seems quite different to other people’s image upload problems of the file not uploading at all, or disappearing on them.

    Many thanks in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter danielchanisheff

    (@danielchanisheff)

    Actually when I try open the link that it generates to the image, i get a forbidden and 404 not found.

    This is the link.

    https://www.danielchanisheff.com/blog/wp-content/uploads/2009/12/img198.jpg

    Hi,

    Add this code in htaccess and have a check:

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    Thanks,

    Shane G.

    Thread Starter danielchanisheff

    (@danielchanisheff)

    I added it but it made no difference =(

    Thread Starter danielchanisheff

    (@danielchanisheff)

    Actually, afterwards when I removed the code I ended up with a 500 server error.

    Kept coming up with </Limit>>AuthName> directive missing closing ‘>’

    So I just renamed htaccess for the time being and my website works again.

    But alas the problem still exists, the photo will upload but won’t be visible.

    Ok, there could be a few solutions to the problem. First is assuming you know how to use Media Library and correctly link to a file and your still getting the error my hunch is that it’s the .htaccess file. If not and your a real novice try this: https://www.youtube.com/watch?v=XJFIbd6wN0A&feature=related

    Also, see my post re this issue: https://www.ads-software.com/support/topic/357445?replies=10

    For me, the problem was related to permalinks and the .htaccess file which was calling for a 404 error page instead of accessing the file. So wordpress — or at least a faulty .htaccess — was effectively “blocking” access to files. After a long talk with tech support at the site host, and looking through error logs, trying a few things here and there, we determined it was indeed the .htaccess file.

    So I deleted the .htaccess file after removing permalink settings and the files loaded. But this caused a few other issues with pages not being found etc. So rewrote the .htaccess file (see below).

    Plus, the .htaccess file is what’s responsible for generating the 404 error page in the first place which I didn’t know and would have helped me narrow down the problem in the first place. Here’s a good link re .htaccess: https://www.freewebmasterhelp.com/tutorials/htaccess/

    So here, from the codex, I think is the root of the problem:

    Using only %postname%

    If using version 2.0 or greater, the following is no longer true as this has been changed.

    If you use postname as the only element in your permalinks to create a structure such as example.com/post-title, the rewrite rules may make it impossible to access pages such as your stylesheet (which has a similar format) or the /wp-admin/ folder . It’s best to include some numeric data (e.g. the post ID or date) in the permalink to prevent this from happening. Additionally, WordPress v1.2.x requires the use of a date structure in order for some features, such as the calendar, to function properly. /%year%/%monthnum%/%day%/%postname%/ is always a good start.

    You can get past the above issue and continue using %postname% if you make a simple change to your .htaccess file as below:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} ^wp-content.*
    RewriteCond %{REQUEST_FILENAME} ^wp-admin.*
    RewriteCond %{REQUEST_FILENAME} ^wp-include.*
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Simply the conditions now say do not apply the rule if the file name includes the word press content, admin or include directory. This now allows you to get to the admin area with no issues as well as content.

    Which is from the codex here: https://codex.www.ads-software.com/Using_Permalinks And don’t say ” Should’ve read the codex first”, because I would have if I could have isolated the problem to the .htaccess file initially.

    Thing is, my .htaccess file didn’t include the #BEGIN and #END WordPress. Which is my best guess as to why it was preventing access to files uploaded with Media Library.

    If you haven’t changed your permalinks settings it’s possible something else has tinkered with your .htaccess file and it’s the same problem. So I would try rewriting it anyway. And change the permissions to 666 so wordpress can write to it afterward.

    I found a few of the images were still not working so I had to go back and reload them with media library. It worked.

    So I hoped that helps anyone else who seems to be having this problem.

    I look forward to any feedback on this issue, e.g. why exactly is it that using only /%postname%/ as your permalink structure restricts access to some files????

    Anyway all the best, keep up the good work wordpress team!

    Having this same issue – WP 3.0 on IIS7. Using these rules in web.config:

    <rule name=”wordpress” patternSyntax=”Wildcard”>
    <match url=”*” />
    <conditions>
    <add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
    <add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
    </conditions>
    <action type=”Rewrite” url=”index.php” />
    </rule>

    </rules></rewrite>

    Images up load fine, are in the directory they are supposed to be in – but only the /resized/ versions are accessable via URL – otherwise I get a 500 error! It’s nuts. I can download the media via FTP and it opens file locally…

    I’ve spent about 6 hours trying to resolve this. Very frustrated.

    I found the issue – and the fix to this unbelievably annoying problem. WordPress needs to mention this in the setup for Windows servers… I spent 4 days tearing my hair out over this simple permissions issue with PHP and wp-admin/uploads.

    See: https://www.howyoudo.info/index.php/how-to-fix-windows-server-upload-file-inherit-permissions-error/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Unique image upload problem’ is closed to new replies.