White Label - PHP Warnings

Hi,

I’ve just installed and activated the latest release of White Label for X. The description sounds very promising.
But the plugin actually throws a few PHP warnings:

Warning: getimagesize(https://dennishunink.nl/playground/escaperoomresults/wp-content/uploads/2017/07/logo-coronel-escape.png): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/dennis1q/public_html/playground/escaperoomresults/wp-content/plugins/tco-white-label/functions/enqueue/styles.php on line 26

Warning: getimagesize(https://dennishunink.nl/playground/escaperoomresults/wp-content/uploads/2017/07/IMG_0501-e1499886533806.jpg): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/dennis1q/public_html/playground/escaperoomresults/wp-content/plugins/tco-white-label/functions/enqueue/styles.php on line 62

Live view: https://dennishunink.nl/playground/escaperoomresults/wp-login.php

How may we solve this?

Hello There,

Thanks for writing in! You are seeing PHP warning due to uninitialize variable. To get rid of this is to disable the debug mode. You can do this by opening wp-config.php and adding define( 'WP_DEBUG' , true ); just above /* That's all, stop editing! Happy blogging. */

For example:

define('WP_DEBUG', true);

/* That's all, stop editing! Happy blogging. */

When you revisit the page, you should no longer see the errors.

Please let us know how it goes.

Hi,
I know how to hide PHP errors. But that doesn’t fix the poor coding issue here. I believe this should be treaded as a (minor) bug report. Such PHP errors can be avoided with some very simple adjustments in the PHP code, as I’m sure your (awesome) developers are aware. I intentionally leave the PHP warnings always on in my php.ini settings and WP Debug, so I can always be sure that I’m using properly coded pieces of software…

Hi there,

Actually, the problem is the lack of file permissions on your server for the PHP user to be able to open a file to edit.

Please kindly read the article below and make sure all your files and folders of your Wordpress installation follow the same rules as mentioned:

https://codex.wordpress.org/Changing_File_Permissions

Thank you.

Hi,
I double checked the permissions. The error is now the following:

Warning: getimagesize(https://dennishunink.nl/playground/escaperoomresults/wp-content/uploads/2017/07/logo-coronel-escape.png): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/dennis1q/public_html/playground/escaperoomresults/wp-content/plugins/tco-white-label/functions/enqueue/styles.php on line 26

Warning: getimagesize(https://dennishunink.nl/playground/escaperoomresults/wp-content/uploads/2017/07/IMG_0501-e1499886533806.jpg): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/dennis1q/public_html/playground/escaperoomresults/wp-content/plugins/tco-white-label/functions/enqueue/styles.php on line 62

Hi there,

Looks like your host environment is not allowed to open remote URL, please make sure your PHP configuration’s allow_url_fopen and allow_url_include are set to true. If you’re not sure about this, then please contact your hosting provider and let them configure it :slight_smile:

Thanks!

allow_url_fopen is on, allow_url_include doesn’t appear to be a configurable setting in my hosts PHP 7 settings

Hi,

In that case, would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

All the best!

Sure. I’ll add a Secure Note to this reply with the details

Hi,

Thank you for providing your login credentials

I have added a temporary fix.

I will forward this issue to our web development team for review.

Thanks

Thanks. Out of curiosity, what’s the issue you run into that is being forwarded to the development team?

Hi,

I just forwarded the warning you are getting with getimagesize function.

I temporarily suppressed the waning using @getimagesize.

Thanks

Hey everyone,

Ii keep getting the same Warning.
“HTTP request failed! HTTP/1.1 403 Forbidden in /var/[…]/plugins/tco-white-label/functions/enqueue/styles.php on line 26”

I only get it, since I route everything through https. it works immediately once i load from a http source. Unfortunately, all my local files are onyl available via https.

Will there be a fix anytime soon?

Thank you…

Peter

Hi Peter (@PKMgmtConsulting),

Thanks for writing in! We’ll have this fixed up in the next public release. :slight_smile:

That’s great news, thanks!

You’re most welcome!