diff options
| author | jvoisin | 2019-01-12 18:59:48 +0100 |
|---|---|---|
| committer | jvoisin | 2019-01-12 18:59:48 +0100 |
| commit | a7f5b9211601520abf94da668072b89dc7bcee73 (patch) | |
| tree | 24ddd1dfd5febdb92e14cc66b7c9cd69e26af437 /src/sp_config_keywords.c | |
| parent | 498340e928d4145620726aea249604e197724701 (diff) | |
Fix missing symbol when there is no session support
It's possible to build PHP with sessions as a
module, or even without sessions at all.
This commit make it possible to use Snuffleupagus
on those platforms.
Diffstat (limited to 'src/sp_config_keywords.c')
| -rw-r--r-- | src/sp_config_keywords.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index 04a3f41..760961a 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c | |||
| @@ -40,6 +40,18 @@ int parse_session(char *line) { | |||
| 40 | if (0 != ret) { | 40 | if (0 != ret) { |
| 41 | return ret; | 41 | return ret; |
| 42 | } | 42 | } |
| 43 | |||
| 44 | #if ( !HAVE_PHP_SESSION || defined(COMPILE_DL_SESSION) ) | ||
| 45 | sp_log_err("config", | ||
| 46 | "You're trying to use the session cookie encryption feature " | ||
| 47 | "on line %zu without having session support statically built into PHP. " | ||
| 48 | "This isn't supported, see " | ||
| 49 | "https://github.com/nbs-system/snuffleupagus/issues/278 for details.", | ||
| 50 | sp_line_no); | ||
| 51 | pefree(session, 0); | ||
| 52 | return -1; | ||
| 53 | #endif | ||
| 54 | |||
| 43 | if (session->encrypt) { | 55 | if (session->encrypt) { |
| 44 | if (0 == (SNUFFLEUPAGUS_G(config).config_snuffleupagus->cookies_env_var)) { | 56 | if (0 == (SNUFFLEUPAGUS_G(config).config_snuffleupagus->cookies_env_var)) { |
| 45 | sp_log_err( | 57 | sp_log_err( |
