summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2008-12-31 14:27:09 +0000
committerMarcus Boerger <helly@php.net>2008-12-31 14:27:09 +0000
commitf77719d8005ad3c0684ba1b40c83e8463b204b5a (patch)
tree78c79616b3ae24b8a61f466d1e5592872fce4150 /sapi
parent2faea53de22c3297bde373bdd3b4fd021a47caab (diff)
downloadphp-git-f77719d8005ad3c0684ba1b40c83e8463b204b5a.tar.gz
MFH
- Changed dl() to be disabled by default. Enabled only when explicitly registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry) [DOC]
Diffstat (limited to 'sapi')
-rw-r--r--sapi/cgi/cgi_main.c12
-rw-r--r--sapi/cli/php_cli.c12
-rw-r--r--sapi/embed/php_embed.c13
3 files changed, 37 insertions, 0 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index f0cec7ca8a..4d40499f2b 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -850,6 +850,17 @@ static sapi_module_struct cgi_sapi_module = {
};
/* }}} */
+/* {{{ arginfo ext/standard/dl.c */
+ZEND_BEGIN_ARG_INFO(arginfo_dl, 0)
+ ZEND_ARG_INFO(0, extension_filename)
+ZEND_END_ARG_INFO()
+/* }}} */
+
+static const zend_function_entry additional_functions[] = {
+ ZEND_FE(dl, arginfo_dl)
+ {NULL, NULL, NULL}
+};
+
/* {{{ php_cgi_usage
*/
static void php_cgi_usage(char *argv0)
@@ -1534,6 +1545,7 @@ int main(int argc, char *argv[])
#endif
cgi_sapi_module.executable_location = argv[0];
+ cgi_sapi_module.additional_functions = additional_functions;
/* startup after we get the above ini override se we get things right */
if (cgi_sapi_module.startup(&cgi_sapi_module) == FAILURE) {
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 2b458a503c..519217fa24 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -426,6 +426,17 @@ static sapi_module_struct cli_sapi_module = {
};
/* }}} */
+/* {{{ arginfo ext/standard/dl.c */
+ZEND_BEGIN_ARG_INFO(arginfo_dl, 0)
+ ZEND_ARG_INFO(0, extension_filename)
+ZEND_END_ARG_INFO()
+/* }}} */
+
+static const zend_function_entry additional_functions[] = {
+ ZEND_FE(dl, arginfo_dl)
+ {NULL, NULL, NULL}
+};
+
/* {{{ php_cli_usage
*/
static void php_cli_usage(char *argv0)
@@ -704,6 +715,7 @@ int main(int argc, char *argv[])
php_optarg = orig_optarg;
cli_sapi_module.executable_location = argv[0];
+ cli_sapi_module.additional_functions = additional_functions;
/* startup after we get the above ini override se we get things right */
if (cli_sapi_module.startup(&cli_sapi_module)==FAILURE) {
diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c
index 99e8882fec..3d93947173 100644
--- a/sapi/embed/php_embed.c
+++ b/sapi/embed/php_embed.c
@@ -140,6 +140,17 @@ sapi_module_struct php_embed_module = {
};
/* }}} */
+/* {{{ arginfo ext/standard/dl.c */
+ZEND_BEGIN_ARG_INFO(arginfo_dl, 0)
+ ZEND_ARG_INFO(0, extension_filename)
+ZEND_END_ARG_INFO()
+/* }}} */
+
+static const zend_function_entry additional_functions[] = {
+ ZEND_FE(dl, arginfo_dl)
+ {NULL, NULL, NULL}
+};
+
int php_embed_init(int argc, char **argv PTSRMLS_DC)
{
zend_llist global_vars;
@@ -176,6 +187,8 @@ int php_embed_init(int argc, char **argv PTSRMLS_DC)
php_embed_module.ini_entries = malloc(sizeof(HARDCODED_INI));
memcpy(php_embed_module.ini_entries, HARDCODED_INI, sizeof(HARDCODED_INI));
+ php_embed_module.additional_functions = additional_functions;
+
if (argv) {
php_embed_module.executable_location = argv[0];
}