Title: WP2 Plugin environment bug
Last modified: August 18, 2016

---

# WP2 Plugin environment bug

 *  [stravaiger](https://wordpress.org/support/users/stravaiger/)
 * (@stravaiger)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/wp2-plugin-environment-bug/)
 * I finally got my LDAP plugin ported to WP2 from WP 1.5.2 but found a bug in the
   WP2 plugin environment.
 * It seems that wp-config.php isn’t always used when plugin functions are called.
 * Defining something in wp-config.php:
 * define(‘LDAP_COOKIE_MARKER’, ‘LDAP’);
 * doesn’t always propagate through to the plugin function. Sometimes it does, sometimes
   it doesn’t.
 * e.g.
 * echo “<br>”.LDAP_COOKIE_MARKER.”<br>”;
 * from within a plugin function will sometimes display “LDAP” and other times display“
   LDAP_COOKIE_MARKER”.
 * This wasn’t the case in 1.5.2 when defines in wp-config.php always propagated
   to the plugin functions.
 * Defining LDAP_COOKIE_MARKER locally in the plugin PHP file solves the problem.

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

 *  [Cypher](https://wordpress.org/support/users/cypher/)
 * (@cypher)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/wp2-plugin-environment-bug/#post-359476)
 * You will likely get better responses to specific code questions from the WP-HACKERS
   mailing list.
 * Regards
 *  [natoriousfat](https://wordpress.org/support/users/natoriousfat/)
 * (@natoriousfat)
 * [20 years ago](https://wordpress.org/support/topic/wp2-plugin-environment-bug/#post-360049)
 * is your ldap plugin available for download anywhere?

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

The topic ‘WP2 Plugin environment bug’ is closed to new replies.

## Tags

 * [define](https://wordpress.org/support/topic-tag/define/)
 * [environment](https://wordpress.org/support/topic-tag/environment/)

 * 2 replies
 * 3 participants
 * Last reply from: [natoriousfat](https://wordpress.org/support/users/natoriousfat/)
 * Last activity: [20 years ago](https://wordpress.org/support/topic/wp2-plugin-environment-bug/#post-360049)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
