Page 1 of 1

multiple deprecated warnings on live site

Posted: Wed Jul 24, 2024 7:00 am
by Portman
Hi,

I have just noticed that I am getting multiple deprecated warnings onmy site since I went live... I was not getting these warnings on my dev site, and I am not sure if this is a big problem or not - but it is packing my error log full of warnings...

It Seems to be this on repeat;

Code: Select all

PHP Deprecated:  Return type of database_core::query($sql, $resultmode = MYSQLI_STORE_RESULT) should either be compatible with mysqli::query(string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.1/database_core.php on line 61
PHP Deprecated:  Return type of Href::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.5/href.php on line 145
PHP Deprecated:  Return type of mysql_session::open($save_path, $session_name) should either be compatible with SessionHandler::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/../includes/system/versioned/1.0.8.3/mysql_session.php on line 27
PHP Deprecated:  Return type of mysql_session::close() should either be compatible with SessionHandler::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 15
PHP Deprecated:  Return type of mysql_session::read($key) should either be compatible with SessionHandler::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 31
PHP Deprecated:  Return type of mysql_session::write($key, $value) should either be compatible with SessionHandler::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 47
PHP Deprecated:  Return type of mysql_session::destroy($key) should either be compatible with SessionHandler::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 19
PHP Deprecated:  Return type of mysql_session::gc($maxlifetime) should either be compatible with SessionHandler::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 23
PHP Deprecated:  Return type of mysql_session::validateId($key) should either be compatible with SessionUpdateTimestampHandlerInterface::validateId(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 42
PHP Deprecated:  Return type of mysql_session::updateTimestamp($key, $ignore) should either be compatible with SessionUpdateTimestampHandlerInterface::updateTimestamp(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 38
Any thoughts on what could be causing this and if it is a major issue that I need to be worried about?

Re: multiple depreciated warnings on live site

Posted: Wed Jul 24, 2024 8:14 am
by burt
It is always best to NOT have stuff written to the error_log, and the error here tells you what to do, eg (the bolded bit);

PHP Deprecated: Return type of mysql_session::updateTimestamp($key, $ignore) should either be compatible with SessionUpdateTimestampHandlerInterface::updateTimestamp(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 38

So you should now post the code here,, from the following file;
/includes/system/versioned/1.0.8.3/mysql_session.php
so that we can see the file.

inside CODE tags. Click the </> button to get CODE tags, in the menu above the post.

Re: multiple deprecated warnings on live site

Posted: Wed Jul 24, 2024 11:47 am
by ecartz
Or just tell us what version of Phoenix you're using. This should be correct in 1.0.8.21 or newer. So updating to 1.0.9.0 should fix it. Or just copy mysql_session, database_core, and href from 1.0.9.0 or newer.