Title: andyldex's Replies | WordPress.org

---

# andyldex

  [  ](https://wordpress.org/support/users/andyldex/)

 *   [Profile](https://wordpress.org/support/users/andyldex/)
 *   [Topics Started](https://wordpress.org/support/users/andyldex/topics/)
 *   [Replies Created](https://wordpress.org/support/users/andyldex/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/andyldex/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/andyldex/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/andyldex/engagements/)
 *   [Favorites](https://wordpress.org/support/users/andyldex/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Problems with DOMAIN_CURRENT_SITE value](https://wordpress.org/support/topic/problems-with-domain_current_site-value/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/problems-with-domain_current_site-value/#post-12153896)
 * Thanks for the replies both. I may just leave the installation as is, it does
   have one benefit that using the plugin for domain mapping means that the original
   site will forward automatically onto the custom domain which in our installation
   is useful. We could obviously achieve this by other means, but as is its convenient
   and works.
    If we wanted to remove the plugin and use native mapping would we
   really have to get rid of the old installation, I don’t see why I cannot just
   remove the plugin and update the wp-config.php if I my installation is using 
   an up to date WordPress version,
 * thanks, Andy.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Problems with DOMAIN_CURRENT_SITE value](https://wordpress.org/support/topic/problems-with-domain_current_site-value/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/problems-with-domain_current_site-value/#post-12151567)
 * Hi,
 *  yes its a very old, pre WordPress 3.0 site. I wasn’t aware there was now a native
   way to have alternate domains, what is this called (WRT finding the relevant 
   documentation)?
 * thanks, Andy.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Problems with DOMAIN_CURRENT_SITE value](https://wordpress.org/support/topic/problems-with-domain_current_site-value/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/problems-with-domain_current_site-value/#post-12150446)
 * Hi,
 *  here is what I understand you wanted to see from wp-config
 *     ```
       define( 'MULTISITE', true );
       define( 'SUBDOMAIN_INSTALL', true );
       $base = '/';
       define( 'DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST'] );
       define( 'PATH_CURRENT_SITE', '/' );
       define( 'SITE_ID_CURRENT_SITE', 1 );
       define( 'BLOG_ID_CURRENT_SITE', 1 );
       define( 'SUNRISE', 'on' );
       ```
   
 * thanks, Andy.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Problems with DOMAIN_CURRENT_SITE value](https://wordpress.org/support/topic/problems-with-domain_current_site-value/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problems-with-domain_current_site-value/#post-12131191)
 * Hi,
 *  thanks for both replies. As I understand it I already have the correct configuration,
   but the end result is this issue with too many redirects. I have solved this 
   in the end in Nginx by adding this configuration:
 *     ```
       if ($blogid = 0) {
         return 301 https://mymaindomain.com;
       }
       ```
   
 * Where I already relied on a blogid map from this part of the config:
 *     ```
       map $http_host $blogid {
               default               0;
               include /etc/nginx/mycomap.conf;
       }
       ```
   
 * So where the domain does not exist in mycomap.conf it will be 301 redirected 
   to the main site,
 * thanks, Andy.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7 - Dynamic Text Extension] syntax errors after upgrade to WP 5.1](https://wordpress.org/support/topic/syntax-errors-after-upgrade-to-wp-5-1/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [7 years ago](https://wordpress.org/support/topic/syntax-errors-after-upgrade-to-wp-5-1/#post-11407335)
 * ok, thanks for clearing that up, appreciate the reply,
 * Andy.
    -  This reply was modified 7 years ago by [andyldex](https://wordpress.org/support/users/andyldex/).
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [set default siteurl to HTTPS in multisite](https://wordpress.org/support/topic/set-default-siteurl-to-https-in-multisite/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [8 years ago](https://wordpress.org/support/topic/set-default-siteurl-to-https-in-multisite/#post-10175156)
 * Hi Jan,
 *  oh that’s great, just what I needed, on and tested. All the sites get certs 
   via Cloudflare so I don’t need any checks, so for me perfect. Thanks for sharing!
 * Andy.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [password reset link appears to be invalid error](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/page/2/#post-9075259)
 * Hi,
 *  if your current issue is you cannot login, but you have access to modify the
   database you should follow these instructions:
 * [https://codex.wordpress.org/Resetting_Your_Password](https://codex.wordpress.org/Resetting_Your_Password)
 * If that doesn’t work you should probably open a new thread regarding this issue,
 * thanks, Andy.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [password reset link appears to be invalid error](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [9 years ago](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/#post-9027817)
 * Hi all,
 *  I’ve now resolved this issue, on both my test system (Apache + mod PHP) and 
   live (Nginx + PHP FPM). The issue in the end was WordPress was generating a wrong
   COOKIEHASH which was due to it failing to get anything from `$siteurl = get_site_option('
   siteurl' )` in default-constants.php. And this in turn was due to a missing entry
   for “siteurl” in wp_sitemeta. Once I manually added the entry into wp_sitemeta
   everything started to work as expected.
    Many thanks to James (jkhongusc) for
   helping me out on this, much appreciated!
 * Andy.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [password reset link appears to be invalid error](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [9 years ago](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/#post-9026269)
 * Thanks for the info. As mentioned in the thread, I’m now testing against Apache(
   on another system) to simplify the troubleshooting, however I still have the 
   same problem.
 * One weird thing I’ve just noticed is that it seems I cannot logout, after doing
   a logout and being told I’m logged out I am actually still logged in and can 
   access wp-admin. The only way I can really log out is clearing my local cookies.
   So seems like something bad is happening with sessions on the server. I actually
   don’t see any files in the PHP session.save_path “/var/lib/php5/sessions”. Incidentally
   on the live server I’m using memcache and also see this issue
    -  This reply was modified 9 years ago by [andyldex](https://wordpress.org/support/users/andyldex/).
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [password reset link appears to be invalid error](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [9 years ago](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/#post-9024033)
 * I’m a sys admin who can program in shell and perl, have hacked at PHP a bit from
   time to time but basically a novice. Also I’m pretty familiar with WordPress’s
   DB and have done quite a lot of stuff direct to the DB on multisite installs,
   but probably that won’t help me much here!
 * I’m able to see that I’m hitting the problem at line 503 if `( 'invalidkey' =
   = $_GET['error'] )` but I’m unsure where the $_GET error bit is coming from.
 * Im continuing to read through the code but any hints or tips would be welcome
   😉
 * thanks, Andy.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [password reset link appears to be invalid error](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [9 years ago](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/#post-9023877)
 * Hi,
 *  I haven’t personally used this type of password reset ever. I assume its worked
   in the past as no one has ever complained before.
    The site I’m testing against
   is HTTP, so no SSL. Server config is now default Apache 2.4 install, htaccess
   as mandated by WordPress. Wp-config.php also contains default settings plus what
   wp-admin instructs me to add.
 * any suggestions of what else I can test or try?
 * thanks, Andy.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [password reset link appears to be invalid error](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [9 years ago](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/#post-9023354)
 * Hi,
 *  I’ve just installed Apache 2.4.7 and I get exactly the same error 🙁
 * thanks, Andy.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [password reset link appears to be invalid error](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [9 years ago](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/#post-9023272)
 * Yep, so the password reset is requested from
 * [http://domain.com/wp-login.php?action=lostpassword](http://domain.com/wp-login.php?action=lostpassword)
 * the email has a link similar to:
 * [http://domain.com/wp-login.php?action=rp&key=7T2V5y5W44j0KOBGylCb&login=andytest](http://domain.com/wp-login.php?action=rp&key=7T2V5y5W44j0KOBGylCb&login=andytest)
 * and as soon as you access the above link you are redirected to
 * [http://domain.com/wp-login.php?action=lostpassword&error=invalidkey](http://domain.com/wp-login.php?action=lostpassword&error=invalidkey)
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [password reset link appears to be invalid error](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [9 years ago](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/#post-9021922)
 * Hi,
 *  ok, so I’ve taken a tar.gz of the WordPress 4.7.3 and I’ve moved the original
   WordPress directory and replaced it with the fresh WordPress and all I’ve done
   is moved over the wp-config.php. I forgot to mention, this installation is Nginx
   + PHP FPM so there’s no .htaccess.
    So after all that, I still have the exact
   same error. Unless its a bug, that would only seem to leave my wp-config.php 
   and Nginx config as possible cuplrits? Should I post those in full here?
 * thanks, Andy.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [password reset link appears to be invalid error](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/)
 *  Thread Starter [andyldex](https://wordpress.org/support/users/andyldex/)
 * (@andyldex)
 * [9 years ago](https://wordpress.org/support/topic/password-reset-link-appears-to-be-invalid-error/#post-9020828)
 * thanks for your reply. Yes the MU plugin directory has been renamed, there are
   zero plugins showing from wp-admin.
 * I just recreated the wp-config.php from the sample, using the bare minimum config
   and new salts and I still have the exact same error when attempting password 
   reset unfortunately.
 * thanks Andy.

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