Code Monkey home page Code Monkey logo

Comments (9)

 avatar commented on August 18, 2024

SOLVED: version 2.0.9 works perfectly with nginx 0.7.61

from nginx-upload-module.

vkholodkov avatar vkholodkov commented on August 18, 2024

Please use 2.0.9 with nginx versions 0.7.52 and greater.

from nginx-upload-module.

wiemann avatar wiemann commented on August 18, 2024

Any progress on solving the root of this problem? I'd really like to run it with a current NGINX and nginx-upload-module 2.0.9 and the trunk don't compile because of that issue (ngx_http_upload_module.c:1104: error: too many arguments to function ‘ngx_conf_merge_path_value’)

from nginx-upload-module.

vkholodkov avatar vkholodkov commented on August 18, 2024

nginx-upload-module 2.0.9 and current nginx version (0.8.49 at moment of this comment) have incompatible APIs. In order to compile upload module with current nginx version you need to upgrade to at least nginx-upload-module 2.0.11

from nginx-upload-module.

swombat avatar swombat commented on August 18, 2024

I'm using the latest upload module from github (2.0.12) and nginx 0.8.49 and getting the following error:

gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules -I ../nginx-upload-module -I src/mail \
                -o objs/addon/nginx-upload-module/ngx_http_upload_module.o \
                ../nginx-upload-module/ngx_http_upload_module.c
../nginx-upload-module/ngx_http_upload_module.c: In function 'ngx_http_upload_merge_loc_conf':
../nginx-upload-module/ngx_http_upload_module.c:1104: error: 'ngx_garbage_collector_temp_handler' undeclared (first use in this function)
../nginx-upload-module/ngx_http_upload_module.c:1104: error: (Each undeclared identifier is reported only once
../nginx-upload-module/ngx_http_upload_module.c:1104: error: for each function it appears in.)
cc1: warnings being treated as errors
../nginx-upload-module/ngx_http_upload_module.c:1104: error: passing argument 1 of 'ngx_conf_merge_path_value' from incompatible pointer type
../nginx-upload-module/ngx_http_upload_module.c:1104: error: passing argument 2 of 'ngx_conf_merge_path_value' from incompatible pointer type
../nginx-upload-module/ngx_http_upload_module.c:1104: error: passing argument 3 of 'ngx_conf_merge_path_value' from incompatible pointer type
../nginx-upload-module/ngx_http_upload_module.c:1104: error: passing argument 4 of 'ngx_conf_merge_path_value' makes pointer from integer without a cast
../nginx-upload-module/ngx_http_upload_module.c:1104: error: too many arguments to function 'ngx_conf_merge_path_value'
../nginx-upload-module/ngx_http_upload_module.c: In function 'ngx_http_upload_pass_form_field':
../nginx-upload-module/ngx_http_upload_module.c:1490: error: passing argument 1 of 'ngx_regex_compile' from incompatible pointer type
../nginx-upload-module/ngx_http_upload_module.c:1490: error: too many arguments to function 'ngx_regex_compile'
../nginx-upload-module/ngx_http_upload_module.c:1490: error: assignment makes pointer from integer without a cast
../nginx-upload-module/ngx_http_upload_module.c:1497: error: implicit declaration of function 'ngx_regex_capture_count'
../nginx-upload-module/ngx_http_upload_module.c:1501: error: 'ngx_regex_capture_count_n' undeclared (first use in this function)
../nginx-upload-module/ngx_http_upload_module.c:1501: error: expected ')' before string constant
make[1]: *** [objs/addon/nginx-upload-module/ngx_http_upload_module.o] Error 1
make[1]: Leaving directory `/home/dtenner/sources/nginx-install/nginx-0.8.49'
make: *** [build] Error 2

Not sure why it's happening... going to delve into the code patch fix described by http://code.google.com/p/phusion-passenger/issues/detail?id=252 and see if I can apply that to the nginx upload module...

from nginx-upload-module.

swombat avatar swombat commented on August 18, 2024

Ok, I applied the following patch:

/***** ADDED *****/
static ngx_path_init_t ngx_http_upstream_path = {
    ngx_string(NGX_HTTP_PROXY_TEMP_PATH), { 1, 2, 0 }
};
/***** END OF PATCH 1 ******/

static char * /* {{{ ngx_http_upload_merge_loc_conf */
ngx_http_upload_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
{
    ngx_http_upload_loc_conf_t  *prev = parent;
    ngx_http_upload_loc_conf_t  *conf = child;

    ngx_conf_merge_str_value(conf->url, prev->url, "");

/***** ADDED *****/
    ngx_conf_merge_path_value(cf,
                             &conf->store_path,
                              prev->store_path,
                             &ngx_http_upstream_path);
/***** REMOVED:
    ngx_conf_merge_path_value(conf->store_path,
                              prev->store_path,
                              NGX_HTTP_PROXY_TEMP_PATH, 1, 2, 0,
                              ngx_garbage_collector_temp_handler, cf);
 ***** END OF PATCH 2 ******/

I've now got a different error:

gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules -I ../nginx-upload-module -I src/mail \
                -o objs/addon/nginx-upload-module/ngx_http_upload_module.o \
                ../nginx-upload-module/ngx_http_upload_module.c
cc1: warnings being treated as errors
../nginx-upload-module/ngx_http_upload_module.c: In function 'ngx_http_upload_pass_form_field':
../nginx-upload-module/ngx_http_upload_module.c:1503: error: passing argument 1 of 'ngx_regex_compile' from incompatible pointer type
../nginx-upload-module/ngx_http_upload_module.c:1503: error: too many arguments to function 'ngx_regex_compile'
../nginx-upload-module/ngx_http_upload_module.c:1503: error: assignment makes pointer from integer without a cast
../nginx-upload-module/ngx_http_upload_module.c:1510: error: implicit declaration of function 'ngx_regex_capture_count'
../nginx-upload-module/ngx_http_upload_module.c:1514: error: 'ngx_regex_capture_count_n' undeclared (first use in this function)
../nginx-upload-module/ngx_http_upload_module.c:1514: error: (Each undeclared identifier is reported only once
../nginx-upload-module/ngx_http_upload_module.c:1514: error: for each function it appears in.)
../nginx-upload-module/ngx_http_upload_module.c:1514: error: expected ')' before string constant
make[1]: *** [objs/addon/nginx-upload-module/ngx_http_upload_module.o] Error 1
make[1]: Leaving directory `/home/dtenner/sources/nginx-install/nginx-0.8.49'
make: *** [build] Error 2

Not quite sure what to do about this one. Seems to be a compatibility with the PCRE api?? Not quite sure... asking on IRC now... will get back any useful answer I get...

from nginx-upload-module.

vkholodkov avatar vkholodkov commented on August 18, 2024

Hmm, that's interesting, I'll check. Thanks for investigating!

from nginx-upload-module.

swombat avatar swombat commented on August 18, 2024

Great! If you want me to try some patches to see if they work, feel free to ping me on irc (swombat) or via email - daniel at tenner dot org !

Thanks for any help!

from nginx-upload-module.

swombat avatar swombat commented on August 18, 2024

Alert over! I was using the master branch of this plugin. For some reason I thought this was the latest version (it often is with rails plugins).

PiotrSikora on #nginx advised me to use branch 2.2 and now it all compiles fine. Phew!

from nginx-upload-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.