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

Playground via Visual Studio Code stoped working #123

Open
irishetcher opened this issue Nov 8, 2023 · 3 comments
Open

Playground via Visual Studio Code stoped working #123

irishetcher opened this issue Nov 8, 2023 · 3 comments
Labels
Bug Something isn't working

Comments

@irishetcher
Copy link

Hi,

I used the playground a number of weeks ago but, after a few weeks I noticed that it won't start anymore with the Visual Studio Code extension. I did remove the original WordPress directory that I was using locally and tried a new version, which is now version 6.4. I can't find any documentation on either removing all parts of the install and reinstalling or anything on troubleshooting this.

I include a sreenshot of the error in VIsual Studio.

Screenshot 2023-11-08 at 9 38 30 a m

@irishetcher
Copy link
Author

irishetcher commented Nov 8, 2023

I see the following errors now:

Warning: require_once(/var/www/html/wp-content/db.php): failed to open stream: No error information in /var/www/html/wp-includes/load.php on line 666

Fatal error: require_once(): Failed opening required '/var/www/html/wp-content/db.php' (include_path='.:') in /var/www/html/wp-includes/load.php on line 666

In that file on line 666, is there anything I can do here?

I see that it probably relates to this function in the load.php file:

function require_wp_db() {
global $wpdb;

require_once ABSPATH . WPINC . '/class-wpdb.php';

if ( file_exists( WP_CONTENT_DIR . '/db.php' ) ) {
	require_once WP_CONTENT_DIR . '/db.php';
}

if ( isset( $wpdb ) ) {
	return;
}

$dbuser     = defined( 'DB_USER' ) ? DB_USER : '';
$dbpassword = defined( 'DB_PASSWORD' ) ? DB_PASSWORD : '';
$dbname     = defined( 'DB_NAME' ) ? DB_NAME : '';
$dbhost     = defined( 'DB_HOST' ) ? DB_HOST : '';

$wpdb = new wpdb( $dbuser, $dbpassword, $dbname, $dbhost );

}

@adamziel adamziel added the Bug Something isn't working label Nov 15, 2023
@adamziel adamziel transferred this issue from WordPress/wordpress-playground Nov 15, 2023
@adamziel
Copy link
Collaborator

adamziel commented Nov 15, 2023

I went ahead and transferred this issue to the playground-tools repo where the VS Code extension is maintained. It sounds like the drop-in SQLite integration isn't getting set up properly (that's where the db.php file comes from)

@irishetcher
Copy link
Author

irishetcher commented Nov 16, 2023

Thanks Adam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants