• Resolved mediatriveneto

    (@mediatriveneto)


    Hello,

    I saw that you resolved that error in past, (https://www.ads-software.com/support/topic/redis-issue-on-php-8/) but is present in my site:

    Redis::pconnect(): Passing null to parameter #2 ($port) of type int is deprecated

    1. Redis->pconnect()
      wp-content/plugins/w3-total-cache/Cache_Redis.php:523
    2. W3TC\Cache_Redis->_get_accessor()
      wp-content/plugins/w3-total-cache/Cache_Redis.php:316
    3. W3TC\Cache_Redis->_get_key_version()
      wp-content/plugins/w3-total-cache/Cache_Redis.php:272
    4. W3TC\Cache_Redis->flush()
      wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php:410
    5. W3TC\DbCache_WpdbInjection_QueryCaching->_flush_cache_for_sql_group()
      wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php:209
    6. W3TC\DbCache_WpdbInjection_QueryCaching->query()
      wp-content/plugins/w3-total-cache/DbCache_WpdbNew.php:122
    7. W3TC\DbCache_WpdbNew->query()
      wp-includes/option.php:1006
    8. add_option()
      wp-content/plugins/w3-total-cache/ObjectCache_WpObjectCache_Regular.php:698
    9. W3TC\ObjectCache_WpObjectCache_Regular->_transient_fallback_set()
      wp-content/plugins/w3-total-cache/ObjectCache_WpObjectCache_Regular.php:318
    10. W3TC\ObjectCache_WpObjectCache_Regular->set()
      wp-content/plugins/w3-total-cache/ObjectCache_WpObjectCache.php:68
    11. W3TC\ObjectCache_WpObjectCache->set()
      wp-content/object-cache.php:86
    12. wp_cache_set()
      wp-includes/option.php:1305
    13. set_transient('doing_cron')
      wp-includes/cron.php:910
    14. spawn_cron()
      wp-includes/cron.php:1028
    15. _wp_cron()
      wp-includes/class-wp-hook.php:324
    16. do_action('wp_loaded')
      wp-settings.php:717

    The plugin version is the latest.

    The error, detected with query monitor, is not relevant, but I think the report is useful for improving the plugin.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mediatriveneto

    Thank you for taking the time to share this.
    I’ve forwarded this to the dev team for review, and I’ll get back to you with more information once we check this and have more details about this.

    Thank you!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mediatriveneto

    Thank you for your patience.

    Can you pelase share which PHP version you are currently using and which Redis version you are using also? https://github.com/phpredis/phpredis?tab=readme-ov-file#connection

    If convenient can you please manually update the file in wp-content/plugins/w3-total-cache/Cache_Redis.php and in change the lines 463 and 465. Simply replace “null” to “0” (zero with no quotes)

    463:

    $connect_args[] = 0; // port.

    465:

    list( $ip, $port ) = Util_Content::endpoint_to_host_port( $server, 0 );

    Please makea backup before editing and let me know if this helps!

    Thanks!

    Thread Starter mediatriveneto

    (@mediatriveneto)

    Hello @vmarko

    Your solution it’s fine! Perfect.

    For information: PHP Version is 8.1.29 but i don’t know about Redis because is provided by hosting service.

    Thank’s!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.