Viewing 8 replies - 31 through 38 (of 38 total)
  • Thread Starter mshingledecker

    (@mshingledecker)

    I implemented the above code and am happy to report it worked! I also verified that the code did not change the appearance of the logo in Firefox, Chrome, or Safari.

    I am grateful to both ElectricFeet and cathy for the assistance.

    Should I leave this topic “unresolved” for nikeo to view?

    Yay!

    No, I don’t think he looks at the status. I sent an email. You can still post on a resolved topic, so better to mark it resolved to get the stats up 🙂

    Cathy

    (@cathy-dentz)

    My logo also worked! I put the Customizr file back to the default and used the code above in my functions.php. I think the logo looks bit mapped because everything in EI is a little grainier.

    Thanks for all your help. I’ll be back online when I’m back from vacation to learn more about your website and how you do it.

    Just to round this off for nikeo, because I think I now understand what’s happening:

    From my local installation, I tried getimagesize() on Cathy’s logo and mshingledecker’s logo and it works fine. So it’s a server issue (because they (through Customizr) are using the same function on the same file, from their servers, and it doesn’t work).

    I think I’ve tracked it down to the php.ini setting allow_url_fopen, which I’m betting is set to OFF on servers that have this issue. mshingledecker uses networksolutions and they seem to have this setting turned off. MediaTemple also have it set to OFF.

    If the allow_url_fopen setting is set to ON, then php allows you to manipulate http URLs as if they were local files. I think what we’re seeing here is that if that setting is OFF, then any file referred to with an http URL is regarded as not being local (even if it is local).

    So getimagesize—which uses an http/https URL to get the size of the logo—fails on those servers with allow_url_fopen set to OFF. The result is that width and height are not set properly (specifically, they are set to width=”” height=””) and Internet Explorer 8, 9, and 10 seem to be the only browsers that give up on displaying the image when passed these values.

    Asking hosts to switch allow_url_fopen to ON will probably not get anyone anywhere, as the hosts probably feel that they need to protect their users against themselves (fair enough, I suppose, if users are not developers). I think it can be reset to ON dynamically, but I don’t think that this is a good idea.

    The solution will be to use a relative path for $logo_src. I have not tested this, as it would require too much messing with the core code—and I think I’ve put Cathy and mshingledecker through enough pain already. But I’d put money on it that this is the issue (only a small amount, admittedly!).

    If anyone with this issue on IE wants to see if allow_url_fopen is the cause, then temporarily adding:

    echo 'allow_url_fopen setting = ' . ini_get('allow_url_fopen');

    to your child theme’s functions.php will tell you the value of this parameter. It will print something like “allow_url_fopen setting = 1” (or 0) at the top of the page. Once you’ve found the value, you can remove that line again.

    (Cathy (once back from vacation) and mshingledecker: it would be great if you could try what’s in this last paragraph and let us know.)

    Thread Starter mshingledecker

    (@mshingledecker)

    I currently have the workaround code in my child theme’s functions.php. Do I add this line directly below the last line of this workaround (which is a } bracket). If so can I inset a blank line after the bracket and then inserting this code?

    Hi mshingledecker. Yes, you can do that.

    Be sure to include the semi-colon at the end of the line. Php is fussier than a retired grammar teacher.

    As soon as you have the output, you can remove the whole line again.

    Thanks!

    Thread Starter mshingledecker

    (@mshingledecker)

    Here is my result:

    allow_url_fopen setting = 0

    Aha! Wonderful. My theory is looking pretty solid here 🙂

    Thanks mshingledecker.

    I’m hoping that nikeo will now pick up this on his return.

Viewing 8 replies - 31 through 38 (of 38 total)
  • The topic ‘Logo Not Displaying in IE’ is closed to new replies.