• I getting error when pressing Information on any translation file. Using Version 2.5.2
    Error 500 on when GET /wp-admin/admin.php?path=languages%2Fplugins%2Fsimple-social-icons-sv_SE.po&bundle=simple-social-icons%2Fsimple-social-icons.php&domain=simple-social-icons&page=loco-plugin&action=file-info

    > Ett fel av typen E_ERROR uppstod på rad 96 i följande fil: wp-content/plugins/loco-translate/src/compat/PosixExtension.php. Felorsak: Uncaught Error: Call to undefined function posix_getpwuid() in /public_html/wp-content/plugins/loco-translate/src/compat/PosixExtension.php:96
    > Stack trace:
    > #0 //public_html/wp-content/plugins/loco-translate/src/admin/file/InfoController.php(85): Loco_compat_PosixExtension::getHttpdUser()
    > #1 /public_html/wp-content/plugins/loco-translate/src/mvc/AdminRouter.php(243): Loco_admin_file_InfoController->render()
    > #2 public_html/wp-includes/class-wp-hook.php(292): Loco_mvc_AdminRouter->renderPage()
    > #3 public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters()
    > #4 public_html/wp-includes/plugin.php(484): WP_Hook->do_action()
    > #5 public_html/wp-admin/admin.php(259): do_action()
    > #6 {main}
    > thrown
    >
    > Hosting provider logs:
    PHP Fatal error: Uncaught Error: Call to undefined function posix_getpwuid() in /public_html/wp-content/plugins/loco-translate/src/compat/PosixExtension.php:96
    > Stack trace:
    > #0 public_html/wp-content/plugins/loco-translate/src/admin/file/InfoController.php(85): Loco_compat_PosixExtension::getHttpdUser()
    > #1 public_html/wp-content/plugins/loco-translate/src/mvc/AdminRouter.php(243): Loco_admin_file_InfoController->render()
    > #2 public_html/wp-includes/class-wp-hook.php(292): Loco_mvc_AdminRouter->renderPage()
    > #3 public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters()
    > #4 public_html/wp-includes/plugin.php(484): WP_Hook->do_action()
    > #5 public_html/wp-admin/admin.php(259): do_action()
    > #6 {main}
    > /public_html/wp-content/plugins/loco-translate/src/compat/PosixExtension.php on line 96
    >
    >

    everything else works but not the information part. any ideas? Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Thanks for reporting.

    Looks like you have the posix_geteuid function available, but not posix_getpwuid. That’s my bad for not checking that both functions exist before using them.

    I’ll fix this in the next release of the plugin, but for now you might want to look at whether you have the posix extension installed.

    I don’t know why your function is missing. Either it’s not supported in your OS, or your posix_geteuid is a polyfill, or your posix extension is old. I’m guessing.

    Thread Starter Jarko Piironen

    (@ipajen)

    @timwhitlock
    Thank you, I am using PHP 8.0.3 and posix is enabled (my hosting provider is using LiteSpeed V7.8 CloudLinux 1.2), if I Change PHP to 7.2 it works fine. But in PHP8.
    PHP Warning: posix_getpwuid() has been disabled for security reasons (I will contact my hosting provider for more info)

    Plugin Author Tim W

    (@timwhitlock)

    That’s interesting, thank you.

    The posix_getpwuid function does fetch info from /etc/passwd but without any password data. I’m only using it to show the name of the file owner in the info tab. There’s a fallback, but it’s not very reliable.

    If you know of another function that does this reliably without the security implications then I’ll use it. In the mean time I’ve made a note to fix so the fallback works when this function is disabled.

    Thread Starter Jarko Piironen

    (@ipajen)

    @timwhitlock My hosting provider has enabled the posix_getpwuid() so it works fine now. Resolving the issue. Its great that you will make the check so it doesn’t crash for someone else. Thanks for the help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Crash when clicking on information undefined function’ is closed to new replies.