• Resolved Mr Zorg

    (@mr-zorg)


    Greetings!

    I have two WP installs: MAIN and SECONDARY running on the same VPS machine (cPanel)

    Things have been great for a long while, bar the last 2-3 weeks. MAIN site has not been dealing with uploading images particularly well. SECONDARY hasn’t had a problem at all. I can use the same images and get different results. It’s great! Not.

    So. I have disabled and deleted all plugins. Thanks. I have removed the entire MAIN install, installed a completely blank WP instance and tried to upload an image – same problem. File makes it to the server, crunching stage isn’t run, image sizes aren’t stored in the database and subsequently links, views and so on to the file do not work correctly… ever seen a 0x0 image box with the actual image in it? It’s not great.

    I think i have narrowed it down to the crunching process, or at least the process that runs after the file makes it to the server when it is recording the image size and then deciding what medium/thumbnail sizes to use. When i look in the database, the files that DON’T work have no extra information regarding these. images that were uploaded prior to the issue all have thumbnail, medium and full records relating back to the image record.

    Then I found an image that works. It’s 8k. I don’t get thumbnails, because it’s smaller than 150×150, so I’m guessing that WP figures that out and doesn’t try the resizing process.

    I have even tried a re-thumbnailing plugin, it also doesn’t work. I’m unsure if it’s because it is looking for the thumbnail records in the first place or if it is hitting whatever isn’t working on the MAIN install. Either way, not having a debugger is really cramping my style.

    I guess I am looking for help, commiserations or some kind of miracle cure. The thing that got me started on this was that I couldn’t get the “Featured Image” stuff to show me the image, but it would attach it to the post. I assume that the featured image code actually displays the medium or thumbnail image on the post editing page.

    Right, so, yeah. Lots of information to get through. The big ticket items are: 2 installs, working under the same PHP environment constraints (RAM, MAX_UPLOAD, MAX_POST) are getting different results. Yes they have different themes, but a fresh install with no themes and no plugins had exactly the same issue. So “it can’t” be those things.

    Any suggestions?

    Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • Checked file/folder permissions? Same on both sites?

    Thread Starter Mr Zorg

    (@mr-zorg)

    Yeah, same same. I ended up going to adv. tech support and they made changes to my .htaccess file, adding the first two lines

    /home/username/public_html/.htaccess

    # Inserted By Customer Control Panel
    suPHP_ConfigPath /home/username/public_html
    
    # BEGIN WordPress
    
    # WPhtC: Disable ServerSignature on generated error pages
    ServerSignature Off
    
    # WPhtC: Limit upload size to 8 MB
    LimitRequestBody 8388608 
    
    # WPhtC: Protect comments.php
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
    RewriteCond %{HTTP_REFERER} !.*https://www.mydomain.org.au.* [OR]
    RewriteCond %{HTTP_USER_AGENT} ^$
    RewriteRule (.*) ^https://%{REMOTE_ADDR}/$ [R=301,L]
    
    # WPhtC: Setting mod_deflate
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4.0[678] no-gzip
    BrowserMatch bMSIE !no-gzip !gzip-only-text/html
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    and then they added another .htaccess in my root folder

    /home/username/.htaccess

    <IfModule mod_deflate.c>
        AddOutPutFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/xhtml+xml application/xml application/rss+xml application/atom_xml application/x-javascript application/x-httpd-php application/x-httpd-fastphp application/x-httpd-eruby and image/svg+xml
        <IfModule mod_setenvif.c>
            # Netscape 4.x has some problems...
            BrowserMatch ^Mozilla/4 gzip-only-text/html
    
            # Netscape 4.06-4.08 have some more problems
            BrowserMatch ^Mozilla/4\.0[678] no-gzip
    
            # MSIE masquerades as Netscape, but it is fine
            # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    
            # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
            # the above regex won't work. You can use the following
            # workaround to get the desired effect:
            BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    
            # Don't compress images
            SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
        </IfModule>
    
        <IfModule mod_headers.c>
            # Make sure proxies don't deliver the wrong content
            Header append Vary User-Agent env=!dont-vary
        </IfModule>
    </IfModule>

    I think the important part is the “don’t compress images” section, but I’m not going to investigate further. I also have a feeling that PHP wasn’t able to find my PHP.INI file in the public_html folder without the first directive in the first file.

    If things break again, I’ll report back. I have a bunch of images to upload!

    “username” and “mydomain” are not the actual values, incase anyone cuts and pastes expecting instant results. You’ll need to fill those in with your own information ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image upload… (OK) Crunching… (ERROR)’ is closed to new replies.