0 && $memory < 128 * 1024 * 1024 ) { $warnings[] = sprintf( /* translators: %s: current memory limit. */ __( 'PHP memory limit is %s. Backups will run in small chunks, but 128M or more is recommended.', 'backupino' ), ini_get( 'memory_limit' ) ); } $runtime = (int) ini_get( 'max_execution_time' ); if ( 0 !== $runtime && $runtime < 30 ) { $warnings[] = sprintf( /* translators: %d: seconds. */ __( 'max_execution_time is %d seconds. Long steps will be split automatically.', 'backupino' ), $runtime ); } if ( ! extension_loaded( 'openssl' ) ) { $warnings[] = __( 'OpenSSL extension is missing: secure HTTPS communications will be unavailable.', 'backupino' ); } if ( ! extension_loaded( 'mbstring' ) ) { $warnings[] = __( 'mbstring is missing: multibyte site titles may be truncated on URL replacement.', 'backupino' ); } return $warnings; } /** * Snapshot of the environment, used by the admin screen and the CLI. * * @param Paths $paths Storage layout. * @return array */ public static function snapshot( Paths $paths ): array { return array( 'php_version' => PHP_VERSION, 'wp_version' => function_exists( 'get_bloginfo' ) ? get_bloginfo( 'version' ) : '', 'memory_limit' => (string) ini_get( 'memory_limit' ), 'max_execution' => (int) ini_get( 'max_execution_time' ), 'post_max_size' => (string) ini_get( 'post_max_size' ), 'disk_free' => Fs::free_space( $paths->base() ), 'zip' => class_exists( 'ZipArchive' ), 'openssl' => extension_loaded( 'openssl' ), 'curl' => extension_loaded( 'curl' ), 'suhosin' => extension_loaded( 'suhosin' ), 'storage_writable' => Fs::is_writable_dir( $paths->base() ), 'storage_path' => $paths->base(), 'blocking' => self::blocking_issues(), 'warnings' => self::warnings(), ); } /** * Whether an archiver backend exists. * * @return bool */ private static function has_archiver(): bool { return class_exists( 'ZipArchive' ) || class_exists( 'PclZip' ); } }