/*
* Plugin Name: APCu Object Cache
* Description: APCu backend for the WP Object Cache.
* Based on Plugin named APCu Object Cache Backend
* Plugin URI: https://wordpress.org/plugins/apcu/
* Author: Pierre Schmitz
* Author URI: https://pierre-schmitz.com/
* Plugin URI: https://wordpress.org/plugins/apcu/
*
*
* @Authors James Dugger, Jonathan Bardo
* @copyright 2017 GoDaddy Inc. 14455 N. Hayden Road Scottsdale, Arizona
*/
$oc_logged_in = false;
foreach ( $_COOKIE as $k => $v ) {
if ( preg_match( '/^comment_author|wordpress_logged_in_[a-f0-9]+|woocommerce_items_in_cart|PHPSESSID_|edd_wp_session|edd_items_in_cartcc_cart_key|ccm_token/', $k ) ) {
$oc_logged_in = true;
break;
}
}
$oc_blocked_page = ( defined( 'WP_ADMIN' ) || defined( 'DOING_AJAX' ) || defined( 'XMLRPC_REQUEST' ) || 'wp-login.php' === basename( $_SERVER['SCRIPT_FILENAME'] ) );
function wpaas_is_using_apcu() {
return version_compare( PHP_VERSION, '5.6.0', '>=' ) && function_exists( 'apcu_fetch' );
}
if ( 'cli' !== php_sapi_name() && ! $oc_logged_in && ! $oc_blocked_page && wpaas_is_using_apcu() ) :
/**
* Save the transients to the DB. The explanation is a bit too long
* for code. The tl;dr of it is that we don't have a single 'fast cache'
* source yet (like memcached) and so some long lived items like transients
* are still best cached in the db and then brought back into APC
*
* @param string $transient
* @param mixed $value
* @param int $expire
* @param boolean $site = false
*
* @return bool
*/
function wpaas_save_transient( $transient, $value, $expire, $site = false ) {
global $wp_object_cache, $wpdb;
// The 'special' transient option names
$transient_timeout = ( $site ? '_site' : '' ) . '_transient_timeout_' . $transient;
$transient = ( $site ? '_site' : '' ) . '_transient_' . $transient;
// Cap expiration at 24 hours to avoid littering the DB
if ( $expire == 0 ) {
$expire = 24 * 60 * 60;
}
// Save to object cache
$wp_object_cache->set( $transient, $value, 'options', $expire );
$wp_object_cache->set( $transient_timeout, time() + $expire, 'options', $expire );
// Update alloptions
$alloptions = $wp_object_cache->get( 'alloptions', 'options' );
$alloptions[ $transient ] = $value;
$alloptions[ $transient_timeout ] = time() + $expire;
$wp_object_cache->set( 'alloptions', $alloptions, 'options' );
// Use the normal update option logic
if ( ! empty( $wpdb ) && $wpdb instanceof wpdb ) {
$flag = $wpdb->suppress_errors;
$wpdb->suppress_errors( true );
if ( $site && is_multisite() ) {
$wpdb->query(
$wpdb->prepare(
"INSERT INTO `{$wpdb->sitemeta}` ( `option_name`, `option_value`, `autoload` ) VALUES ( %s, UNIX_TIMESTAMP( NOW() ) + %d, 'yes' ) ON DUPLICATE KEY UPDATE `option_name` = VALUES ( `option_name` ), `option_value` = VALUES ( `option_value` ), `autoload` = VALUES ( `autoload` );",
$transient_timeout,
$expire
)
);
$wpdb->query(
$wpdb->prepare(
"INSERT INTO `{$wpdb->sitemeta}` ( `option_name`, `option_value`, `autoload` ) VALUES ( %s, %s, 'no' ) ON DUPLICATE KEY UPDATE `option_name` = VALUES ( `option_name` ), `option_value` = VALUES ( `option_value` ), `autoload` = VALUES ( `autoload` );",
$transient,
maybe_serialize( $value )
)
);
} else {
$wpdb->query(
$wpdb->prepare(
"INSERT INTO `{$wpdb->options}` (`option_name`, `option_value`, `autoload`) VALUES ( %s, UNIX_TIMESTAMP( NOW() ) + %d, 'yes' ) ON DUPLICATE KEY UPDATE `option_name` = VALUES ( `option_name` ), `option_value` = VALUES ( `option_value` ), `autoload` = VALUES ( `autoload` );",
$transient_timeout,
$expire
)
);
$wpdb->query(
$wpdb->prepare(
"INSERT INTO `{$wpdb->options}` (`option_name`, `option_value`, `autoload`) VALUES ( %s, %s, 'no' ) ON DUPLICATE KEY UPDATE `option_name` = VALUES ( `option_name` ), `option_value` = VALUES ( `option_value` ), `autoload` = VALUES ( `autoload` );",
$transient,
maybe_serialize( $value )
)
);
}
$wpdb->suppress_errors( $flag );
}
return true;
}
function wpaas_prune_transients() {
global $wpdb;
if ( ! empty( $wpdb ) && $wpdb instanceof wpdb && function_exists( 'is_main_site' ) && function_exists( 'is_main_network' ) ) {
$flag = $wpdb->suppress_errors;
$wpdb->suppress_errors( true );
// Lifted straight from schema.php
// Deletes all expired transients.
// The multi-table delete syntax is used to delete the transient record from table a,
// and the corresponding transient_timeout record from table b.
$time = time();
$wpdb->query( "DELETE a, b FROM $wpdb->options a, $wpdb->options b WHERE
a.option_name LIKE '\_transient\_%' AND
a.option_name NOT LIKE '\_transient\_timeout\_%' AND
b.option_name = CONCAT( '_transient_timeout_', SUBSTRING( a.option_name, 12 ) )
AND b.option_value < $time" );
if ( is_main_site() && is_main_network() ) {
$wpdb->query( "DELETE a, b FROM $wpdb->options a, $wpdb->options b WHERE
a.option_name LIKE '\_site\_transient\_%' AND
a.option_name NOT LIKE '\_site\_transient\_timeout\_%' AND
b.option_name = CONCAT( '_site_transient_timeout_', SUBSTRING( a.option_name, 17 ) )
AND b.option_value < $time" );
}
$wpdb->suppress_errors( $flag );
}
}
/**
* If another cache was flushed or updated, sync across all servers / processes using
* the database as the authority. This uses the database as the authority for timestamps
* as well to avoid drift between servers.
* @return void
*/
function wpaas_init_sync_cache() {
global $wpdb;
if ( empty( $wpdb ) || ! ( $wpdb instanceof wpdb ) ) {
return;
}
$flag = $wpdb->suppress_errors;
$wpdb->suppress_errors( true );
$result = $wpdb->get_results(
"SELECT option_name, option_value FROM `{$wpdb->options}` WHERE option_name = 'gd_system_last_cache_flush' UNION SELECT 'current_time', UNIX_TIMESTAMP( NOW() ) AS option_value;",
ARRAY_A
);
$wpdb->suppress_errors( $flag );
if ( empty( $result ) ) {
return;
}
$master_flush = false;
foreach ( $result as $row ) {
switch ( $row['option_name'] ) {
case 'current_time' :
$current_time = $row['option_value'];
break;
case 'gd_system_last_cache_flush' :
$master_flush = $row['option_value'];
break;
}
}
$local_flush = wp_cache_get( 'gd_system_last_cache_flush' );
if ( false === $local_flush || $local_flush < $master_flush ) {
wp_cache_flush( true );
wp_cache_set( 'gd_system_last_cache_flush', $current_time );
}
}
/**
* Start default implementation of object cache
*/
if ( ! defined( 'WP_APC_KEY_SALT' ) ) {
define( 'WP_APC_KEY_SALT', '' );
}
function wp_cache_add( $key, $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
if ( 'transient' == $group ) {
wpaas_save_transient( $key, $data, $expire );
return $wp_object_cache->add( "_transient_$key", $data, 'options', $expire );
} elseif ( 'site-transient' == $group ) {
wpaas_save_transient( $key, $data, $expire, true );
return $wp_object_cache->add( "_site_transient_$key", $data, 'site-options', $expire );
} else {
return $wp_object_cache->add( $key, $data, $group, $expire );
}
}
function wp_cache_incr( $key, $n = 1, $group = '' ) {
global $wp_object_cache;
return $wp_object_cache->incr2( $key, $n, $group );
}
function wp_cache_decr( $key, $n = 1, $group = '' ) {
global $wp_object_cache;
return $wp_object_cache->decr( $key, $n, $group );
}
function wp_cache_close() {
return true;
}
function wp_cache_delete( $key, $group = '' ) {
global $wp_object_cache, $wpdb;
if ( 'transient' == $group ) {
if ( ! empty( $wpdb ) && $wpdb instanceof wpdb ) {
$flag = $wpdb->suppress_errors;
$wpdb->suppress_errors( true );
$wpdb->query(
$wpdb->prepare(
"DELETE FROM `{$wpdb->prefix}options` WHERE option_name IN ( %s, %s );",
"_transient_{$key}",
"_transient_timeout_{$key}"
)
);
$wpdb->suppress_errors( $flag );
}
$wp_object_cache->delete( "_transient_timeout_$key", 'options' );
// Update alloptions
$alloptions = $wp_object_cache->get( 'alloptions', 'options' );
unset( $alloptions["_transient_$key"] );
unset( $alloptions["_transient_timeout_$key"] );
$wp_object_cache->set( 'alloptions', $alloptions, 'options' );
return $wp_object_cache->delete( "_transient_$key", 'options' );
} elseif ( 'site-transient' == $group ) {
if ( ! empty( $wpdb ) && $wpdb instanceof wpdb ) {
$table = $wpdb->options;
if ( is_multisite() ) {
$table = $wpdb->sitemeta;
}
$flag = $wpdb->suppress_errors;
$wpdb->suppress_errors( true );
$wpdb->query(
$wpdb->prepare(
"DELETE FROM `{$table}` WHERE option_name IN ( %s, %s );",
"_transient_{$key}",
"_transient_timeout_{$key}"
)
);
$wpdb->suppress_errors( $flag );
}
$wp_object_cache->delete( "_transient_timeout_$key", 'site-options' );
// Update alloptions
$alloptions = $wp_object_cache->get( 'alloptions', 'options' );
unset( $alloptions["_site_transient_$key"] );
unset( $alloptions["_site_transient_timeout_$key"] );
$wp_object_cache->set( 'alloptions', $alloptions, 'options' );
return $wp_object_cache->delete( "_site_transient_$key", 'site-options' );
}
return $wp_object_cache->delete( $key, $group );
}
function wp_cache_flush( $local_flush = false ) {
global $wp_object_cache, $wpdb;
if ( ! $local_flush ) {
if ( ! empty( $wpdb ) && $wpdb instanceof wpdb ) {
$flag = $wpdb->suppress_errors;
$wpdb->suppress_errors( true );
$wpdb->query( "INSERT INTO `{$wpdb->options}` (`option_name`, `option_value`, `autoload`) VALUES ( 'gd_system_last_cache_flush', UNIX_TIMESTAMP( NOW() ), 'no' ) ON DUPLICATE KEY UPDATE `option_name` = VALUES ( `option_name` ), `option_value` = VALUES ( `option_value` ), `autoload` = VALUES ( `autoload` );" );
$wpdb->suppress_errors( $flag );
}
}
return $wp_object_cache->flush();
}
function wp_cache_get( $key, $group = '', $force = false ) {
global $wp_object_cache, $wpdb;
if ( 'transient' == $group ) {
$alloptions = $wp_object_cache->get( 'alloptions', 'options' );
if ( isset( $alloptions["_transient_$key"] ) && isset( $alloptions["_transient_timeout_$key"] ) && $alloptions["_transient_timeout_$key"] > time() ) {
return maybe_unserialize( $alloptions["_transient_$key"] );
}
$transient = $wp_object_cache->get( "_transient_$key", 'options', $force );
$timeout = $wp_object_cache->get( "_transient_timeout_$key", 'options', $force );
if ( false !== $transient && ! empty( $timeout ) && $timeout > time() ) {
return maybe_unserialize( $transient );
}
if ( ! empty( $wpdb ) && $wpdb instanceof wpdb ) {
$flag = $wpdb->suppress_errors;
$wpdb->suppress_errors( true );
$result = $wpdb->get_results(
$wpdb->prepare(
"SELECT option_name, option_value FROM `{$wpdb->options}` WHERE option_name IN ( %s, %s ) UNION SELECT 'current_time', UNIX_TIMESTAMP( NOW() ) AS option_value;",
"_transient_{$key}",
"_transient_timeout_{$key}"
),
ARRAY_A
);
$wpdb->suppress_errors( $flag );
if ( ! empty( $result ) ) {
$transient = false;
$timeout = false;
$current_time = time();
foreach ( $result as $row ) {
switch ( $row['option_name'] ) {
case "_transient_$key" :
$transient = $row['option_value'];
break;
case "_transient_timeout_$key" :
$timeout = $row['option_value'];
break;
case 'current_time' :
$current_time = $row['option_value'];
break;
}
}
if ( false !== $transient && ! empty( $timeout ) && $timeout > $current_time ) {
return maybe_unserialize( $transient );
}
}
}
return false;
} elseif ( 'site-transient' == $group ) {
$transient = $wp_object_cache->get( "_site_transient_$key", 'options', $force );
$timeout = $wp_object_cache->get( "_site_transient_timeout_$key", 'options', $force );
if ( false !== $transient && ! empty( $timeout ) && $timeout > time() ) {
return maybe_unserialize( $transient );
}
if ( ! empty( $wpdb ) && $wpdb instanceof wpdb ) {
$table = $wpdb->options;
if ( is_multisite() ) {
$table = $wpdb->sitemeta;
}
$flag = $wpdb->suppress_errors;
$wpdb->suppress_errors( true );
$result = $wpdb->get_results(
$wpdb->prepare(
"SELECT option_name, option_value FROM `{$table}` WHERE option_name IN ( %s, %s ) UNION SELECT 'current_time', UNIX_TIMESTAMP( NOW() ) AS option_value;",
"_site_transient_{$key}",
"_site_transient_timeout_{$key}"
),
ARRAY_A
);
$wpdb->suppress_errors( $flag );
if ( ! empty( $result ) ) {
$transient = false;
$timeout = false;
$current_time = time();
foreach ( $result as $row ) {
switch ( $row['option_name'] ) {
case "_site_transient_$key" :
$transient = $row['option_value'];
break;
case "_site_transient_timeout_$key" :
$timeout = $row['option_value'];
break;
case 'current_time' :
$current_time = $row['option_value'];
break;
}
}
if ( false !== $transient && ! empty( $timeout ) && $timeout > $current_time ) {
return maybe_unserialize( $transient );
}
}
}
return false;
} else {
return $wp_object_cache->get( $key, $group, $force );
}
}
function wp_cache_init() {
global $wp_object_cache;
if ( mt_rand( 1, 100 ) == 42 ) {
wpaas_prune_transients();
}
add_action( 'muplugins_loaded', 'wpaas_init_sync_cache' );
$wp_object_cache = new APCu_Object_Cache();
}
function wp_cache_replace( $key, $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
return $wp_object_cache->replace( $key, $data, $group, $expire );
}
function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
if ( defined( 'WP_INSTALLING' ) == false ) {
if ( 'transient' == $group ) {
return wpaas_save_transient( $key, $data, $expire );
} elseif ( 'site-transient' == $group ) {
return wpaas_save_transient( $key, $data, $expire, true );
} else {
return $wp_object_cache->set( $key, $data, $group, $expire );
}
} else {
return $wp_object_cache->delete( $key, $group );
}
}
function wp_cache_switch_to_blog( $blog_id ) {
global $wp_object_cache;
return $wp_object_cache->switch_to_blog( $blog_id );
}
function wp_cache_add_global_groups( $groups ) {
global $wp_object_cache;
$wp_object_cache->add_global_groups( $groups );
}
function wp_cache_add_non_persistent_groups( $groups ) {
global $wp_object_cache;
$wp_object_cache->add_non_persistent_groups( $groups );
}
class GD_APCu_Object_Cache {
private $prefix = '';
private $local_cache = array();
private $global_groups = array();
private $non_persistent_groups = array();
private $multisite = false;
private $blog_prefix = '';
public function __construct() {
global $table_prefix;
$this->multisite = is_multisite();
$this->blog_prefix = $this->multisite ? get_current_blog_id() . ':' : '';
$this->prefix = DB_HOST . '.' . DB_NAME . '.' . $table_prefix;
}
private function get_group( $group ) {
return empty( $group ) ? 'default' : $group;
}
private function get_key( $group, $key ) {
if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) {
return $this->prefix . '.' . $group . '.' . $this->blog_prefix . ':' . $key;
} else {
return $this->prefix . '.' . $group . '.' . $key;
}
}
public function add( $key, $data, $group = 'default', $expire = 0 ) {
$group = $this->get_group( $group );
$key = $this->get_key( $group, $key );
if ( function_exists( 'wp_suspend_cache_addition' ) && wp_suspend_cache_addition() ) {
return false;
}
if ( isset( $this->local_cache[ $group ][ $key ] ) ) {
return false;
}
// FIXME: Somehow apcu_add does not return false if key already exists
if ( ! isset( $this->non_persistent_groups[ $group ] ) && apcu_exists( $key ) ) {
return false;
}
if ( is_object( $data ) ) {
$this->local_cache[ $group ][ $key ] = clone $data;
} else {
$this->local_cache[ $group ][ $key ] = $data;
}
if ( ! isset( $this->non_persistent_groups[ $group ] ) ) {
return apcu_add( $key, $data, (int) $expire );
}
return true;
}
public function add_global_groups( $groups ) {
if ( is_array( $groups ) ) {
foreach ( $groups as $group ) {
$this->global_groups[ $group ] = true;
}
} else {
$this->global_groups[ $groups ] = true;
}
}
public function add_non_persistent_groups( $groups ) {
if ( is_array( $groups ) ) {
foreach ( $groups as $group ) {
$this->non_persistent_groups[ $group ] = true;
}
} else {
$this->non_persistent_groups[ $groups ] = true;
}
}
public function decr( $key, $offset = 1, $group = 'default' ) {
if ( $offset < 0 ) {
return $this->incr( $key, abs( $offset ), $group );
}
$group = $this->get_group( $group );
$key = $this->get_key( $group, $key );
if ( isset( $this->local_cache[ $group ][ $key ] ) && $this->local_cache[ $group ][ $key ] - $offset >= 0 ) {
$this->local_cache[ $group ][ $key ] -= $offset;
} else {
$this->local_cache[ $group ][ $key ] = 0;
}
if ( isset( $this->non_persistent_groups[ $group ] ) ) {
return $this->local_cache[ $group ][ $key ];
} else {
$value = apcu_dec( $key, $offset );
if ( $value < 0 ) {
apcu_store( $key, 0 );
return 0;
}
return $value;
}
}
public function delete( $key, $group = 'default', $force = false ) {
$group = $this->get_group( $group );
$key = $this->get_key( $group, $key );
unset( $this->local_cache[ $group ][ $key ] );
if ( ! isset( $this->non_persistent_groups[ $group ] ) ) {
return apcu_delete( $key );
}
return true;
}
public function flush() {
$this->local_cache = array();
// TODO: only clear our own entries
apcu_clear_cache();
return true;
}
public function get( $key, $group = 'default', $force = false, &$found = null ) {
$group = $this->get_group( $group );
$key = $this->get_key( $group, $key );
if ( ! $force && isset( $this->local_cache[ $group ][ $key ] ) ) {
$found = true;
if ( is_object( $this->local_cache[ $group ][ $key ] ) ) {
return clone $this->local_cache[ $group ][ $key ];
} else {
return $this->local_cache[ $group ][ $key ];
}
} elseif ( isset( $this->non_persistent_groups[ $group ] ) ) {
$found = false;
return false;
} else {
$value = @apcu_fetch( $key, $found );
if ( $found ) {
if ( $force ) {
$this->local_cache[ $group ][ $key ] = $value;
}
return $value;
} else {
return false;
}
}
}
public function incr2( $key, $offset = 1, $group = 'default' ) {
if ( $offset < 0 ) {
return $this->decr( $key, abs( $offset ), $group );
}
$group = $this->get_group( $group );
$key = $this->get_key( $group, $key );
if ( isset( $this->local_cache[ $group ][ $key ] ) && $this->local_cache[ $group ][ $key ] + $offset >= 0 ) {
$this->local_cache[ $group ][ $key ] += $offset;
} else {
$this->local_cache[ $group ][ $key ] = 0;
}
if ( isset( $this->non_persistent_groups[ $group ] ) ) {
return $this->local_cache[ $group ][ $key ];
} else if ( function_exists( 'apcu_inc' ) ) {
$value = apcu_inc( $key, $offset );
if ( $value < 0 ) {
apcu_store( $key, 0 );
return 0;
}
return $value;
}
return false;
}
public function replace( $key, $data, $group = 'default', $expire = 0 ) {
$group = $this->get_group( $group );
$key = $this->get_key( $group, $key );
if ( isset( $this->non_persistent_groups[ $group ] ) ) {
if ( ! isset( $this->local_cache[ $group ][ $key ] ) ) {
return false;
}
} else {
if ( ! isset( $this->local_cache[ $group ][ $key ] ) && ! apcu_exists( $key ) ) {
return false;
}
apcu_store( $key, $data, (int) $expire );
}
if ( is_object( $data ) ) {
$this->local_cache[ $group ][ $key ] = clone $data;
} else {
$this->local_cache[ $group ][ $key ] = $data;
}
return true;
}
public function reset() {
// This function is deprecated as of WordPress 3.5
// Be safe and flush the cache if this function is still used
$this->flush();
}
public function set( $key, $data, $group = 'default', $expire = 0 ) {
$group = $this->get_group( $group );
$key = $this->get_key( $group, $key );
if ( is_object( $data ) ) {
$this->local_cache[ $group ][ $key ] = clone $data;
} else {
$this->local_cache[ $group ][ $key ] = $data;
}
if ( ! isset( $this->non_persistent_groups[ $group ] ) ) {
return apcu_store( $key, $data, (int) $expire );
}
return true;
}
public function stats() {
// Only implemented because the default cache class provides this.
// This method is never called.
echo '';
}
public function switch_to_blog( $blog_id ) {
$this->blog_prefix = $this->multisite ? $blog_id . ':' : '';
}
}
if ( function_exists( 'apcu_inc' ) ) {
class APCu_Object_Cache extends GD_APCu_Object_Cache {
function incr( $key, $offset = 1, $group = 'default' ) {
return parent::incr2( $key, $offset, $group );
}
}
} else {
class APCu_Object_Cache extends GD_APCu_Object_Cache {
// Blank
}
}
endif;
Warning: Cannot modify header information - headers already sent by (output started at /usr/hosting/oldpics.net/html/wp-content/object-cache.php:1) in /usr/hosting/oldpics.net/html/wp-includes/rest-api/class-wp-rest-server.php on line 1713
Warning: Cannot modify header information - headers already sent by (output started at /usr/hosting/oldpics.net/html/wp-content/object-cache.php:1) in /usr/hosting/oldpics.net/html/wp-includes/rest-api/class-wp-rest-server.php on line 1713
Warning: Cannot modify header information - headers already sent by (output started at /usr/hosting/oldpics.net/html/wp-content/object-cache.php:1) in /usr/hosting/oldpics.net/html/wp-includes/rest-api/class-wp-rest-server.php on line 1713
Warning: Cannot modify header information - headers already sent by (output started at /usr/hosting/oldpics.net/html/wp-content/object-cache.php:1) in /usr/hosting/oldpics.net/html/wp-includes/rest-api/class-wp-rest-server.php on line 1713
Warning: Cannot modify header information - headers already sent by (output started at /usr/hosting/oldpics.net/html/wp-content/object-cache.php:1) in /usr/hosting/oldpics.net/html/wp-includes/rest-api/class-wp-rest-server.php on line 1713
Warning: Cannot modify header information - headers already sent by (output started at /usr/hosting/oldpics.net/html/wp-content/object-cache.php:1) in /usr/hosting/oldpics.net/html/wp-includes/rest-api/class-wp-rest-server.php on line 1713
Warning: Cannot modify header information - headers already sent by (output started at /usr/hosting/oldpics.net/html/wp-content/object-cache.php:1) in /usr/hosting/oldpics.net/html/wp-includes/rest-api/class-wp-rest-server.php on line 1713
Warning: Cannot modify header information - headers already sent by (output started at /usr/hosting/oldpics.net/html/wp-content/object-cache.php:1) in /usr/hosting/oldpics.net/html/wp-includes/rest-api/class-wp-rest-server.php on line 1713
{"id":3695,"date":"2020-06-17T05:56:43","date_gmt":"2020-06-17T12:56:43","guid":{"rendered":"https:\/\/oldpics.net\/?p=3695"},"modified":"2020-09-24T17:49:38","modified_gmt":"2020-09-24T15:49:38","slug":"100-most-important-pictures-in-history","status":"publish","type":"post","link":"https:\/\/oldpics.net\/100-most-important-pictures-in-history\/","title":{"rendered":"100 most important pictures in history"},"content":{"rendered":"\n
These historical photos reflect the most important moments of humanity. In 2016, Time magazine created a project aimed to gather 100 most influential photos ever, printed as a book “100 Photographs: The Most Influential Images of All Time”. <\/span><\/p>\n But how can you pick the most valuable historical photos among the thousands and thousands of excellent and noteworthy pictures? The editorial team surveyed many opinion leaders, history, and photo specialists to create a great and inspiring list. Depicted things and events are important because they affect our lives a lot.<\/span><\/p>\n Ben Goldberger, Paul Moakley, and Kira Pollack, <\/span><\/i>responsible for the list formation, noted that photography is the long-lasting evidence of the past, and they should be taken, shared, and free to access. All of these historical photos deliver the atmosphere and spirit of old times.<\/span><\/p>\n The first picture in the list was taken in 1826, last – in 2015. One hundred eighty-nine years of human history, joyful and tragic, are assembled to show our story from the camera objective.<\/span><\/p>\n Oldpics.net<\/span> decided to enrich many of the stories behind the historical photos in this list, adding interesting facts or even dedicated publications to the fascinating images.<\/span><\/p>\n <\/p>\n To create the first photo, <\/span>Joseph Nic\u00e9phore Ni\u00e9pce used camera obscura – a “dark chamber” combined with lithography printing to catch the sunlight illuminating the view outside his window. His first camera allowed him to depict and print images – Ni\u00e9pce spends a lot of time searching for suitable photosensitive substances (silver-containing liquids, lavender oil, etc.) and printing surfaces (pewter, paper, tissue) and calls the process “heliography.” Joseph Nic\u00e9phore Ni\u00e9pce was not gifted as a painter, but he indeed was a great inventor. Trying to catch the real image of the surrounding world without hand-painting, he created many pre-photos, and the one above, printed on the bitum, survived till now, becoming the precursor of the era of photography. In the next years, on the base of Ni\u00e9pce’s invention, Louis Daguerre built the daguerreotype – another milestone of photography evolution. The photo history has been started!<\/span><\/p>\n <\/p>\n Joseph Nic\u00e9phore Ni\u00e9pce, in tandem with Louis Daguerre, resulted in the improvement of heliography and the creation of a much faster and convenient depicting method – the daguerreotype. While heliograph gave poor images of outside exposition and mainly was used to reproduce pictures and paintings, daguerreotype allowed more explicit photos. This method was used to make the first photographic image of a human being. A sunny spring day on Paris’ Boulevard du Temple, where a random shoe shiner polished his customer’s footwear, was captured by Louis Daguerre and was saved in the annals of history. This technique rapidly spread worldwide, and in 1840 the firth photo atelier was opened in New Your. Daguerreotypy remained popular over the decade. Nowadays, it is rarely used as a kind of art, and this photo is just a part of photography history.<\/span><\/p>\n <\/p>\n A full story about this historical photo<\/a><\/p>\n British photographer Roger Fenton made the “first iconic photograph of war” in 1855 during\u00a0 Crimean War as a part of international territorial conflict. The name of the photo refers to the King James Version of David Psalm “Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me,” due to which Alfred Tennyson used it as the illustration to the poem “The Charge of the Light Brigade” devoted to the incident of British army attack in the battle on the nearby location.<\/span><\/p>\n Roger Fenton was not only the first war photographer – but he also was the first one who took part in the Great Exhibition of the Works of Industry of All Nations with the history photo images.<\/span><\/p>\n The land covered with cannonballs became the symbol of the war, but Fenton’s pictures during his visit to Crimea underwent the author’s criticism. There are no dead bodies, only landscapes to please the British public, including the Royal Family.<\/span><\/p>\n Interesting fact:<\/strong> Roger Fenton made numerous portraits of the Crimean War’s combatants but none combat pictures for one simple reason. His first camera required several-hours of exposure for a decent image, which is not possible during the actual battle.<\/span><\/p>\n <\/p>\n At the moment of taking this photo, Lincoln was not a well-known person. A little bit later, he will make one of his greatest speeches at the Cooper Union and enter the USA’s history. Photographer Mathew B. Brady was already making portraits of famous people, but this portrait made the person famous – it was one of the first photos used in propaganda. During his career, Lincoln many times returned to Brady for new images. As Lincoln later admitted, “Brady and the Cooper Union speech made me President of the United States.”\u00a0<\/span><\/p>\n When admiring Lincoln’s success, such persons as Brady stay in the shadows. Anyway, his contribution to the documenting of the Civil war is one of the largest, that’s why he is known as the father of photojournalism.\u00a0<\/span><\/p>\n If you see the 19th-century photos where people lean on the high table or stand to keep the posture, Brady was the designer of the first one because this piece of furniture\u00a0 is called “Bready stand.”<\/span><\/p>\n <\/p>\n A full story about this photo<\/a><\/p>\n Yosemite National Park is one of the most beautiful places on the Earth, and since 1864 it is protected by the law, thanks to President Abraham Lincoln. The set of 130 historical photos, made by Carleton Watkins during his visit to this fantastic mountain range. Park was already used as a resort, and these photos were bought by Senator John Conness, who started the protection campaign of the area. Thankfully to this preservation bill, we have the opportunity to see the Yosemite nature as it was centuries ago.<\/span><\/p>\n Yosemite was Watkins’ favorite objects, and he did a lot for its popularisation. Even now, his photos are attractive and inspiring to visit Yosemite, and this environmental-friendly tendency also supported the Yosemite Grant. In regard, one of Yosemite’s peaks was named Mount Watkins.<\/span><\/p>\n Interesting fact: <\/b>Carleton Watkins was a talented photographer and a no-good businessman. He didn’t bother about any copyright protection and lost the rights on his photos several times. The ‘Cathedral Rock’ was among other images that were stolen and published by other photographers.<\/span><\/p>\n Alexander Gardner, the employee of Matthew Brady, was the person who delivered the horror of the Civil War to the general public. The exhibition of almost a hundred photos from the Antietam battlefield, Sharpsburg, Md. was the first time dead bodies appeared in the picture. The notable feature of these photos was the method they were taken.\u00a0 Alexander Gardner and his assistant James Gibson used a new device – stereograph, to capture the moment with a 3d effect. Among 95 photos, 70 were stereo images. The copies of these photographs spread through America and the originals were put on display at Brady’s gallery.<\/span><\/p>\n Papers described these horrifying photoshoots as evidence of the massive death of more than half a million people during 1865\u2014fields covered with unburied bodies, results of the arbitrariness of warring armies. Gardner nailed the horrors of Civil war with his combat historical photos.<\/span><\/p>\n <\/p>\n An experimental photo set of\u00a0 Eadweard Muybridge demonstrating the horse movement during running was an ambitious large scale project. It all started from a dispute between the governor of California, Leland Stanford, who claimed that horses during gallop became airborne, and his opponent claimed that at least one leg touched the ground.<\/span><\/p>\n There is no chance to catch this moment by the naked eye, as well as by a single photo. So, the government-sponsored the construction of a whole “photo dome” – a long white wall and 12 cabins with cameras. Black horses (for maximum contrast) run a wooden track, alternately triggering cameras and capturing all horse running phases. As a result, Muybridge received 12 shots, and among them were those who recorded the moments when all four legs of the horse were in the air. Animation history starts with this picture.<\/span><\/p>\n Lately, he repeated this experiment with 24 cameras and created the first animation in his “zoopraxiscope,” which pushed animation and cinema development.<\/span><\/p>\n <\/p>\n The end of the 19th century in New York City is called the “Progressive era” – fast growth of the industry, an increase of the population, enlargement of the city line. But this growth had its price. The dream attracted him. A lot of people left for the Big Apple and faced poverty and need. This side of future metropolis life was on the blind spot of society, and Jacob August Riis uncovered the life of poor people in his book “How the Other Half Lives: Studies among the Tenements of New York.” One of the most capturing photos is Bandit’s Roost 59\u00bd Mulberry Street showing the criminal environment’s reality in the slums of the Lower East Side. He captured unknown heroes of the criminal history in one sharp photo.<\/span><\/p>\n This work created a basement for a new branch of journalism – “muckraking,” connected brave reporters who unveiled a dirty truth of life.\u00a0<\/span><\/p>\n During the work on the book, Riis was one of the pioneers of flash photography and obtained the ability to take photos in the nighttime.<\/span><\/p>\n <\/p>\n The first published X-ray image demonstrates Anna Bertha R\u00f6ntgen, wife of first Nobel laureate Wilhelm Conrad R\u00f6entgen. Before proved evidence of X-ray harmful effect, R\u00f6entgen images were entertainment and were taken commonly just for fun. Anna was probably the first person Wilhelm told about his great invention, and a few years later, it was widely used for medical purposes. Like many great inventions, this one was made by an accident when R\u00f6entgen worked late and found that non-visible rays emitted from Lenard’s tubes can affect the paper covered with barium platinocyanide. Here’s how this photo began a new chapter in medical history. It took seven weeks to study the newly discovered emission, which R\u00f6entgen called X-rays.<\/span><\/p>\n It is hard to underestimate the meaning of this invention to humanity. While R\u00f6entgen refused to patent his results, this method’s availability raised medical diagnostics and treatment on the new level.<\/span><\/p>\n <\/p>\n The Pond\u2014Moonlight is the most expensive photo ever – it was sold for almost $3 million. For making this photo in 3 examples, Edward Steichen used the gum printing technique. The adding gum dichromate layers to the black-and-white images created a tender picture, the most famous Pictorialist masterpiece. For this movement, photography was instead the piece of art, then just the record of reality, so many pictorialist creations have visible manipulations. In this particular photo, the Moon was added. The movement was popular until new photo techniques with more sharp focus became available, but it influenced the development of photography a lot. The main statement of pictorialism in general and Edward Steichen as an influencer personality was that processing the photo is the same as looking for the scape to capture.<\/span><\/p>\n This picture also is in the list of the TOP 10 most expensive photos<\/a><\/p>\n <\/p>\n The late story of Native Americans is full of sorrow. Whole tribes were erased, evicted in reservations; almost the entire culture stratum was lost. Edward S. Curtis cared about this incident and tried to document as many aspects of Native American’s life as possible. His heritage in 20 volumes of The North American Indian published during\u00a0 1907\u20131930 was highly praised.<\/span><\/p>\n The attraction of attention to the Native Americans was aimed to improve their status, but it imprinted the cliche of the “vanishing Indian.” This character became a symbol of anachronism, noble savage, and was used to lure tourists. Lately, Edward S. Curtis was criticized for staging his photos and making the image of Indians from a subjective point of view. Anyway, his collection of music and language samples on wax cylinders, the number of photo materials have ethnographic value.\u00a0<\/span><\/p>\n The Vanishing Race image is a signifier of the whole race’s unknown future, symbolizing dark times and a hard road to survive.<\/span><\/p>\n <\/p>\n A full story about this historical photo<\/a><\/p>\n Alfred Stieglitz founded the Photo-Secession to promote photography as a form of art in 1902 and became its ambassador. The most notable photo of Alfred Stieglitz depicted workers’ arrival in the lower class of the ship. The Steerage became an icon in photography: it is unique due to its documentary value and, at the same time, is a piece of modernism.<\/span><\/p>\n This scene marked a new photography feature – to be an independent form of art, not the way to substitute the painting.\u00a0 Lately, Alfred Stieglitz wrote, “I saw shapes related to each other. I was inspired by a picture of shapes and underlying that the feeling I had about life”, describing this moment, and Picasso admitted that “This photographer is working in the same spirit as I am” when he saw The Steerage, which delivered the atmosphere of that time.<\/span><\/p>\n Interesting fact: <\/b>Alfred Stieglitz was a wealthy man, and he traveled with a first-class during ‘The Steerage’ voyage. While he was exploring ‘the screaming social inequality on the ship,’ a sailor-guard escorted him.<\/span><\/p>\n <\/p>\n Child labor was common in the early 1900s, even being considered immoral. Many manufacturers hid that they use child labor. The newly founded National Child Labor Committee started the campaign against child labor and invited Lewis Hine as a photo reporter. Next ten years, he made thousands of photos of little boys and girls under 16 involved in manufacture with low payment.<\/span><\/p>\n His ability to sneak into the most closed factories and mines made him one of the most famous muckrakers. He pretended to be an inspector, vendor,\u00a0 industrial photographer, faced the violence, risking his health to take photos of child labor conditions. Being a documentary photographer, Hine didn’t use any photo editing to show the real picture, and his shots become a great example of influential photography.<\/span><\/p>\n Historical photos, like one above, where little Sadie Pfeifer operates a cotton-\u00adspinning machine, helped protect youngsters’ rights and fight against child labor.<\/span><\/p>\n <\/p>\n Paul Strand was the first one who started to take street historical photos. He moved aside from posture portraits to unrehearsed peoples’ depiction. His city street portraits imagine random people, mostly immigrants. Like the blind woman who was selling newspapers, models didn’t realize that the artist took pictures of them. Strand’s goal was to capture real expression without posing. So he used a trick – a false lens pointed the other direction than an actual photo lense. He was close enough to other modernist photographers, and this photo was published in Alfred Stieglitz’s magazine Camera Work and thus became a part of history. Strand’s portraits marked another tendency – a humanistic documentary.<\/span><\/p>\n <\/p>\n A full story about this historical photo<\/a><\/p>\n August Sander is famous for his attempt to document German people’s lives in his “People of the 20th Century” portrait series. At first, photography was his hobby, but soon he opened his photo studio in Cologne. Under the influence of his friends from Neue Sachlichkeit, or New Objectivity movement, he started an ambitious project –\u00a0 series of German people portraits of different social strata. In his photo, he marked the surrounding and professional peculiarities of each person. The Bricklayer is one of the most well-known due to the sharp historical photos and very modern exposition. The project’s goal was to show the connection between appearance and profession on one side and all people’s likeness on another. As a result, now we have an almost encyclopedic gathering of German people typology, which made August Sander a remarkable and influential figure of the 20th century.<\/span><\/p>\n Interesting fact: <\/b>August Sander photographed only Germans for his “People of the 20th Century” series. Does it mean that he shared the nazi race superiority concepts? No, he never admitted that. Moreover, his son died in a concentration camp for his Socialistic party membership.<\/span><\/p>\n <\/p>\n A full story about this historical photo<\/a><\/p>\n Politics is a public arena, but most crucial and essential occasions often take place in couloirs. Erich Salomon uncovered to broad mass how the fate of countries is decided. His photos from negotiations in the Hague, 1930 made a sensation – the first time the backstage of politics was documented. 2 a.m., tired out after a long day Ministers, surrounded by smoke and empty glasses, didn’t notice Solomon with a small camera. During his career, he created many methods to hide cameras in hats, cases, and books; he used the newest light-sensible devices to make quality photos of famous people in an informal atmosphere. His pictures brought his fame all over Europe and the USA and started a new trend of photojournalism. Solomon captured the critical moments of European states with his historical photos.<\/span><\/p>\n Interesting fact: <\/b>Erich Salomon acted as a paparazzi. None of these politics expected him to take this photo at 2 a.m.<\/span><\/p>\n <\/p>\n A full story of this photo<\/a><\/p>\n Henri Cartier-Bresson is one one the pioneers of street photography. His images are remarkable for capturing “a decisive moment” – a moment of the most significant emotional tension and impressive visual sense. As he described, \u00abinstant recognition, in a split second, of the significance of what is happening and at the same time precise organization of forms, which give this event expression corresponding to it.\u00bb Due to such an attitude for timing, the whole modern trend formed – to catch the right moment.<\/span><\/p>\n Cartier-Bresson himself was a remarkable figure of the 20th century in the photography sphere who started many traditions. The interesting one is to check the lens features by taking photos of ducks in the nearest park or to take spontaneous pictures on the streets.<\/span><\/p>\n Interesting fact: <\/b>Henri Cartier-Bresson used to say that ‘Behind the Gare Saint-Lazare’ image was unstaged. You should have a leprechaun luck to capture a moment of this kind with camera capabilities of the mid-30s.<\/span><\/p>\n <\/p>\n Photo of the workers’ lunch during Rockefeller Center construction became one of the symbols of New York City. At the times of the Great Depression, this photo stated the strength and hardness of workers. Many rumors and mysteries are surrounding this photo: the author is unknown despite efforts of private detectives to find him; the personalities of only two workers are identified, the only information that they mostly were immigrants; there is no evidence was this photoshoot dangerous or there was some protection from falling from the height of 840 feet and so on. The photo was taken on the 69th floor; the real workers are depicted in comfy positions as they did it every day. Even knowing that the set was staged as a publicity campaign of the complex, it is still iconic and claimed as the most sold photo from the Corbis photo agency.\u00a0 Here’s how this image became one of the best-known historical photos.<\/span><\/p>\n <\/p>\n A full story about this photo<\/a><\/p>\n Harlem Renaissance raised African-American culture despite racial segregation and intolerance against people of color, and James VanDerZee was its chronicler. He mostly portrayed the life of middle-class black people on different occasions and created a stack of documentary photos of this social layer. Also, he made images of Harlem Renaissance iconic figures –\u00a0 Marcus Garvey, Bill “Bojangles” Robinson, and Countee Cullen.\u00a0\u00a0<\/span><\/p>\n He tried to overcome the stigmatized vision of black people, formed at those times by taking stylish and beautiful pictures full of pride and honor in his studio and outside. Nowadays, his works are held in many museums and exhibitions and are used to illustrate the modern vision of victorian portrait traditions – very staged, plenty retouched, quite idealized. One of these historical photos, where a young African-American couple posing with the car in fancy raccoon coats, is considered VanDerZee’s most famous masterpiece.<\/span><\/p>\n <\/p>\n Mythical creatures appeared in folklore during humanity’s whole history, but The Loch Ness Monster was the first one, captured on photo. The “surgeon’s photo,” attributed authorship by Robert\u00a0 Wilson, demonstrated the head and the neck of Nessie – for sixty years served as a proof of monsters’ existence. Even after it was considered a hoax, it is still used by conspiracy theorists.<\/span><\/p>\n While mystifications were popular since the rise of photography, and it wasn’t something new, people wanted to believe that the depicted monster is real. One single photo has launched extensive scientific research of the lake and attracted tourists to the Loch Ness. The commercialization of the Loch Ness Monster’s image affected life in the region and became a reason and basement for further mystifications.<\/span><\/p>\n <\/p>\n Powerful propaganda was one of the reliance of the Nazi regime in Germany. To use this tool in politics, Hitler needed dramatic visual materials. Heinrich Hoffmann, Hitler’s official photographer, provided such historical photos on an industrial scale. Through his talent, he demonstrated fuhrer as the atlas of the German nation, a mighty ruler, bringing pride,\u00a0 glory, and wellness to people. Triumph of the Will and beautiful Hoffmann’s photos made during the 1934 Nazi Party Congress, was used for the next decades to keep the public’s attention to the positive sides of the Nazi regime. This image is an iconic example of how professional photography can make whole masses adore and believe in a terrific ideology\u2014the tipping point of human history in a single photo.<\/span><\/p>\n <\/p>\n A full story about this photo<\/a><\/p>\n The migrant mother delivers the spirit of the Great Depression-era – desperate woman holding her children in Nipomo camp. Only after 40 years, the person’s identity was established; she was the mother of 6, Florence Owens Thompson. This photo had a very pronounced impact on the situation in the camp, where pea-pickers found shelter. After publication, authorities sent food, but Thompson’s family was already far away in their search for a job.<\/span><\/p>\n The story behind the photo is controversial – the Lange version differs from the memories of one of Thompson’s sons, but it had a continuation. In 1983, at the age of 80, Florence was hospitalized, and her fame as the\u00a0 Migrant Mother helped her family deal with medical bills.<\/span><\/p>\n As for Lange, the Migrant Mother brought her fame and recognition, and the photo itself became a part of photography history.<\/span><\/p>\n <\/p>\n A full story about this historical photo\u00a0<\/strong><\/a><\/p>\n The Falling Soldier photograph caused many authenticity debates due to the differences in the actual location and place described by Robert Capa, how the soldier dies (from the single bullet or machine-gun fire), was it staged, and many other photos from the Spanish Civil War period. Cappa claimed that it was taken blindfolded, and accidentally, many critics and journalists investigated its story and incriminated Cappa in staging. The theory that his historical photos were pre-staged and a soldier died because of it appeared.\u00a0 Nevertheless, was it staged or candid, this photo is one of the most recognizable war photographs. The moment of milicianos death, captured by Robert Capa, was widely spread by newspapers and magazines, such as <\/span>Vu<\/span><\/i> and LIFE, but the print itself is unique. In 2007, when the “Mexican Suitcase” with most of Cappa’s negatives became public, The Falling Soldier negative wasn’t there.<\/span><\/p>\n <\/p>\nHow these historical photos were selected?<\/h3>\n
All these historical photos are shown in chronological order, starting with the oldest ones, as we avoid ranking.<\/h3>\n
`1. View from the Window at Le Gras, Joseph Nic\u00e9phore Ni\u00e9pce, 1826.<\/strong><\/h3>\n
2. Boulevard du Temple, Louis Daguerre, 1839.<\/strong><\/h3>\n
3. The Valley of the Shadow of Death, Roger Fenton, 1855.<\/strong><\/h3>\n
4. Abraham Lincoln, Mathew B. Brady, 1860.<\/strong><\/h3>\n
5. Cathedral Rock, Yosemite, Carleton Watkins, 1861.<\/strong><\/h3>\n
<\/h3>\n
6. The Dead of Antietam, Alexander Gardner, 1862.<\/strong><\/h3>\n
7. The Horse in Motion, Eadweard Muybridge, 1878.<\/strong><\/h3>\n
8. Bandit’s Roost, 59\u00bd Mulberry Street, Jacob Riis, 1888.<\/strong><\/h3>\n
9. The Hand of Mrs. Wilhelm R\u00f6ntgen, Wilhelm Conrad R\u00f6ntgen, 1895.<\/strong><\/h3>\n
10. Moonlight: The Pond, Edward Steichen, 1904.<\/strong><\/h3>\n
11. The Vanishing Race, Edward S. Curtis, 1904.<\/strong><\/h3>\n
`12. The Steerage, Alfred Stieglitz, 1907.<\/strong><\/h3>\n
13. Cotton Mill Girl, Lewis Hine, 1908.<\/strong><\/h3>\n
14. Blind, Paul Strand, 1916.<\/strong><\/h3>\n
15. Bricklayer, August Sander,1928.<\/strong><\/h3>\n
16. The Hague, Erich Salomon, 1930.<\/strong><\/h3>\n
17. Behind the Gare Saint-Lazare, Henri Cartier-Bresson, 1932.<\/strong><\/h3>\n
18. Lunch Atop a Skyscraper, Unknown, 1932.<\/strong><\/h3>\n
19. Couple in Raccoon Coats, James VanDerZee, 1932.<\/strong><\/h3>\n
20. The Loch Ness Monster, Unknown, 1934.<\/strong><\/h3>\n
21. Hitler at a Nazi Party Rally, Heinrich Hoffmann, 1934.<\/strong><\/h3>\n
22. Migrant Mother, Dorothea Lange, 1936.<\/strong><\/h3>\n
Interesting fact: <\/b>Florence Owens Thompson wasn’t a migrant at all. She was a Cherokee, Oklahoma-born. It seems that Dorothea Lange gave this photo name by mistake.<\/span><\/h4>\n
23. The Falling Soldier, Robert Capa, 1936.<\/strong><\/h3>\n
24. Fort Peck Dam, Margaret Bourke-White, 1936.<\/strong><\/h3>\n