Lines Matching refs:pe
3425 static void php_putenv_destructor(putenv_entry *pe) /* {{{ */ in php_putenv_destructor() argument
3427 if (pe->previous_value) { in php_putenv_destructor()
3433 SetEnvironmentVariable(pe->key, "bugbug"); in php_putenv_destructor()
3435 putenv(pe->previous_value); in php_putenv_destructor()
3437 efree(pe->previous_value); in php_putenv_destructor()
3441 unsetenv(pe->key); in php_putenv_destructor()
3443 SetEnvironmentVariable(pe->key, NULL); in php_putenv_destructor()
3448 if (!strncmp(*env, pe->key, pe->key_len) && (*env)[pe->key_len] == '=') { /* found it */ in php_putenv_destructor()
3458 if (!strncmp(pe->key, "TZ", pe->key_len)) { in php_putenv_destructor()
3463 efree(pe->putenv_string); in php_putenv_destructor()
3464 efree(pe->key); in php_putenv_destructor()
4054 putenv_entry pe; local
4070 pe.putenv_string = estrndup(setting, setting_len);
4071 pe.key = estrndup(setting, setting_len);
4072 if ((p = strchr(pe.key, '='))) { /* nullify the '=' if there is one */
4079 pe.key_len = strlen(pe.key);
4082 if (pe.key_len < setting_len - 1) {
4093 if (zend_hash_exists(&BG(sm_protected_env_vars), pe.key, pe.key_len)) {
4094 …S_CC, E_WARNING, "Safe Mode warning: Cannot override protected environment variable '%s'", pe.key);
4095 efree(pe.putenv_string);
4096 efree(pe.key);
4108 if (!strncmp(allowed_prefix, pe.key, strlen(allowed_prefix))) {
4116 … "Safe Mode warning: Cannot set environment variable '%s' - it's not in the allowed list", pe.key);
4117 efree(pe.putenv_string);
4118 efree(pe.key);
4124 zend_hash_del(&BG(putenv_ht), pe.key, pe.key_len+1);
4127 pe.previous_value = NULL;
4129 if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') { /* found it */
4132 pe.previous_value = estrdup(*env);
4134 pe.previous_value = *env;
4142 unsetenv(pe.putenv_string);
4144 if (!p || putenv(pe.putenv_string) == 0) { /* success */
4147 if (putenv(pe.putenv_string) == 0) { /* success */
4149 error_code = SetEnvironmentVariable(pe.key, value);
4159 zend_hash_add(&BG(putenv_ht), pe.key, pe.key_len + 1, (void **) &pe, sizeof(putenv_entry), NULL);
4161 if (!strncmp(pe.key, "TZ", pe.key_len)) {
4167 efree(pe.putenv_string);
4168 efree(pe.key);