Ultimate Branding failed to open stream bug

In the current version (v1.5.5) of the Ultimate Branding plugin, my development WordPress site is getting the following error:

Warning: getimagesize([path_to_branding_image]): failed to open stream: Permission denied in /home/incuwp/public_html/wp-content/plugins/ultimate-branding/ultimate-branding-files/modules/login-image.php on line 97

I am currently receiving this error in our development instance of WordPress. I have not updated our production version due to this bug. I believe the error is occurring due to the branding image's path pointing to the production server, which is unreachable from development. However, in the previous version, this error would not occur and it would use the file in the default location for branding:

[uploads folder]/ultimate-branding/includes/login-image/login-form-image.png

This option seems to have been removed from the code.

Additionally, I tried updating the branding image, but the "Browse" button does nothing. How do I update the branding image in my development environment to point to a local branding file?

- - - - -

Also, after looking at the code, I did notice a bug in the logic. In the login-image.php file in the stylesheet function, the following code is written:

$login_image_old = ub_get_option('ub_login_image_url', false);


if (isset($login_image_old) && trim($login_image_old) !== '') {
$login_image = $login_image_old;
$dimensions = getimagesize($login_image_dir);
$height = $dimensions[1];
$width = $dimensions[0];

This code does not take into account that $login_image_old could equal false. This could potential cause the same error I'm getting, but for a different reason.

  • Jack Kitterhing
    • Code Norris

    Hi there @marpa

    Hope your well today and thanks for your very valuable feedback on this, much appreciated.

    I'm showing here your using version 1.4.1, is that the one on the live site?

    I've tested the latest version on my own development site and it seems to be working correctly, including the browse button, which browser are you using?

    I've also flagged the lead developer on this for you :slight_smile:

    Thank you!

    Kind Regards

  • clas-web
    • Flash Drive

    We have not updated the plugin on our live site yet because we discovered issues with it on our development site.

    There are 2 main issues:
    1. Change Image file upload browse button not working
    2. absolute path to incorrect file

    re: Browse button not working
    The button is not working on:
    Chrome 31.0.1650.57
    Firefox 25.0.1

    Button does work on:
    Safari 6.1 (7537.71)

    However even when we do upload a new image (via Safari) to our development server, there is still a getimagesize warning that indicates an absolute path to the image file that is from our production server.

    re: absolute path to incorrect file
    Our development instance is looking for the production copy of the image using an absolute path. In the previous version, this error would not occur and it would use the file in the default location for branding.

  • clas-web
    • Flash Drive

    Thanks for working on this. Alas, does not seem to be resolved for us. After updating our instance of the plugin with the files you included above, we still get the following error:
    Warning: getimagesize(http://<<domain_name>>/wp-content/uploads/ultimate-branding/includes/login-image/login-form-image.png): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /home/incuwp/public_html/wp-content/plugins/ultimate-branding/ultimate-branding-files/modules/login-image.php on line 108

    We have confirmed that the file does exist in the location specified in the getimagesize function. Should also not the the login-form-image.png does appear on the login screen

  • Rob
    • Flash Drive

    I didn't test the new version as it is a low priority at the moment. Also, I was able to resolve the issue by manually updating some of the values in the database. To be honest, I can't remember what I needed to change off hand, but I believe all of the changes were in the wp_options table.


  • Jack Kitterhing
    • Code Norris

    Hi there @marpa,

    Hope you're well today, just wanted to let you know that I've discussed this with the lead developer and he's working on a fix, seems to be ssl issues :slight_smile:

    @Rob, thanks for the additional info, glad to hear you've got it working! :slight_smile:


    Kind Regards

  • clas-web
    • Flash Drive

    Have updated our dev instance with latest beta and still get the same error:

    failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /home/incuwp/public_html/wp-content/plugins/ultimate-branding/ultimate-branding-files/modules/login-image.php on line 108

  • Jack Kitterhing
    • Code Norris

    Hi there @marpa,

    Hope you're well today.

    I've just been speaking with the lead developer and he hasn't been able to replicate this.

    Could we get access your DEV instance? If possible please send.

    -WP admin
    -Phpmyadmin access or similar :slight_smile:

    To contact(at)wpmudev.org with the subject line Attn: Jack Kitterhing


    Kind Regards

  • brandicoot
    • Site Builder, Child of Zeus

    I'm getting the same issue on multiple network installs.
    Deleting the plugin and reinstalling the latest version (1.72) doesn't fix the issue.
    It seems that the only way to get it to work is to use an image from the media library.
    Even if you click "reset the image" in the branding/images config screen, it shows the same error message.

  • Vaughan
    • Support/SLS MockingJay

    Hi @brandicoot,

    This is rather an old thread. Could you please open a new thread, due to different server configs, many things could be the cause here & it will also prevent the previous users from receiving email notifications that are related to you, it gets confusing when replies are aimed at different members in the same thread.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.