WordPress.org

Ready to get started?Download WordPress

Forums

I give up (12 posts)

  1. calisun
    Member
    Posted 2 years ago #

    I have been playing with wordpress multisite for several months and I was unable to figure out the issue of images not showing up in my posts.

    I have read dozens of posts here and other sites about possible fixes without success. Most of the posts suggest that it is .htaccess problem, but my post show up correctly in "nice" URL, but I always get broken icon instead of an image inside posts.
    I know that the images get uploaded correctly because I see them inside .../blogs.dir/... folder, but they never show up inside posts.

    I have tried several different suggested variations of .htaccess without success, played with httpd.conf and checked file and folder permissions, without any success (even if they were all set to 777).

    So I decided to test to see if it is my server issue or wordpress issue.
    To test, I have installed Drupal. Right after installation, I did a test post, which included images, and SUCCESS, images show up inside post without any issues.

    So at this point, it is a wordpress issue which I am unable to figure out.

    If someone is able to figure out how to get the multisite wordpress to work on the server distro I am using, please let me know.

    But at this point, I have no choice but to switch to Drupal.
    (Which I am not too happy about because it will take some learning curve and I am already familiar with wordpress)

    Linux distro I am using is SME Server, which can be found here: http://www.contribs.org
    I am running their version 8b6

  2. unable to figure out the issue of images not showing up in my posts.

    my post show up correctly in "nice" URL, but I always get broken icon instead of an image inside posts.

    Sounds like you have .htaccess problems and not file/directory permission issues.

    When you load up an image, what's the line in your access_log say? Is there a line in the error_log too? And can you provide us a link to your blog so we can see the image problem?

  3. Most of the posts suggest that it is .htaccess problem, but my post show up correctly in "nice" URL, but I always get broken icon instead of an image inside posts.

    Those are less related than you'd think :/ Sometimes the images won't render because your httpd.conf file isn't set up to let your .htaccess work all the way.

    Check to see (first) if your .htaccess is the RIGHT one for your type of install (subdomain is different from subfolder). Then check your httpd.conf file to see if AllowOverride is set to ALL.

  4. calisun
    Member
    Posted 2 years ago #

    Yes, I have tried at least half a dozen different htaccess suggested fixes/versions from here and from other sites without success, and yes my httpd.conf is set to AllowOverride All.

    I think it is a compatibility issue with the OS I am using. The linux server I am using, SME Server, is based on CentOs, but it is different. It uses templeting system and web pages are not stored in a standard location, they are in what they call "information bay" "iBay".

    If anybody has a success with running wordpress multisite on SME Server, please let me know how.

    SME Server: http://www.contribs.org
    Using SME V. 8b6

  5. calisun
    Member
    Posted 2 years ago #

    Another strange thing, I also have Drupal, Simple Machines Forum and one another custom program installed on this server, and they all have no issues with images and "nice" URL's, but WordPress does.

    I would be curious to find if all the people here that have issues with images in WordPress, what flavor of linux are they using.

    I am suspecting that the issue might be linux flavor specific.
    (Many times I could get "a" program to work on one flavor of linux very easy, it took a lot of work to get it to work on different linux, and it did not work at all on third flavor of linux)

    Is there a way to create a poll in this forum, so we can know for sure if the issue is linux flavor specific? It could be an easy fix if we know exactly what the issue is.

    The poll could be something like this:

    Do you have problem with images in your multisite wordpress?
                   YES               NO
    What version of Linux server are you using?
    
    *Debian,     *Red Hat,     *SUSE,     *Mandriva
    Ubuntu       CentOS        Novell      Conectiva
    Knoppix      Fedora        etc..       etc...
    Linspire     etc...
    etc..

    This is only an example, it would be more specific done by linux expert.

  6. That it's JUST the images speaks to the standard issues with your server not liking the .htaccess rules, though, and the httpd.conf in specific (the only WP related post to SME server I found mentioned that there were issues with that, but had no resolution).

    Which certainly could be a problem if SME handles that differently. I've used Multisite on Debian, Red Hat, SUSE, Ubuntu, CentOS and Fedora without issues, but ... Yeah, this really looks like server specific shenanigans :/

  7. calisun
    Member
    Posted 2 years ago #

    That it's JUST the images speaks to the standard issues with your server not liking the .htaccess rules

    I would agree with you, except that for my Drupal installation and Simple Machines Forum (SMF), on the same server, I use "nice" URL's and the images inside these posts show up correctly.

    So there must be something that wordpress needs or is trying to do something, that other programs do not, that is not agreeing with the server.

  8. So there must be something that wordpress needs or is trying to do something, that other programs do not, that is not agreeing with the server.

    WordPress doesn't know it's not bacon!

    Sorry, vague humor induced by a single cup of coffee. Seriously, it's all Apache and mod_rewrite and the flavor of Linux doesn't matter.

    Are you running off of the same root as the other packages? The problem you apparently are having with images is that something in multi-site like this URL

    http://some-site-on-a-network/files/2011/11/touch-mouse.jpg

    On my site gets handled by

    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

    Which really isn't that complicated an .htaccess rule. That's just a simple parameter move.

    So what does your web server access log say for images? Are you getting 404 codes for those URLs? Have you tried backing up the .htaccess file and moving that one line up?

  9. I would agree with you, except that for my Drupal installation and Simple Machines Forum (SMF), on the same server, I use "nice" URL's and the images inside these posts show up correctly.

    Ah, a seeming logically correct follow-through, but actually not.

    Take a closer look at the Multisite rule as pointed out by Jan. That's a double redirect and you'd be amazed how many servers don't like going from /files to /wp-includes/ms-files.php to /wp-content/blogs.dir/1/files/etc.

    WordPress's Multisite rules are more complex than the single site ones, or Drupals, or Joomlas (and certainly more than SMFs, yep, used 'em all).

    So on your second site, domain.com/sitefoo let's say, you have a post with a busted image that points to:

    domain.com/sitefoo/files/2011/11/30/image.jpg

    That's a 404. What is

    domain.com/sitefoo/wp-includes/ms-files.php?file=2011/11/30/image.jpg

    And then what is

    domain.com/sitefoo/wp-content/blogs.dir/2/files/2011/11/30/image.jpg

    and

    domain.com/wp-content/blogs.dir/2/files/2011/11/30/image.jpg

    Basically if we can see WHERE it's breaking down, we may know where your server stops liking the redirects.

  10. AMediaCompany
    Member
    Posted 2 years ago #

    Okay. I have the same problem as the original poster. I have Ubuntu 11.04 with Apache 2, PHP5 and MySQL 5.1 all nicely talking to each other on a very clean install (put together last night). I run a Multi-site configuration.

    I too have permalinks working (www.domain.com/2011/12/post-title), but most, if not all images refuse to load.

    i.e.
    http://www.domain.com/wp-content/uploads/2011/06/couple.jpg gives a *wordpress* 404.

    I'll post my Apache configuration as I know it's a configuration issue that I don't understand where things are wrong. As far as I understand, this is how Apache processes files. Changes I've made are noted, and where I've altered something, I've pasted the entire config file with sections in bold that were changed in the hopes that solving this will help others:

    /etc/apache2/apache2.conf [NO changes]
    /etc/apache2/httpd.conf [BLANK]

    /etc/apache2/mods-enabled/*.load [Enabled rewrite using a2enmod]
    /etc/apache2/mods-enabled/*.conf [NO changes]

    /etc/apache2/ports.conf [NO changes]

    /etc/apache2/conf.d/* [NO changes]

    /etc/apache2/sites-enabled [Changes below]

    1. I copied the 000-default in /etc/apache2/sites-available to mysite.com
    2. I added a symlink in /etc/apache2/sites-enabled/mysite.com to /etc/apache2/sites-available/mysite.com
    3. I removed the symlink for 000-default
    4. I altered the configuration of mysite.com as below. I removed the /cgi-bin and /docs directives as don't use them to try to simplify things. I also commented out <directory /> but don't know if that's a problem
    <VirtualHost *:80>
    	ServerAdmin support@mysite.com
    	ServerName mysite.com
    	ServerAlias *.mysite.com
    
    	DocumentRoot /var/www/mysite
    #	<Directory />
    #		Options FollowSymLinks
    #		AllowOverride None
    #	</Directory>
    	<Directory /var/www/mysite>
                    AllowOverride All
    
    		Order allow,deny
    		allow from all
    	</Directory>
    
    	ErrorLog ${APACHE_LOG_DIR}/error.log
    
    	# Possible values include: debug, info, notice, warn, error, crit,
    	# alert, emerg.
    	LogLevel warn
    
    	CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>

    I added my .htaccess as per the norm:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    Options +FollowSymLinks
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    What I know is this. If I alter mysite.conf to have 'AllowOverride none', the images load fine, but the permalinks don't work

    If I set 'AllowOverride FileInfo' I get an internal server error (nothing in Apache logs other than the access log of saying it was an http status code of '500')
    Ditto if set only 'AllowOverride Options'

    So, to me it seems like a server issue and Apache's thinking files are not found under certain conditions because the 404 gets passed over to wordpress

  11. AMediaCompany - Please make your OWN topic for this one.

    AllowOverride none will never work, and you're right, it's a sever issue with apache not handling your .htaccess.

  12. AMediaCompany
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.