WordPress / wordpress-playground

Run WordPress in the browser via WebAssembly PHP
https://w.org/playground/
GNU General Public License v2.0
1.65k stars 261 forks source link

[PHP.wasm] Missing mysqli_report function #1990

Open burncrete opened 2 weeks ago

burncrete commented 2 weeks ago
[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 commented 1 week ago

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?

burncrete commented 1 week ago

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.

brandonpayton commented 1 week ago

@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 commented 1 week ago

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

bgrgicak commented 1 week ago

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

bgrgicak commented 1 week ago

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.

burncrete commented 1 week ago

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 commented 1 week ago

What was the Blueprint you used @burncrete? The mysqlireport 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.

burncrete commented 1 week ago

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

burncrete commented 1 week ago

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

adamziel commented 1 week ago

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

Image

burncrete commented 1 week ago

Please see attached.

Whether or not this would be helpful, as previously stated the playground loaded perfectly fine. Until attempting to activate Query monitor which crashed the site.


From: Adam Zieliński @.> Sent: Wednesday, November 13, 2024 4:36 PM To: WordPress/wordpress-playground @.> Cc: Justin Dearling @.>; Mention @.> Subject: Re: [WordPress/wordpress-playground] [PHP.wasm] Missing mysqli_report function (Issue #1990)

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

@.*** (view on web)https://github.com/user-attachments/assets/0427e9b9-9dbe-45cb-b51a-1e4809680d9a

— Reply to this email directly, view it on GitHubhttps://github.com/WordPress/wordpress-playground/issues/1990#issuecomment-2473800957, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIAYUH2ODM7QZML2BXVDXV32ANPXFAVCNFSM6AAAAABRNLOAAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZTHAYDAOJVG4. You are receiving this because you were mentioned.Message ID: @.***>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.

burncrete commented 1 week ago

From: Justin Dearling @.> Sent: Thursday, November 14, 2024 9:46 AM To: WordPress/wordpress-playground @.> Subject: Re: [WordPress/wordpress-playground] [PHP.wasm] Missing mysqli_report function (Issue #1990)

Please see attached.

Whether or not this would be helpful, as previously stated the playground loaded perfectly fine. Until attempting to activate Query monitor which crashed the site.


From: Adam Zieliński @.> Sent: Wednesday, November 13, 2024 4:36 PM To: WordPress/wordpress-playground @.> Cc: Justin Dearling @.>; Mention @.> Subject: Re: [WordPress/wordpress-playground] [PHP.wasm] Missing mysqli_report function (Issue #1990)

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

@.*** (view on web)https://github.com/user-attachments/assets/0427e9b9-9dbe-45cb-b51a-1e4809680d9a

— Reply to this email directly, view it on GitHubhttps://github.com/WordPress/wordpress-playground/issues/1990#issuecomment-2473800957, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIAYUH2ODM7QZML2BXVDXV32ANPXFAVCNFSM6AAAAABRNLOAAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZTHAYDAOJVG4. You are receiving this because you were mentioned.Message ID: @.***>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.

[14-Nov-2024 07:48:28 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-33db168f.js:53:1888)
at async isWordPressInstalled (https://playground.wordpress.net/worker-thread-33db168f.js:108:1960)
at async bootWordPress (https://playground.wordpress.net/worker-thread-33db168f.js:108:1763)
at async PlaygroundWorkerEndpoint.boot (https://playground.wordpress.net/worker-thread-33db168f.js:801:2766)