Stickers
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Stickers
I can not get stickers to display any info
Im on IIS 10
php 7.4
GD is enabled
Im using these links to test
https://hurricanepub.com/plugins/sticke ... 2=dark_red
https://hurricanepub.com/plugins/sticke ... age=random
https://hurricanepub.com/plugins/sticke ... ype=random
GD Test https://hurricanepub.com/plugins/stickers/gdtest.php
There are no errors in the error log
Also there is no save button in the configure for stickers is that normal ?
Im on IIS 10
php 7.4
GD is enabled
Im using these links to test
https://hurricanepub.com/plugins/sticke ... 2=dark_red
https://hurricanepub.com/plugins/sticke ... age=random
https://hurricanepub.com/plugins/sticke ... ype=random
GD Test https://hurricanepub.com/plugins/stickers/gdtest.php
There are no errors in the error log
Also there is no save button in the configure for stickers is that normal ?
Last edited by spd2612 on Mon Oct 18, 2021 4:29 pm, edited 1 time in total.
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
Ok I created a simple PHP file and tested it from the stickers directory and it creates and prints
https://hurricanepub.com/plugins/stickers/test.php
this is the code I used
Meteotemplatelive.txt is on the server and updating, but still no print out on my stickers
Anyone have a Idea as to what is happening here ??
https://hurricanepub.com/plugins/stickers/test.php
this is the code I used
Code: Select all
<?php
// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
// Set the content type header - in this case image/jpeg
header('Content-Type: image/jpeg');
// Output the image
imagejpeg($im);
// Free up memory
imagedestroy($im);
?>
Anyone have a Idea as to what is happening here ??
- Daali
- Advisor
- Posts: 56
- Joined: Mon Jul 26, 2021 8:06 pm
- Location: Georgia, US
- Station model: Ecowitt GW1002
- Software: Meteobridge, FOSHKplugin
- Contact:
Re: Stickers
Sorry sir,
I still have not fixed my dev environment with v7.4.24 or v8. But I can tell you v7.4.24 works with your link on my site.
https://www.jeffersonweather.com/plugin ... age=random
I still have not fixed my dev environment with v7.4.24 or v8. But I can tell you v7.4.24 works with your link on my site.
https://www.jeffersonweather.com/plugin ... age=random
https://www.jeffersonweather.com
GW1000 gateway
WS68 Anemometer
WH40 Rain Gauge
WH32 Temp/Hum
WH57 Lightning
WH41 PM2.5 Air Quality
WH45 PM2.5/10/Co2 Air Quality
WN34S Soil temperature
WH31SM Soil Moisture
GW1000 gateway
WS68 Anemometer
WH40 Rain Gauge
WH32 Temp/Hum
WH57 Lightning
WH41 PM2.5 Air Quality
WH45 PM2.5/10/Co2 Air Quality
WN34S Soil temperature
WH31SM Soil Moisture
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
I have my PHP on 7.4.13 and it does not work
There has to be a way to diagnose this I am getting no errors
There has to be a way to diagnose this I am getting no errors
Last edited by spd2612 on Mon Nov 01, 2021 9:30 pm, edited 2 times in total.
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
I Finally forced a error out of this
How can I fix these errors
PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in E:\hurricanepub\plugins\stickers\stickerInteractiveAnim.php on line 1057
there are multiple lines with that issue
Spoke to soon none of them errors for stickersinteractive.php
they are just in stickerInteractiveAnim.php which i find strange
How can I fix these errors
PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in E:\hurricanepub\plugins\stickers\stickerInteractiveAnim.php on line 1057
there are multiple lines with that issue
Spoke to soon none of them errors for stickersinteractive.php
they are just in stickerInteractiveAnim.php which i find strange
- Daali
- Advisor
- Posts: 56
- Joined: Mon Jul 26, 2021 8:06 pm
- Location: Georgia, US
- Station model: Ecowitt GW1002
- Software: Meteobridge, FOSHKplugin
- Contact:
Re: Stickers
Try phpstorm trial version for debugging. If your website is locally networked, you should be able to debug directly.
https://www.jeffersonweather.com
GW1000 gateway
WS68 Anemometer
WH40 Rain Gauge
WH32 Temp/Hum
WH57 Lightning
WH41 PM2.5 Air Quality
WH45 PM2.5/10/Co2 Air Quality
WN34S Soil temperature
WH31SM Soil Moisture
GW1000 gateway
WS68 Anemometer
WH40 Rain Gauge
WH32 Temp/Hum
WH57 Lightning
WH41 PM2.5 Air Quality
WH45 PM2.5/10/Co2 Air Quality
WN34S Soil temperature
WH31SM Soil Moisture
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Stickers
You can try this modified script, I only modified line 200 and 203 ( from "fonts" to "./fonts" )
Maybe you only have a font path problem ( I had the same problem with a few old scripts of mine )
P.S.
In the stickers plugin settings there is no save button
Maybe you only have a font path problem ( I had the same problem with a few old scripts of mine )
P.S.
In the stickers plugin settings there is no save button
- Attachments
-
- stickerInteractive.zip
- (4.8 KiB) Downloaded 53 times
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
That does not work either
when i refresh stickerinteractive with all logging on i get this error
stickerInteractive.php
[21-Oct-2021 08:15:46 America/New_York] PHP Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0
That is just a warning though
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Is any write permissions needed
Still trying to find the stickers issue here
Is there any folder that needs write permissions
I have looked everywhere I know of to find a error here
The sticker wont even print the hello world
No other problems with my site
EXT that are enabed
[WebPIChanges]
error_log = "C:\Windows\temp\PHP74x64_errors.log"
upload_tmp_dir = C:\Windows\temp
session.save_path = C:\Windows\temp
cgi.force_redirect = 0
cgi.fix_pathinfo = 1
fastcgi.impersonate = 1
fastcgi.logging = 0
max_execution_time = 300
date.timezone = America/New_York
extension_dir = "C:\Program Files\PHP\v7.4\ext\"
[ExtensionList]
extension=php_mysqli.dll
extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_curl.dll
extension=php_exif.dll
extension=php_xmlrpc.dll
extension=php_openssl.dll
extension=php_soap.dll
extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll
extension=php_imap.dll
extension=php_tidy.dll
[PHP_IMAGICK]
extension=php_imagick.dll
[PHP_WINCACHE]
extension=php_wincache.dll
This should not be this big of a issue
Is there any folder that needs write permissions
I have looked everywhere I know of to find a error here
The sticker wont even print the hello world
No other problems with my site
EXT that are enabed
[WebPIChanges]
error_log = "C:\Windows\temp\PHP74x64_errors.log"
upload_tmp_dir = C:\Windows\temp
session.save_path = C:\Windows\temp
cgi.force_redirect = 0
cgi.fix_pathinfo = 1
fastcgi.impersonate = 1
fastcgi.logging = 0
max_execution_time = 300
date.timezone = America/New_York
extension_dir = "C:\Program Files\PHP\v7.4\ext\"
[ExtensionList]
extension=php_mysqli.dll
extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_curl.dll
extension=php_exif.dll
extension=php_xmlrpc.dll
extension=php_openssl.dll
extension=php_soap.dll
extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll
extension=php_imap.dll
extension=php_tidy.dll
[PHP_IMAGICK]
extension=php_imagick.dll
[PHP_WINCACHE]
extension=php_wincache.dll
This should not be this big of a issue
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Stickers
Can you provide a copy of your virtual machine ( in a format compatible with vmware player )?
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
Do you mean of that whole server
My servers are all virtual running on esxi7.0
My servers are all virtual running on esxi7.0
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Stickers
Sorry, not familiar with 'that thing'.
I think you should pinpoint the problem with a simple script like the attached one ( it works on my server ).
It should create a 400x200 red image with a white "Hello world"
If the writing is not shown the only culprit should be the 'imagettftext' in line 12 and the only reason for this should be that php does not find the font ( so you need to modify the font definition in line 4, using a relative/absolute path, specifying a 'system' font... )
Clearly not sure about that.
P.S.
You could try in line 4:
Code: Select all
$font = realpath("./Roboto-Bold.ttf"); // font ( need to specify font with path )
P.P.S.
Another thing to check ( don't remember if already checked ) is freetype support in php:
P.P.P.S.
As a last resort you could use the imagestring function ( you already found working correctly ):
use imageloadfont to load a bitmap font ( you need one font for each size used ) and write it with imagestring.
This is without antialiasing so the look could be a little 'pixelated'
- Attachments
-
- freetype.png (122.5 KiB) Viewed 4495 times
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
well no text displayes on hello.php
I changed the relitive path on 4 no change
The URL to that font is https://hurricanepub.com/plugins/sticke ... o-Bold.ttf
it wil try to download it
GD looks good
What can I be missing
https://hurricanepub.com/plugins/stickers/hello.php
I changed the relitive path on 4 no change
The URL to that font is https://hurricanepub.com/plugins/sticke ... o-Bold.ttf
it wil try to download it
GD looks good
What can I be missing
https://hurricanepub.com/plugins/stickers/hello.php
davidefa wrote: ↑Sat Oct 30, 2021 9:56 amSorry, not familiar with 'that thing'.
I think you should pinpoint the problem with a simple script like the attached one ( it works on my server ).
It should create a 400x200 red image with a white "Hello world"
If the writing is not shown the only culprit should be the 'imagettftext' in line 12 and the only reason for this should be that php does not find the font ( so you need to modify the font definition in line 4, using a relative/absolute path, specifying a 'system' font... )
Clearly not sure about that.
P.S.
You could try in line 4:or something like thatCode: Select all
$font = realpath("./Roboto-Bold.ttf"); // font ( need to specify font with path )
P.P.S.
Another thing to check ( don't remember if already checked ) is freetype support in php:
P.P.P.S.
As a last resort you could use the imagestring function ( you already found working correctly ):
use imageloadfont to load a bitmap font ( you need one font for each size used ) and write it with imagestring.
This is without antialiasing so the look could be a little 'pixelated'
hello.zip
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Stickers
We need an error showing what's going wrong.
Try adding this at the top of the script:
Or try adding some error logging via php.ini/.htaccess ( see this or similar links )
Try adding this at the top of the script:
Code: Select all
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
I have tried that
unable to get errors
with the below code in hello.php nothing displays
I can not get a error out of this
check the link and you will see how the code kills it
http://hurricanepub.com/plugins/stickers/hello.php
unable to get errors
with the below code in hello.php nothing displays
I can not get a error out of this
check the link and you will see how the code kills it
http://hurricanepub.com/plugins/stickers/hello.php
Code: Select all
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$w = 400;
$h = 200;
$font = "../fonts/Roboto-Bold.ttf"; // font ( need to specify font with path )
$size = 24; // text size
$img = imagecreatetruecolor($w, $h);
$bgColor = imagecolorallocate($img, 255, 0, 0); // background color ( RGB format ) -> red
$fontColor = imagecolorallocate($img, 255, 255, 255); // text color ( RGB format ) -> white
imagefilledrectangle($img, 0, 0, $w, $h, $bgColor);
imagettftext($img, $size, 0, 40, 80, $fontColor, $font, "Hello world");
header("Content-type: image/png");
imagepng($img);
imagedestroy($img);
?>
davidefa wrote: ↑Sat Oct 30, 2021 1:49 pm We need an error showing what's going wrong.
Try adding this at the top of the script:Or try adding some error logging via php.ini/.htaccess ( see this or similar links )Code: Select all
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
I have error reporting turned on and if i open the hello.php in firefox i get a error message saying it can not be displayed because it contains errors
stickerinteractive.php will still open no print of course
stickerinteractive.php will still open no print of course
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Stickers
Ok, comment the last 3 lines and you should be able to see the 'underlying error'
Code: Select all
//header("Content-type: image/png");
//imagepng($img);
//imagedestroy($img);
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
Damn
getting somewhere here is error
Warning: imagettftext(): Could not find/open font in E:\hurricanepub\plugins\stickers\hello.php on line 15
This is line 15
imagettftext($img, $size, 0, 40, 80, $fontColor, $font, "Hello world");
getting somewhere here is error
Warning: imagettftext(): Could not find/open font in E:\hurricanepub\plugins\stickers\hello.php on line 15
This is line 15
imagettftext($img, $size, 0, 40, 80, $fontColor, $font, "Hello world");
Last edited by spd2612 on Sat Oct 30, 2021 3:53 pm, edited 1 time in total.
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Stickers
Try to set the absolute path to your font ( in line 8 ), this should be ok:
Not sure if you need to use backslash, in this case use:
Code: Select all
$font = "E:/hurricanepub/plugins/stickers/Roboto-Bold.ttf"; // font ( need to specify font with path )
Code: Select all
$font = "E:\\hurricanepub\\plugins\\stickers\\Roboto-Bold.ttf"; // font ( need to specify font with path )
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
I got it to remove the error by using
e:/hurricanepub/plugins/stickers/fonts/Roboto-Bold.ttf
then i uncomented the last three lines and Hellow world is there
Now what to do to fix stickers
e:/hurricanepub/plugins/stickers/fonts/Roboto-Bold.ttf
then i uncomented the last three lines and Hellow world is there
Now what to do to fix stickers
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Stickers
If you want to use stickerInteractive.php change lines from 199 to 204 to:
Code: Select all
if(isset($_GET['font'])){
$fontFace = "e:/hurricanepub/plugins/stickers/fonts/".$_GET['font'].".ttf";
}
else{
$fontFace = "e:/hurricanepub/plugins/stickers/fonts/Ubuntu-Regular.ttf";
}
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
looks great
I would imagine i would have to do the same to stickerInteractiveAnim.php
Tget that to work
I would imagine i would have to do the same to stickerInteractiveAnim.php
Tget that to work
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
Thanks a lot this has been driveing me nuts
I changed stickersinteractiveanim.php and it seems a little messed up
I changed stickersinteractiveanim.php and it seems a little messed up
-
- Forecaster
- Posts: 165
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Fort Myers
- Station model: WS-5000/GW1100
- Software: ECOWITT Plugin
- Contact:
Re: Stickers
This Works