We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trying to import a gzip sql file and it gets stuck on "Parsing SQL file, please wait". Here is the error thrown in the logs.
Stack trace: #0 /app/wp-content/plugins/wp-migrate-db-pro/class/Pro/Import.php(543): DeliciousBrains\WPMDB\Pro\Import->file_is_gzipped('/tmp/5dee95da03...') #1 /app/wp-content/plugins/wp-migrate-db-pro/class/Pro/Import.php(123): DeliciousBrains\WPMDB\Pro\Import->str_is_gzipped('# WordPress MyS...') #2 /app/wp-includes/class-wp-hook.php(288): DeliciousBrains\WPMDB\Pro\Import->ajax_get_import_info('') #3 /app/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters('', Array) #4 /app/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #5 /app/wp-admin/admin-ajax.php(175): do_action('wp_ajax_wpmdb_g...') #6 {main} thrown in /app/wp-content/plugins/wp-migrate-db-pro/class/Pro/Import.php on line 566
/** * Checks if the provided file is gzipped * * @param string $file * * @return bool */ public function file_is_gzipped( $file ) { $is_gzipped = false; if ( ! $this->filesystem->is_file( $file ) ) { return $is_gzipped; } $content_type = mime_content_type( $file ); // Looks like it's getting stuck here.. if ( in_array( $content_type, array( 'application/x-gzip', 'application/gzip' ) ) ) { $is_gzipped = true; } return $is_gzipped; }
The text was updated successfully, but these errors were encountered:
This helps to resolve the issue:
public function file_is_gzipped( $file ) { $is_gzipped = false; if ( ! $this->filesystem->is_file( $file ) ) { return $is_gzipped; } $mime = wp_check_filetype( $file ); if ( false === $mime['type'] && function_exists( 'mime_content_type' ) ) { $mime['type'] = mime_content_type( $file ); } if ( in_array( $mime['type'], array( 'application/x-gzip', 'application/gzip' ) ) ) { $is_gzipped = true; } return $is_gzipped; }
Sorry, something went wrong.
No branches or pull requests
Trying to import a gzip sql file and it gets stuck on "Parsing SQL file, please wait". Here is the error thrown in the logs.
The text was updated successfully, but these errors were encountered: