Forum

php-fcgi.c config issue, patch

Doug Snead
13 December 2009, 02:59
Hiawatha version: 6.19
Operating System: linux

In php-fcgi.c it looks like the read_config, valid_config got called before the command line options are parsed, wrongly causing php-fcgi to ignore the -c conf file setting. Placing read_config, valid_config invocations AFTER command line options (like -c) are parsed causes -c option to be correctly used. Here's my patch:

diff hiawatha-6.19/php-fcgi.c hiawatha-6.19-patched/php-fcgi.c
475,481d474
< if ((config = read_config(config_file)) == NULL) {
< return EXIT_FAILURE;
< }
< if (valid_config(config) == false) {
< return EXIT_FAILURE;
< }
<
512a506,512
> if ((config = read_config(config_file)) == NULL) {
> return EXIT_FAILURE;
> }
> if (valid_config(config) == false) {
> return EXIT_FAILURE;
> }
>
Hugo Leisink
13 December 2009, 17:54
How silly of me. You're right. Thanks!
This topic has been closed.