Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP.wasm] Missing mysqli_report function #1990

Open
burncrete opened this issue Nov 8, 2024 · 13 comments
Open

[PHP.wasm] Missing mysqli_report function #1990

burncrete opened this issue Nov 8, 2024 · 13 comments
Labels
[Feature] PHP.wasm [Type] Bug An existing feature does not function as intended

Comments

@burncrete
Copy link

burncrete commented Nov 8, 2024

[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "importFile" step is deprecated. Use "importWxr" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "importFile" step is deprecated. Use "importWxr" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "importFile" step is deprecated. Use "importWxr" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "importFile" step is deprecated. Use "importWxr" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:01 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:25 UTC] JavaScript Warn: The "pluginZipFile" option is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:25 UTC] JavaScript Warn: The "pluginZipFile" option is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:26 UTC] JavaScript Warn: The "pluginZipFile" option is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:26 UTC] JavaScript Warn: The "pluginZipFile" option is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:26 UTC] JavaScript Warn: The "pluginZipFile" option is deprecated. Use "pluginData" instead.
[08-Nov-2024 11:59:27 UTC] JavaScript Warn: The "pluginZipFile" option is deprecated. Use "pluginData" instead.
[08-Nov-2024 12:00:40 UTC] PHP Fatal: PHP.run() failed with exit code 255 and the following output:  Error: PHP.run() failed with exit code 255 and the following output: 
    at PHP.run (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:53:1888)
    at async #u (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:6175)
    at async #l (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:5842)
    at async PlaygroundWorkerEndpoint.request (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:4:9278)
