jeanmarc77 / 123solar

123Solar is a lightweight set of PHP/JS files that makes a web logger to monitor your photovoltaic inverter(s). It just need a web server and PHP, no databases are even needed. The philosophy is: To keep it simple, fast, with a low foot print to run on cheap and low powered devices.
GNU General Public License v3.0
36 stars 12 forks source link

fatal error in php #16

Closed andysu closed 2 years ago

andysu commented 2 years ago

fatal error in php (and program stop) when in /data/invtX/msgqueue/ has file with 0 size line 650 in 123solar.php file $contents=fread($handle,filesize($filename)); need to check file size <>0 before

jeanmarc77 commented 2 years ago

sorry but that may be in /data/invtX/msgqueue/ which protocol you are using ?

andysu commented 2 years ago

protocol -aurora i fixed the path anyway if there is a file of zero length in this directory then php will fall I suggest to check the file size in the code

jeanmarc77 commented 2 years ago

ok i can do so but i never had that issue in more than 10 y

andysu commented 2 years ago

thanx!