Title: PHP 8 throws a warning: Undefined array key &#8220;REMOTE_ADDR&#8221;
Last modified: March 29, 2023

---

# PHP 8 throws a warning: Undefined array key “REMOTE_ADDR”

 *  Resolved [JF::IA](https://wordpress.org/support/users/jfacemyer/)
 * (@jfacemyer)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-8-throws-a-warning-undefined-array-key-remote_addr/)
 * AFter moving to PHP 8, I’m getting this warning:
 *     ```wp-block-code
       PHP Warning: Undefined array key "REMOTE_ADDR" in wp-content/plugins/wp-photo-album-plus/wppa-session.php on line 21
       ```
   

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

 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-8-throws-a-warning-undefined-array-key-remote_addr/#post-16613269)
 * Will be fixed in the next version
 *  Thread Starter [JF::IA](https://wordpress.org/support/users/jfacemyer/)
 * (@jfacemyer)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-8-throws-a-warning-undefined-array-key-remote_addr/#post-16614889)
 * Thank you!
 * Any idea when that might be? I’m getting lots of notices in logs…
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-8-throws-a-warning-undefined-array-key-remote_addr/#post-16615164)
 * Released today. Version 8.3.06.003
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-8-throws-a-warning-undefined-array-key-remote_addr/#post-16618239)
 * Is it fixed now or do you get the same message from a different location?
 * BTW: This is not related to PHP 8, but to the server configuration.
    What else
   did you do besides upgrading PHP version?
 *  Thread Starter [JF::IA](https://wordpress.org/support/users/jfacemyer/)
 * (@jfacemyer)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-8-throws-a-warning-undefined-array-key-remote_addr/#post-16636145)
 * Thanks for following up.
 * I limited messages, so had to wait for the job to run again with that site when
   it would send me a message.
 * Looks like same thing on line 20 and 125 now.
 *     ```wp-block-code
       Warning: Undefined array key "REMOTE_ADDR" in /wp-content/plugins/wp-photo-album-plus/wppa-users.php on line 125
       PHP Warning:  Undefined array key "REMOTE_ADDR" in /wp-content/plugins/wp-photo-album-plus/wppa-wpdb-insert.php on line 20
       ```
   
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-8-throws-a-warning-undefined-array-key-remote_addr/#post-16638313)
 * Pls do the following:
 * Download and install:
    [https://downloads.wordpress.org/plugin/wp-photo-album-plus.8.3.07.002.zip](https://downloads.wordpress.org/plugin/wp-photo-album-plus.8.3.07.002.zip)
   as described here: [https://wppa.nl/docs-by-subject/development-version/](https://wppa.nl/docs-by-subject/development-version/)
   This is a pre-release of the next version. It should fix your issue.
 * The fact that `$_SERVER('REMOTE_ADDR')` does not hold the visitors ip address
   is rather unusual, and is not related to php ver 8 as such, so i would like you
   to do a small test for me:
 * Temporarely activate the (classic) widget **WPPA+ Stats** and tick at least the
   box: **Show IP address**, and tell me if it displayes your ip address or that
   it says **n.a.**
 *  Thread Starter [JF::IA](https://wordpress.org/support/users/jfacemyer/)
 * (@jfacemyer)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-8-throws-a-warning-undefined-array-key-remote_addr/#post-16676508)
 * I just updated to the latest public version and it looks like the issue is resolved!
   Thank you!

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

The topic ‘PHP 8 throws a warning: Undefined array key “REMOTE_ADDR”’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-photo-album-plus.svg)
 * [WP Photo Album Plus](https://wordpress.org/plugins/wp-photo-album-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-photo-album-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-photo-album-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-photo-album-plus/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [JF::IA](https://wordpress.org/support/users/jfacemyer/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/php-8-throws-a-warning-undefined-array-key-remote_addr/#post-16676508)
 * Status: resolved