News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Integration hooks error

Started by Shades., September 10, 2021, 02:23:59 PM

Previous topic - Next topic

Shades.

So after upgrading from 2.0.18 to 2.1RC4 I finally think I get all the errors worked out and now I'm getting this:

QuoteType of error
General
Error message
2: fread(): Length parameter must be greater than 0
File
/home2/*****/public_html/*****/Sources/ManageMaintenance.php
Line
2067
URL of page causing the error
httpxx://*****/index.php?action=admin;area=maintain;sa=hooks;bbf19804b68=b1bf535e3237381e6e976a3425d3be33
Backtrace information
#0: smf_error_handler()
Called from unknown on line -1
#1: fread()
Called from /home2/*****/public_html/*****/Sources/ManageMaintenance.php on line 2067
#2: get_integration_hooks_data()
Called from /home2/*****/public_html/*****/Sources/Subs-List.php on line 132
#3: createList()
Called from /home2/*****/public_html/*****/Sources/ManageMaintenance.php on line 2008
#4: list_integration_hooks()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 5340
#5: call_helper()
Called from /home2/*****/public_html/*****/Sources/ManageMaintenance.php on line 113
#6: ManageMaintenance()
Called from /home2/*****/public_html/*****/Sources/Admin.php on line 499
#7: AdminMain()
Called from /home2/*****/public_html/*****/index.php on line 187

Only happens when I go to Admin>Maintenance>Forum Maintenance>Integration Hooks

And when I ran fix_packages.php got this:

QuoteType of error
Critical
Error message
JSON decode error: Syntax error, malformed JSON
File
/home2/*****/public_html/*****/Sources/Load.php
Line
355
URL of page causing the error
https://******/index.phpbbf19804b68=b1bf535e3237381e6e976a3425d3be33
Backtrace information
#0: smf_json_decode()
Called from /home2/*****/public_html/*****/Sources/Load.php on line 355
#1: reloadSettings()
Called from /home2/*****/public_html/*****/SSI.php on line 135
#2: require_once()
Called from /home2/*****/public_html/*****/fix_packages.php on line 22

No mods and no hooks
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

Just looked and only error I have in cpanel is:

Quote[Fri Sep 10 13:46:36.153114 2021] [:error] [pid 141723:tid 140320716572416] [client xxx.77.198.132:0] File does not exist: /home2/*****/public_html/*****/index.php, referer: https://*****/index.php?action=admin;area=scheduledtasks;sa=settings;bbf19804b68=b1bf535e3237381e6e976a3425d3be33
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

Any help on this would be greatly appreciated so I can move on with it! This is the only errors I have left as far as the upgrading goes. Mods...another thread! O:)

Thanks 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Oldiesmann

Apparently you have an empty file in one of your directories somewhere (filesize() will return 0 for empty files). This should get rid of the error...

Sources/ManageMaintenance.php

Find
$fc = fread($fp, filesize($file['dir'] . '/' . $file['name']));
Replace
if (filesize($file['dir'] . '/' . $file['name']) !== 0)
$fc = fread($fp, filesize($file['dir'] . '/' . $file['name']));
Michael Eshom
Christian Metal Fans

Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Advertisement: