Title: Undefined offset: 1 (Cache_Memcached.php:74)
Last modified: March 19, 2019

---

# Undefined offset: 1 (Cache_Memcached.php:74)

 *  Resolved [c0ns0l3](https://wordpress.org/support/users/c0ns0l3/)
 * (@c0ns0l3)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/undefined-offset-1-cache_memcached-php74/)
 * Hello, at my hosting server for memcached is use linux socket.. server address
   like “/home/[user_account]/.system/memcache/socket”
 * Query monitor say that at line 74 error of file Cache_Memcached.php
 *     ```
       foreach ( (array)$config['servers'] as $server ) {
       			if ( substr( $server, 0, 5 ) == 'unix:' )
       				$this->_memcache->addServer( trim( $server ), 0 );
       			else {
       				list( $ip, $port ) = explode( ':', $server );
       				$this->_memcache->addServer( trim( $ip ), (integer) trim( $port ) );
       			}
       		}
       ```
   
 * 74 line is eplode server address string which want to have a port number…
 * can u add expression strpos ‘:’?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/undefined-offset-1-cache_memcached-php74/#post-11332296)
 * Hello,
    You can use: unix:/home/[user_account]/.system/memcache/socket for that
   case. Your pasted block clarifies that.
 *  Thread Starter [c0ns0l3](https://wordpress.org/support/users/c0ns0l3/)
 * (@c0ns0l3)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/undefined-offset-1-cache_memcached-php74/#post-11333800)
 * Marko thx alot, but after i saw code.. i try it.. but test is failed
    just simple
   expression on strpos ‘:’.. if false then all string is server address…
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/undefined-offset-1-cache_memcached-php74/#post-11335875)
 * Hello,
    Thanks for the information and for bringing this to our attention. We
   added this as an issue and we’ll fix this in future releases.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Undefined offset: 1 (Cache_Memcached.php:74)’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/undefined-offset-1-cache_memcached-php74/#post-11335875)
 * Status: resolved