summaryrefslogtreecommitdiff
path: root/sapi/apache2handler/php_functions.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-05-06 13:26:23 +0400
committerDmitry Stogov <dmitry@zend.com>2014-05-06 13:26:23 +0400
commit9d21bef39f46f162f47c6619f65008c83d15896d (patch)
treed3ba9df623f148c04bd4509645a50f058e2fbfb6 /sapi/apache2handler/php_functions.c
parent0ea615fd10f11aad3ce76f4fc0de2ff41cfa64cf (diff)
downloadphp-git-9d21bef39f46f162f47c6619f65008c83d15896d.tar.gz
Added support for apache and apache2handler SAPIs (They seem slower than FastCGI)
Diffstat (limited to 'sapi/apache2handler/php_functions.c')
-rw-r--r--sapi/apache2handler/php_functions.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index c6bed48dac..4bc8fe8872 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -238,7 +238,7 @@ PHP_FUNCTION(apache_note)
}
if (old_note_val) {
- RETURN_STRING(old_note_val, 1);
+ RETURN_STRING(old_note_val);
}
RETURN_FALSE;
@@ -313,7 +313,7 @@ PHP_FUNCTION(apache_getenv)
env_val = (char*) apr_table_get(r->subprocess_env, variable);
if (env_val != NULL) {
- RETURN_STRING(env_val, 1);
+ RETURN_STRING(env_val);
}
RETURN_FALSE;
@@ -336,7 +336,7 @@ PHP_FUNCTION(apache_get_version)
char *apv = php_apache_get_version();
if (apv && *apv) {
- RETURN_STRING(apv, 1);
+ RETURN_STRING(apv);
} else {
RETURN_FALSE;
}
@@ -388,8 +388,8 @@ PHP_MINFO_FUNCTION(apache)
}
smart_str_appendc(&tmp1, ' ');
}
- if ((tmp1.len - 1) >= 0) {
- tmp1.c[tmp1.len - 1] = '\0';
+ if (tmp1.s && (tmp1.s->len - 1) >= 0) {
+ tmp1.s->val[tmp1.s->len - 1] = '\0';
}
php_info_print_table_start();
@@ -426,7 +426,7 @@ PHP_MINFO_FUNCTION(apache)
php_info_print_table_row(2, "Virtual Server", (serv->is_virtual ? "Yes" : "No"));
php_info_print_table_row(2, "Server Root", ap_server_root);
- php_info_print_table_row(2, "Loaded Modules", tmp1.c);
+ php_info_print_table_row(2, "Loaded Modules", tmp1.s->val);
smart_str_free(&tmp1);
php_info_print_table_end();