summaryrefslogtreecommitdiff
path: root/sapi/embed/php_embed.c
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/embed/php_embed.c
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/embed/php_embed.c')
-rw-r--r--sapi/embed/php_embed.c13
1 files changed, 13 insertions, 0 deletions
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];
}