• After updating PHP to 8.0, we are getting the following error when making backups. Our host refuses to enable php_uname() as they state it is a security risk. Can you help?

    PHP Fatal error:  Uncaught Error: Call to undefined function php_uname() in /public_html/wp-admin/includes/class-pclzip.php:5717
    Stack trace:
    #0 /public_html/wp-admin/includes/class-pclzip.php(1463): PclZipUtilTranslateWinPath()
    #1 /public_html/wp-admin/includes/class-pclzip.php(312): PclZip->privParseOptions()
    #2 /public_html/wp-content/plugins/better-wp-security/core/modules/backup/class-itsec-backup.php(216): PclZip->create()
    #3 /public_html/wp-content/plugins/better-wp-security/core/modules/backup/class-itsec-backup.php(82): ITSEC_Backup->execute_backup()
    #4 /public_html/wp-content/plugins/better-wp-security/core/modules/backup/class-itsec-backup.php(61): ITSEC_Backup->do_backup()
    #5 /public_html/wp-includes/class-wp-hook.php(307): ITSEC_Backup->scheduled_callback()
    #6 /public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #7 /public_html/wp-includes/plugin.php(476): WP_Hook->do_action()
    #8 /public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-scheduler.php(383): do_action()
    #9 /public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-scheduler-cron.php(62): ITSEC_Scheduler->call_action()
    #10 /public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-scheduler-cron.php(47): ITSEC_Scheduler_Cron->run_recurring_event()
    #11 /public_html/wp-includes/class-wp-hook.php(307): ITSEC_Scheduler_Cron->process()
    #12 /public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #13 /public_html/wp-includes/plugin.php(524): WP_Hook->do_action()
    #14 //public_html/wp-cron.php(138): do_action_ref_array()
    #15 {main}
      thrown in /public_html/wp-admin/includes/class-pclzip.php on line 5717
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @rudy76, thank you for reaching out. I will have to clarify this with our developers, but in the meantime, I recommend using another service to create backups of your site. I’ll get back to you as soon as I receive a response.

    Hi Rudy76,

    Going back to the previous PHP version is an option. Apparently you didn’t have this issue on that PHP release. What PHP release did you update from? Any particular reason you updated PHP to 8.0?

    So to me (but I could be wrong) it sounds like your host allows php_uname() in the PHP release you updated from but not in PHP 8.0 …

    That makes no sense.

    Thread Starter Rudy76

    (@rudy76)

    Hi nlpro,

    We updated to from PHP 7.4 PHP 8.0 as PHP 7.4 reaches end of life (EOL) on the 28 November 2022.

    You are correct. The host did allow php_uname() with PHP 7.4 but refuses to with PHP 8.0 stating security reasons.

    Ah ok, I see.

    Since this is an issue while compressing the database backup file, as a temporary workaround you could disable the database backup file compression.

    To do so, in the iTSec plugin menu navigate to:

    Security > Settings > CONFIGURE => Utilities

    And untick the Compress Backup Files checkbox. Then click on the Save button at the bottom of the page (You’ll probably need to scroll down to see the Save button).

    It’s probably best to monitor/evaluate database backup (uncompressed) file size, available disk space, backup method and number of backups to retain in order to determin whether this is a viable option.

    • This reply was modified 3 years, 5 months ago by nlpro.
    • This reply was modified 3 years, 5 months ago by nlpro.

    @timothyblynjacobs

    Would it be possible for the Database Backups feature to use ZipArchive by default and pclzip as a fallback for file compression ? (Similar to the WordPress core unzip_file() function). It would make file compression of the Database Backups module more robust.

    Any idea why WordPress core does not have a zip_file() function ?
    (Looks like WordPress doesn’t include any functionality that needs zipping).

    • This reply was modified 3 years, 5 months ago by nlpro.
    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @rudy7, I appreciate your patience on this matter, and rest assured, I’ll get back once I receive feedback from our developers.

    Hi @nlpro, I have included your questions in our internal report and will inform our developer about this. Thank you.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @rudy76, thank you for patiently waiting. According to our developer, there is no real security risk in making the php_uname function available. You may disable the “Compress Backup Files” option to turn off zipping.

    We have also included switching to the ZipArchive library when available on our milestone; however, I cannot give the ETA for the implementation.

    @nlpro I hope this also answers your question.

    Hi everybody,
    I have this error too, but it happens when I turn on a plugin.
    WordPress version 6.1.1
    Active template: Twenty Twenty-Two (version 1.3)
    Current plugin: WPLegalPages (version 2.9.1)
    PHP version: 8.0.27

    Error details

    Line 190 of the /home/gazdagodjvelem/public_html/gv/wp-content/plugins/wplegalpages/analytics/includes/tracking/class-analytics-tracking.php file causes an E_ERROR type error. Error message: Uncaught Error: Call to undefined function php_uname() in /home/gazdagodjvelem/public_html/gv/wp-content/plugins/wplegalpages/analytics/includes/tracking/class-analytics-tracking.php:190
    Stack trace:

    0 /home/gazdagodjvelem/public_html/gv/wp-content/plugins/wplegalpages/analytics/includes/tracking/class-analytics-tracking.php(163): Analytics_Tracking->analytics_tracking_get_server_data()

    1 /home/gazdagodjvelem/public_html/gv/wp-includes/class-wp-hook.php(308): Analytics_Tracking->analytics_tracking_send(”)

    2 /home/gazdagodjvelem/public_html/gv/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)

    3 /home/gazdagodjvelem/public_html/gv/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

    4 /home/gazdagodjvelem/public_html/gv/wp-admin/admin.php(175): do_action(‘admin_init’)

    #5 {main}

    thrown

    Please help me. Laszlo

    Hi @correctline,

    Probably best to open a new topic in WPLegalPages support forum.

    I wrote to my hosting provider, and they replied:

    The PHP function php_uname is disable due to security reasons on the server, the hackers use this to extract the server and PHP information to use for intruding the loop holes on the server. 
    Please check if you can use other plugins for the same functionality.

    I wrote to the plugin support twice, they still haven’t answered.
    I’m waiting for a reply for now.

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

The topic ‘PHP Fatal error: Call to undefined function php_uname()’ is closed to new replies.