XF 2.2 Copy and paste the link, Server error

welington

Active member
Licensed customer
I need help.
Anywhere on the forum I place a link, post or private.
It keeps showing this server error....

Server error log
  • ErrorException: Fatal Error: Declaration of XF\Http\Stream::write($string) must be compatible with Psr\Http\Message\StreamInterface::write(string $string): int
  • src/XF/Http/Stream.php:29
  • Generated by: Unknown account
  • Aug 21, 2024 at 12:09 AM

Stack trace​

#0 [internal function]: XF::handleFatalError()
#1 {main}

Request state​

array(4) {
["url"] => string(11) "/unfurl.php"
["referrer"] => string(57) "https://msfix.info/pedido/gostaria-da-bios-do-aion-aoc.6/"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["result_ids"] => array(3) {
[0] => string(2) "50"
[1] => string(2) "51"
[2] => string(2) "52"
}
["_xfRequestUri"] => string(39) "/pedido/gostaria-da-bios-do-aion-aoc.6/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "********"
}
}


Screenshot_144.webp

Screenshot_143.webp
 
I've already done this and disabled all addons, but the problem persists.

So I'm going to buy a new XF 2.3
update my entire VPS...... php 8xxx
Thank you
 
I understood....
Because of this problem, I hope my forum doesn't go offline.
So if I update generally, (I will soon changeXF 2.3 - VPS PHP 8XX).
The problem will definitely be resolved.
thanks for help.
a hug.;)
 
This won't be resolved by server or PHP changes, it is caused due to an add-on incompatibility (ie. using an XF 2.3 add-on on XF 2.2, etc.). You will need to disable/enable add-ons in between testing to pinpoint which one.
 
If upgrading is not a straightforward option, you might consider updating the write method in XF\Http\Stream as follows:

public function write(string $string): int

This ensures the method aligns exactly with the write method in psr7.
 
I have same problem.

xenforo 2.3 latest
php version: 8.2.30

I disabled every addon but i have same problem
Are you having the exact same error message as the op? If not, can you please post the error message?

Can you recall what was the latest change or modification done to your forum prior to this happening?
 
Are you having the exact same error message as the op? If not, can you please post the error message?

Can you recall what was the latest change or modification done to your forum prior to this happening?
thank you for your reply this error started when i first updated 2.2 TO 2.3

  • ErrorException: Fatal Error: Declaration of XF\Http\Stream::write(string $string): int must be compatible with PsrExt\Http\Message\StreamInterface::write($string)
  • src/XF/Http/Stream.php:33
 

Attachments

  • Ekran Resmi 2026-02-05 13.23.32.webp
    Ekran Resmi 2026-02-05 13.23.32.webp
    44.4 KB · Views: 6
If upgrading is not a straightforward option, you might consider updating the write method in XF\Http\Stream as follows:

public function write(string $string): int

This ensures the method aligns exactly with the write method in psr7.
how can i do this? I checked files its same as you write.
 

Attachments

  • Ekran Resmi 2026-02-10 22.59.00.webp
    Ekran Resmi 2026-02-10 22.59.00.webp
    63.1 KB · Views: 3
Back
Top Bottom