[08-Nov-2024 12:00:40 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_report() in /wordpress/wp-includes/class-wpdb.php:3
Stack trace:
#0 /wordpress/wp-includes/class-wpdb.php(3): wpdb->db_connect()
#1 /wordpress/wp-includes/load.php(2): wpdb->__construct('username_here', 'password_here', 'database_name_h...', 'localhost')
#2 /wordpress/wp-settings.php(2): require_wp_db()
#3 /wordpress/wp-config.php(102): require_once('/wordpress/wp-s...')
#4 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...')
#5 /wordpress/wp-admin/admin.php(2): require_once('/wordpress/wp-l...')
#6 /wordpress/wp-admin/plugins.php(2): require_once('/wordpress/wp-a...')
#7 {main}
  thrown in /wordpress/wp-includes/class-wpdb.php on line 3

[08-Nov-2024 12:00:42 UTC] PHP Fatal: PHP.run() failed with exit code 255 and the following output:  Error: PHP.run() failed with exit code 255 and the following output: 
    at PHP.run (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:53:1888)
    at async #u (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:6175)
    at async #l (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:5842)
    at async PlaygroundWorkerEndpoint.request (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:4:9278)
[08-Nov-2024 12:00:42 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_report() in /wordpress/wp-includes/class-wpdb.php:3
Stack trace:
#0 /wordpress/wp-includes/class-wpdb.php(3): wpdb->db_connect()
#1 /wordpress/wp-includes/load.php(2): wpdb->__construct('username_here', 'password_here', 'database_name_h...', 'localhost')
#2 /wordpress/wp-settings.php(2): require_wp_db()
#3 /wordpress/wp-config.php(102): require_once('/wordpress/wp-s...')
#4 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...')
#5 /wordpress/wp-admin/admin.php(2): require_once('/wordpress/wp-l...')
#6 /wordpress/wp-admin/plugins.php(2): require_once('/wordpress/wp-a...')
#7 {main}
  thrown in /wordpress/wp-includes/class-wpdb.php on line 3

[08-Nov-2024 12:00:43 UTC] PHP Fatal: PHP.run() failed with exit code 255 and the following output:  Error: PHP.run() failed with exit code 255 and the following output: 
    at PHP.run (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:53:1888)
    at async #u (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:6175)
    at async #l (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:5842)
    at async PlaygroundWorkerEndpoint.request (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:4:9278)
[08-Nov-2024 12:00:43 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_report() in /wordpress/wp-includes/class-wpdb.php:3
Stack trace:
#0 /wordpress/wp-includes/class-wpdb.php(3): wpdb->db_connect()
#1 /wordpress/wp-includes/load.php(2): wpdb->__construct('username_here', 'password_here', 'database_name_h...', 'localhost')
#2 /wordpress/wp-settings.php(2): require_wp_db()
#3 /wordpress/wp-config.php(102): require_once('/wordpress/wp-s...')
#4 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...')
#5 /wordpress/wp-admin/admin.php(2): require_once('/wordpress/wp-l...')
#6 /wordpress/wp-admin/tools.php(2): require_once('/wordpress/wp-a...')
#7 {main}
  thrown in /wordpress/wp-includes/class-wpdb.php on line 3

[08-Nov-2024 12:00:44 UTC] PHP Fatal: PHP.run() failed with exit code 255 and the following output:  Error: PHP.run() failed with exit code 255 and the following output: 
    at PHP.run (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:53:1888)
    at async #u (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:6175)
    at async #l (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:5842)
    at async PlaygroundWorkerEndpoint.request (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:4:9278)
[08-Nov-2024 12:00:44 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_report() in /wordpress/wp-includes/class-wpdb.php:3
Stack trace:
#0 /wordpress/wp-includes/class-wpdb.php(3): wpdb->db_connect()
#1 /wordpress/wp-includes/load.php(2): wpdb->__construct('username_here', 'password_here', 'database_name_h...', 'localhost')
#2 /wordpress/wp-settings.php(2): require_wp_db()
#3 /wordpress/wp-config.php(102): require_once('/wordpress/wp-s...')
#4 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...')
#5 /wordpress/wp-blog-header.php(2): require_once('/wordpress/wp-l...')
#6 /wordpress/index.php(2): require('/wordpress/wp-b...')
#7 {main}
  thrown in /wordpress/wp-includes/class-wpdb.php on line 3

[08-Nov-2024 12:00:54 UTC] PHP Fatal: PHP.run() failed with exit code 255 and the following output:  Error: PHP.run() failed with exit code 255 and the following output: 
    at PHP.run (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:53:1888)
    at async #u (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:6175)
    at async #l (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:5842)
    at async PlaygroundWorkerEndpoint.request (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:4:9278)
[08-Nov-2024 12:00:54 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_report() in /wordpress/wp-includes/class-wpdb.php:3
Stack trace:
#0 /wordpress/wp-includes/class-wpdb.php(3): wpdb->db_connect()
#1 /wordpress/wp-includes/load.php(2): wpdb->__construct('username_here', 'password_here', 'database_name_h...', 'localhost')
#2 /wordpress/wp-settings.php(2): require_wp_db()
#3 /wordpress/wp-config.php(102): require_once('/wordpress/wp-s...')
#4 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...')
#5 /wordpress/wp-admin/admin.php(2): require_once('/wordpress/wp-l...')
#6 /wordpress/wp-admin/index.php(2): require_once('/wordpress/wp-a...')
#7 {main}
  thrown in /wordpress/wp-includes/class-wpdb.php on line 3

[08-Nov-2024 12:06:31 UTC] PHP Fatal: PHP.run() failed with exit code 255 and the following output:  Error: PHP.run() failed with exit code 255 and the following output: 
    at PHP.run (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:53:1888)
    at async #u (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:6175)
    at async #l (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:61:5842)
    at async PlaygroundWorkerEndpoint.request (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:4:9278)
[08-Nov-2024 12:06:31 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_report() in /wordpress/wp-includes/class-wpdb.php:3
Stack trace:
#0 /wordpress/wp-includes/class-wpdb.php(3): wpdb->db_connect()
#1 /wordpress/wp-includes/load.php(2): wpdb->__construct('username_here', 'password_here', 'database_name_h...', 'localhost')
#2 /wordpress/wp-settings.php(2): require_wp_db()
#3 /wordpress/wp-config.php(102): require_once('/wordpress/wp-s...')
#4 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...')
#5 /wordpress/wp-admin/admin.php(2): require_once('/wordpress/wp-l...')
#6 /wordpress/wp-admin/index.php(2): require_once('/wordpress/wp-a...')
#7 {main}
  thrown in /wordpress/wp-includes/class-wpdb.php on line 3

[08-Nov-2024 12:10:27 UTC] JavaScript Error: PHP.run() failed with exit code 255 and the following output: PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_report() in /wordpress/wp-includes/class-wpdb.php:3
Stack trace:
#0 /wordpress/wp-includes/class-wpdb.php(3): wpdb->db_connect()
#1 /wordpress/wp-includes/load.php(2): wpdb->__construct('username_here', 'password_here', 'database_name_h...', 'localhost')
#2 /wordpress/wp-settings.php(2): require_wp_db()
#3 /wordpress/wp-config.php(102): require_once('/wordpress/wp-s...')
#4 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...')
#5 /internal/eval.php(7): require('/wordpress/wp-l...')
#6 {main}
  thrown in /wordpress/wp-includes/class-wpdb.php on line 3

Error: PHP.run() failed with exit code 255 and the following output: PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_report() in /wordpress/wp-includes/class-wpdb.php:3
Stack trace:
#0 /wordpress/wp-includes/class-wpdb.php(3): wpdb->db_connect()
#1 /wordpress/wp-includes/load.php(2): wpdb->__construct('username_here', 'password_here', 'database_name_h...', 'localhost')
#2 /wordpress/wp-settings.php(2): require_wp_db()
#3 /wordpress/wp-config.php(102): require_once('/wordpress/wp-s...')
#4 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...')
#5 /internal/eval.php(7): require('/wordpress/wp-l...')
#6 {main}
  thrown in /wordpress/wp-includes/class-wpdb.php on line 3

    at PHP.run (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:53:1888)
    at async isWordPressInstalled (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:108:1960)
    at async bootWordPress (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:108:1763)
    at async PlaygroundWorkerEndpoint.boot (https://playground.wordpress.net/worker-thread-e0b5e3b7.js:801:2766)
@bgrgicak bgrgicak changed the title Critical error In playground [PHP.wasm] Missing mysqli_report function Nov 11, 2024
@bgrgicak
Copy link
Collaborator

Thank you for reporting this error @burncrete!

I adjusted the title to match your error, but I don't fully understand what caused it from reading the error log.

Could you please share some instructions on how to recreate this issue, or ideally a Blueprint that causes the error?

@bgrgicak bgrgicak moved this from Inbox to Needs Author's Reply in Playground Board Nov 11, 2024
@bgrgicak bgrgicak added [Type] Bug An existing feature does not function as intended [Feature] PHP.wasm labels Nov 11, 2024
@burncrete
Copy link
Author

I too am uncertain of how the error occurred.
at first, I had opened the playground, WordPress 6.7 release candidate3.
changing the server config to PHP 8.2.2. from 8.0.0 wasm
to get accurate data of debugging reports.

hereafter, navigating to plugin Tab, to activate Query Monitor plugin.

then critical error triggered.

@adamziel adamziel moved this from Needs Author's Reply to Inbox in Playground Board Nov 11, 2024
@brandonpayton
Copy link
Member

@burncrete, was this with a saved site, and if so, do you know if the site was saved to the browser or to the local directory?

This is an interesting error. The only place I see mysqli_report() used within WordPress is here, in the default db_connect() method. But normally in Playground we use the sqlite-database-integration db_connect() method.

It seems like the sqlite-database-integration DB override would have to be skipped for this error to occur.

@brandonpayton
Copy link
Member

Were there any other interesting details of the configuration in this case, besides changing the selected PHP version?

@bgrgicak
Copy link
Collaborator

I can recreate this by installing Query monitor: https://playground.wordpress.net/?plugin=query-monitor

@bgrgicak
Copy link
Collaborator

bgrgicak commented Nov 12, 2024

We could add an empty function like we did with mysqli_connect.
Or we could call SQLite3::enableExceptions inside that function depending on the mysqli flag that was passed.

@bgrgicak bgrgicak moved this from Inbox to Needs Triage/Our Reply in Playground Board Nov 12, 2024
@burncrete
Copy link
Author

Were there any other interesting details of the configuration in this case, besides changing the selected PHP version?

Nonother notable errors. besides that instance

@adamziel
Copy link
Collaborator

What was the Blueprint you used @burncrete? The mysqli_report call that triggered this error is used in the WPDB class. That code path should never run in Playground – the SQLite integration plugin ships its own WPDB implementation with no mysqli_* function calls.

Seeing a mysqli_* function tells me the SQLite integration mu-plugin got somehow deleted, disabled, or otherwise corrupted. It might a problem in Playground or it might be related to the loaded Blueprint – if you shared yours, that would help a lot.

@adamziel adamziel moved this from Needs Triage/Our Reply to Needs Author's Reply in Playground Board Nov 13, 2024
@burncrete
Copy link
Author

there are saved playgrounds. namely funny vintage park & loyal cozy village

@adamziel adamziel moved this from Needs Author's Reply to Inbox in Playground Board Nov 13, 2024
@burncrete
Copy link
Author

Debug logs loyal cozy village.txt
those are the logs for one of the saved playgrounds

@adamziel
Copy link
Collaborator

@burncrete thank you for that detail! Would you mind sharing the original Blueprint used to create them? You can view it here:

Image

@burncrete
Copy link
Author

burncrete commented Nov 14, 2024 via email

@burncrete
Copy link
Author

burncrete commented Nov 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] PHP.wasm [Type] Bug An existing feature does not function as intended
Projects
Status: Inbox
Development

No branches or pull requests

4 participants