• Resolved jemon

    (@jemon)


    Hey!

    I have a website running WordPress 6.0.1 and the latest version of your plugin at the time of writing this, being version 1.5.2. I tried upgrading the server the website is running on to be using PHP 8.1 instead of 7.4. However, when I tried accessing the page after upgrading I was greeted by the usual “The Site Is Experiencing Technical Difficulties” message.

    I get an error log printed to my debug.log file and if I’m reading it properly, it seems the problem is originating from your plugin’s main file. The output of my debug.log file is as follows:

    Stack trace:

    #0 /var/www/html/wp-admin/includes/class-wp-filesystem-ftpext.php(230): ftp_pwd(NULL)
    #1 /var/www/html/wp-admin/includes/class-wp-filesystem-ftpext.php(450): WP_Filesystem_FTPext->cwd()
    #2 /var/www/html/wp-content/plugins/pods-alternative-cache/classes/Pods/Alternative/Cache/File.php(335): WP_Filesystem_FTPext->is_dir('/var/www/sites/...')
    #3 /var/www/html/wp-content/plugins/pods-alternative-cache/classes/Pods/Alternative/Cache/File.php(246): Pods_Alternative_Cache_File->get_path_for_file('000001/2/f33/a8...')
    #4 /var/www/html/wp-content/plugins/pods-alternative-cache/classes/Pods/Alternative/Cache.php(119): Pods_Alternative_Cache_File->get_value('pods_pods_field...', '')
    #5 /var/www/html/wp-includes/class-wp-hook.php(307): Pods_Alternative_Cache->has_value(false, 'transient', 'pods_pods_field...', 'pods_field_type...', '')
    #6 /var/www/html/wp-includes/plugin.php(191): WP_Hook->apply_filters(false, Array)
    #7 /var/www/html/wp-content/plugins/pods/classes/PodsView.php(207): apply_filters('pods_view_cache...', false, 'transient', 'pods_pods_field...', 'pods_field_type...', '')
    #8 /var/www/html/wp-content/plugins/pods/includes/general.php(2273): PodsView::get('pods_field_type...', 'transient', '', NULL)
    #9 /var/www/html/wp-content/plugins/pods/includes/general.php(2374): pods_view_get('pods_field_type...', 'transient', '', NULL)
    #10 /var/www/html/wp-content/plugins/pods/classes/PodsForm.php(1571): pods_transient_get('pods_field_type...')
    #11 /var/www/html/wp-content/plugins/pods/includes/general.php(2702): PodsForm::register_field_type('pandarepeaterfi...', '/var/www/sites/...')
    #12 /var/www/html/wp-content/plugins/panda-pods-repeater-field/panda-pods-repeater-field.php(444): pods_register_field_type('pandarepeaterfi...', '/var/www/sites/...')
    #13 /var/www/html/wp-includes/class-wp-hook.php(307): panda_repeater_safe_activate('')
    #14 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #15 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #16 /var/www/html/wp-settings.php(461): do_action('plugins_loaded')
    #17 /var/www/html/wp-config.php(104): require_once('/var/www/sites/...')
    #18 /var/www/html/wp-load.php(50): require_once('/var/www/sites/...')
    #19 /var/www/html/wp-blog-header.php(13): require_once('/var/www/sites/...')
    #20 /var/www/html/index.php(17): require('/var/www/sites/...')
    #21 {main}
    thrown in /var/www/html/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230
    [24-Aug-2022 10:28:50 UTC] PHP Fatal error: Uncaught TypeError: ftp_pwd(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /var/www/html/wp-admin/includes/class-wp-filesystem-ftpext.php:230

    From before the PHP upgrade (when the server was running PHP 7.4) I used to get this error message in my debug.log:

    24-Aug-2022 11:56:34 UTC] PHP Warning: ftp_pwd() expects parameter 1 to be resource, null given in /var/www/html/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

    It seems it’s been a problem for a while but before PHP 8.1 it only threw a warning and not an error.

    If you believe the error is not coming from the Panda Pods Repeater Field plugin, I’d greatly appreciate it if you could point me in the proper direction.

    Thanks in advance!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Coding Panda

    (@codingpanda)

    Hi @jemon

    My testing environment is PHP 8.0.6, and it doesn’t seem to have any problems.

    At /var/www/html/wp-content/plugins/panda-pods-repeater-field/panda-pods-repeater-field.php(444): it is a Pods function called to register the field type: pods_register_field_type(), then it is taken over by Pods Framework.

    I will see if I can upgrade my PHP to 8.1 and replicate the problem, and then contact Pods about it.

    Thanks for letting me know.

    Heads up that to support PHP 8.1+ properly, Pods itself has to stop supporting PHP 5.6. As part of this, Pods will be updating the minimum required version to PHP 7.2+ in Pods 3.0 which will be released later this year.

    Plugin Author Coding Panda

    (@codingpanda)

    Hi @sc0ttkclark

    Thanks for joining us.

    I set up a testing site with PHP 8.1.6, Pods 2.9.3 and Panda Pods Repeater Field 1.5.2. It still worked, but I did get errors, even though I deactivated Panda Pods Repeater Field and left Pods to be the only active plugin.

    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of tad_DI52_Container::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\tribe-common\vendor\lucatume\di52\src\tad\DI52\Container.php on line 549
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of tad_DI52_Container::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\tribe-common\vendor\lucatume\di52\src\tad\DI52\Container.php on line 218
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of tad_DI52_Container::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\tribe-common\vendor\lucatume\di52\src\tad\DI52\Container.php on line 163
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of tad_DI52_Container::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\tribe-common\vendor\lucatume\di52\src\tad\DI52\Container.php on line 603
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods\Whatsit::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\src\Pods\Whatsit.php on line 351
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of & Pods\Whatsit::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\src\Pods\Whatsit.php on line 362
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods\Whatsit::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\src\Pods\Whatsit.php on line 375
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods\Whatsit::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\src\Pods\Whatsit.php on line 389
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods\Whatsit::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\src\Pods\Whatsit.php on line 285
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods\Whatsit::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\src\Pods\Whatsit.php on line 306
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods\Whatsit::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\src\Pods\Whatsit.php on line 322
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods\Whatsit::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\src\Pods\Whatsit.php on line 315
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods\Whatsit::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\src\Pods\Whatsit.php on line 329
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods\Whatsit::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\src\Pods\Whatsit.php on line 299
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\classes\Pods.php on line 281
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\classes\Pods.php on line 313
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\classes\Pods.php on line 299
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\classes\Pods.php on line 224
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  Return type of Pods::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\classes\Pods.php on line 263
    [27-Aug-2022 14:20:00 UTC] PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in F:\xampp\htdocs\pprf-from-user\wp-content\plugins\pods\classes\PodsData.php on line 829

    Is it something for the Pods team to sort out or is there something I need to do?

    Thanks

    PHP 7+ is when you get access to utilize return types and unfortunately PHP 5.6 doesn’t support them. That’s why upping the PHP version required for Pods in Pods 3.0 will put us on track towards resolving all of these new deprecated notices.

    Plugin Author Coding Panda

    (@codingpanda)

    Thanks, @sc0ttkclark.

    Hi @jemon, if I understand Scott correctly, these problems will be fixed in Pods 3.0. So for now we can only wait and avoid using PHP 8 if it leads to “The Site Is Experiencing Technical Difficulties”.

    Thread Starter jemon

    (@jemon)

    Hi @codingpanda,

    Excuse me for the late response, I got sick for a couple of days and didn’t check back here until now. Thank you (and @sc0ttkclark as well) for the help in figuring this out!

    • This reply was modified 2 years, 2 months ago by jemon.
    Plugin Author Coding Panda

    (@codingpanda)

    @jemon

    No problem. Hope you have fully recovered and take care.

    If you need it, Pods 3.0 (alpha 1 build) is available here with improved PHP 8.0 / 8.1 support: https://github.com/pods-framework/pods/archive/refs/heads/release/3.0.zip

    Plugin Author Coding Panda

    (@codingpanda)

    Thanks @sc0ttkclark

    Any idea on when Pods 3.0 will be released? It’s the last holdout for me to move to PHP 8.1.

    I’ve pushed more PHP 8.X support into Pods 2.8.10 which should resolve the main issues you were seeing there.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Issue: Plugin lacks support for PHP 8.1’ is closed to new replies.