Title: Activate bug under Windows
Last modified: August 24, 2016

---

# Activate bug under Windows

 *  [Chris Daley](https://wordpress.org/support/users/phxchris/)
 * (@phxchris)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/activate-bug-under-windows/)
 * Ran into a problem under Windows where the data base tables were not being created.
   Tracked it down to this code…
 *     ```
       $activatestr = str_replace(WP_PLUGIN_DIR . "/", "activate_", __FILE__);
       add_action($activatestr, 'loginLockdown_install');
       ```
   
 * __FILE__ returns back-slashes under Windows.
 * Replacing those two lines with
 * `register_activation_hook(__FILE__, 'loginLockdown_install');`
 * solved the problem.
 * [https://wordpress.org/plugins/login-lockdown/](https://wordpress.org/plugins/login-lockdown/)

The topic ‘Activate bug under Windows’ is closed to new replies.

 * ![](https://ps.w.org/login-lockdown/assets/icon-256x256.png?rev=2901919)
 * [Login Lockdown & Protection](https://wordpress.org/plugins/login-lockdown/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/login-lockdown/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/login-lockdown/)
 * [Active Topics](https://wordpress.org/support/plugin/login-lockdown/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/login-lockdown/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/login-lockdown/reviews/)

## Tags

 * [activate](https://wordpress.org/support/topic-tag/activate/)
 * [tables](https://wordpress.org/support/topic-tag/tables/)
 * [windows](https://wordpress.org/support/topic-tag/windows/)

 * 0 replies
 * 1 participant
 * Last reply from: [Chris Daley](https://wordpress.org/support/users/phxchris/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/activate-bug-under-windows/)
 * Status: not resolved