summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--ext/opcache/tests/bug68104.phpt6
-rw-r--r--main/output.c2
-rw-r--r--main/php_output.h2
-rw-r--r--sapi/phpdbg/phpdbg.c4
-rw-r--r--sapi/phpdbg/phpdbg.h2
-rw-r--r--sapi/phpdbg/phpdbg_bp.c2
-rw-r--r--sapi/phpdbg/phpdbg_help.c2
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c2
-rw-r--r--sapi/phpdbg/phpdbg_rinit_hook.c2
-rw-r--r--sapi/phpdbg/phpdbg_wait.c2
11 files changed, 21 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index 2125e8d3d6..f0a6f257d5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,5 +42,5 @@ before_script:
# Run PHPs run-tests.php
script:
- - ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff --set-timeout 120
+ - ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff --set-timeout 120 -s
- ./sapi/cli/php sapi/phpdbg/tests/run-tests.php -diff2stdout --phpdbg sapi/phpdbg/phpdbg
diff --git a/ext/opcache/tests/bug68104.phpt b/ext/opcache/tests/bug68104.phpt
index 521486ef58..89439ef68e 100644
--- a/ext/opcache/tests/bug68104.phpt
+++ b/ext/opcache/tests/bug68104.phpt
@@ -9,5 +9,9 @@ disable_functions=dl
--FILE--
<?php
var_dump(is_callable("dl"));
---EXPECT--
+dl("a.so");
+?>
+--EXPECTF--
bool(true)
+
+Warning: dl() has been disabled for security reasons in %sbug68104.php on line %d
diff --git a/main/output.c b/main/output.c
index 1dac7179b8..0c7212ac91 100644
--- a/main/output.c
+++ b/main/output.c
@@ -35,7 +35,7 @@
#include "zend_stack.h"
#include "php_output.h"
-ZEND_DECLARE_MODULE_GLOBALS(output);
+PHPAPI ZEND_DECLARE_MODULE_GLOBALS(output);
const char php_output_default_handler_name[sizeof("default output handler")] = "default output handler";
const char php_output_devnull_handler_name[sizeof("null output handler")] = "null output handler";
diff --git a/main/php_output.h b/main/php_output.h
index 6c4b1f7a42..3831478b9f 100644
--- a/main/php_output.h
+++ b/main/php_output.h
@@ -152,7 +152,7 @@ ZEND_BEGIN_MODULE_GLOBALS(output)
int output_start_lineno;
ZEND_END_MODULE_GLOBALS(output)
-ZEND_EXTERN_MODULE_GLOBALS(output);
+PHPAPI ZEND_EXTERN_MODULE_GLOBALS(output);
/* there should not be a need to use OG() from outside of output.c */
#ifdef ZTS
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 7ca7997297..6ee41b7586 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -779,7 +779,9 @@ const opt_struct OPTIONS[] = { /* {{{ */
{'S', 1, "sapi-name"},
{'l', 1, "listen"},
{'a', 1, "address-or-any"},
+#if PHPDBG_IN_DEV
{'x', 0, "xml output"},
+#endif
{'V', 0, "version"},
{'-', 0, NULL}
}; /* }}} */
@@ -1213,8 +1215,10 @@ phpdbg_main:
} else address = strdup(php_optarg);
} break;
+#if PHPDBG_IN_DEV
case 'x':
flags |= PHPDBG_WRITE_XML;
+#endif
break;
case 'V': {
diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h
index a9be80436e..a0ba75e4d4 100644
--- a/sapi/phpdbg/phpdbg.h
+++ b/sapi/phpdbg/phpdbg.h
@@ -21,6 +21,8 @@
#ifndef PHPDBG_H
#define PHPDBG_H
+#define PHPDBG_IN_DEV 0
+
#ifdef PHP_WIN32
# define PHPDBG_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c
index 33824d4fec..85dc12a3e5 100644
--- a/sapi/phpdbg/phpdbg_bp.c
+++ b/sapi/phpdbg/phpdbg_bp.c
@@ -240,7 +240,7 @@ PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num TSRML
php_stream_statbuf ssb;
char realpath[MAXPATHLEN];
const char *original_path = path;
- zend_bool pending;
+ zend_bool pending = 0;
HashTable *broken, *file_breaks = &PHPDBG_G(bp)[PHPDBG_BREAK_FILE];
phpdbg_breakfile_t new_break;
diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c
index 652e170694..d47f8c776a 100644
--- a/sapi/phpdbg/phpdbg_help.c
+++ b/sapi/phpdbg/phpdbg_help.c
@@ -388,7 +388,9 @@ phpdbg_help_text_t phpdbg_help_text[] = {
" **-S** **-S**cli Override SAPI name, careful!" CR
" **-l** **-l**4000 Setup remote console ports" CR
" **-a** **-a**192.168.0.3 Setup remote console bind address" CR
+#if PHPDBG_IN_DEV
" **-x** Enable xml output (instead of normal text output)" CR
+#endif
" **-V** Print version number" CR
" **--** **--** arg1 arg2 Use to delimit phpdbg arguments and php $argv; append any $argv "
"argument after it" CR CR
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 915bccfa69..f030654f3b 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -82,7 +82,9 @@ const phpdbg_command_t phpdbg_prompt_commands[] = {
PHPDBG_COMMAND_D(export, "export breaks to a .phpdbginit script", '>', NULL, "s", PHPDBG_ASYNC_SAFE),
PHPDBG_COMMAND_D(sh, "shell a command", 0 , NULL, "i", 0),
PHPDBG_COMMAND_D(quit, "exit phpdbg", 'q', NULL, 0, PHPDBG_ASYNC_SAFE),
+#if PHPDBG_IN_DEV
PHPDBG_COMMAND_D(wait, "wait for other process", 'W', NULL, 0, 0),
+#endif
PHPDBG_COMMAND_D(watch, "set watchpoint", 'w', phpdbg_watch_commands, "|ss", 0),
PHPDBG_COMMAND_D(eol, "set EOL", 'E', NULL, "|s", 0),
PHPDBG_END_COMMAND
diff --git a/sapi/phpdbg/phpdbg_rinit_hook.c b/sapi/phpdbg/phpdbg_rinit_hook.c
index acbdfb6f25..11bd5c99b1 100644
--- a/sapi/phpdbg/phpdbg_rinit_hook.c
+++ b/sapi/phpdbg/phpdbg_rinit_hook.c
@@ -52,7 +52,7 @@ static PHP_RINIT_FUNCTION(phpdbg_webhelper) /* {{{ */
return SUCCESS;
}
-#ifndef _WIN32
+#if PHPDBG_IN_DEV
{
struct sockaddr_un sock;
int s = socket(AF_UNIX, SOCK_STREAM, 0);
diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c
index 6f9eea90e3..180ae6af3d 100644
--- a/sapi/phpdbg/phpdbg_wait.c
+++ b/sapi/phpdbg/phpdbg_wait.c
@@ -365,7 +365,7 @@ void phpdbg_webdata_decompress(char *msg, int len TSRMLS_DC) {
PHPDBG_COMMAND(wait) /* {{{ */
{
-#ifndef PHP_WIN32
+#if PHPDBG_IN_DEV
struct sockaddr_un local, remote;
int rlen, sr, sl;
unlink(PHPDBG_G(socket_path));