# Chunkin module is not working

**URL:** <https://www.ruby-forum.com/t/chunkin-module-is-not-working/204922>\
**Category:** NGINX\
**Created:** [March 24, 2011, 11:12pm UTC](https://www.ruby-forum.com/t/chunkin-module-is-not-working/204922 "2011-03-24T23:12:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [March 24, 2011, 11:12pm UTC](https://www.ruby-forum.com/t/chunkin-module-is-not-working/204922/1 "2011-03-24T23:12:25Z")

</div>

I am trying to use chunkin module in nginx, which is

> **[GitHub - agentzh/chunkin-nginx-module: HTTP 1.1 chunked-encoding request body...](https://github.com/agentzh/chunkin-nginx-module)**
>
> HTTP 1.1 chunked-encoding request body support for Nginx - GitHub - agentzh/chunkin-nginx-module: HTTP 1.1 chunked-encoding request body support for Nginx

I have the problem to use it.  
I add “chunkin on” inside server config.  
However, when I turn on nginx server, i enountered the error:  
[emerg]: unknown directive “chunkin” in ./conf/nginx.conf:36

Another question is test cmd:  
I have bunch of these errors:  
…  
t/pressure…dubious  
Test returned status 2 (wstat 512, 0x200)  
t/random…Can’t locate Test/Nginx/Socket.pm in @INC (@INC  
contains: inc lib t/lib /etc/perl /usr/local/lib/perl/5.8.8  
/usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5  
/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site\_perl .) at  
t/lib/Test/Nginx/Socket/Chunkin.pm line 5.  
BEGIN failed–compilation aborted at t/lib/Test/Nginx/Socket/Chunkin.pm  
line 5.  
Compilation failed in require at t/random.t line 4.  
BEGIN failed–compilation aborted at t/random.t line 4.  
…

Could you help me to figure out the problem?  
Thank you so much.  
Yanxin

---

<div class="post-metadata">

**Author:** ![yanxin\_z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d6d6ee/32.png) [@yanxin\_z](https://www.ruby-forum.com/u/yanxin_z)\
**Post date:** [March 25, 2011, 12:34am UTC](https://www.ruby-forum.com/t/chunkin-module-is-not-working/204922/2 "2011-03-25T00:34:17Z")

</div>

On Thu, Mar 24, 2011 at 11:12:25PM +0100, Yanxin Z. wrote:

Hi there,

> I am trying to use chunkin module in nginx, which is  
> [GitHub - agentzh/chunkin-nginx-module: HTTP 1.1 chunked-encoding request body support for Nginx · GitHub](https://github.com/agentzh/chunkin-nginx-module)  
> I have the problem to use it.  
> I add “chunkin on” inside server config.  
> However, when I turn on nginx server, i enountered the error:  
> [emerg]: unknown directive “chunkin” in ./conf/nginx.conf:36

That suggests that the nginx you are using does not include the chunkin  
module.

What does “nginx -V” say, when you use the same nginx as shows this  
error?

All the best,

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![yanxin\_z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d6d6ee/32.png) [@yanxin\_z](https://www.ruby-forum.com/u/yanxin_z)\
**Post date:** [March 25, 2011, 2:01pm UTC](https://www.ruby-forum.com/t/chunkin-module-is-not-working/204922/3 "2011-03-25T14:01:14Z")

</div>

On Thu, Mar 24, 2011 at 11:12 PM, Yanxin Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> BEGIN failed–compilation aborted at t/lib/Test/Nginx/Socket/Chunkin.pm  
> line 5.  
> Compilation failed in require at t/random.t line 4.  
> BEGIN failed–compilation aborted at t/random.t line 4.  
> …
> 
> Could you help me to figure out the problem?  
> The problem wit the test command is that you should have Test::Nginx  
> installed. You can get it from CPAN with something like that:  
> perl -MCPAN -e ‘install Test::Nginx’

If you’re missing some dependencies, something like that can do the  
trick (did for me on Fedora Core 14):  
yum install perl-CPAN perl-Test-Base perl-Test-LongString  
perl-List-MoreUtils

And you don’t have to run tests for the chunkin module to work…

Cheers,

Antoine.

---

<div class="post-metadata">

**Author:** ![yanxin\_z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d6d6ee/32.png) [@yanxin\_z](https://www.ruby-forum.com/u/yanxin_z)\
**Post date:** [March 29, 2011, 7:54am UTC](https://www.ruby-forum.com/t/chunkin-module-is-not-working/204922/4 "2011-03-29T07:54:16Z")

</div>

Hello Vetry,

for checksum calculation you can use:

\*syntax: \*upload\_aggregate\_form\_field _/ /_

\*\*Specifies a form field(s) containing aggregate attributes to generate  
for each uploaded file in request body passed to backend. Both name and  
value could contain standard nginx variables, variables from  
upload\_set\_form\_field  
[http://www.grid.net.ru/nginx/upload.en.html#upload\_set\_form\_field](http://www.grid.net.ru/nginx/upload.en.html#upload_set_form_field)  
directive and following additional special variables:

```
* $upload_file_md5 -- MD5 checksum of the file
* $upload_file_md5_uc -- MD5 checksum of the file in uppercase 

```

letters  
\* $upload\_file\_sha1 – SHA1 checksum of the file  
\* $upload\_file\_sha1\_uc – SHA1 checksum of the file in uppercase  
letters  
\* $upload\_file\_crc32 – hexdecimal value of CRC32 of the file  
\* $upload\_file\_size – size of the file in bytes  
\* $upload\_file\_number – ordinal number of file in request body

Am 29.03.2011 06:57, schrieb vetri:

---

<div class="post-metadata">

**Author:** ![yanxin\_z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d6d6ee/32.png) [@yanxin\_z](https://www.ruby-forum.com/u/yanxin_z)\
**Post date:** [March 29, 2011, 6:57am UTC](https://www.ruby-forum.com/t/chunkin-module-is-not-working/204922/5 "2011-03-29T06:57:34Z")

</div>

mr valery,

is there any module to unzip ,checksum calculation for the uploaded  
file?

Posted at Nginx Forum:

> **[Re: chunkin module is not working](https://forum.nginx.org/read.php?2,185570,186510#msg-186510)**
>
> I am trying to use chunkin module in nginx, which is https://github.com/agentzh/chunkin-nginx-module I have the problem to use it. I add "chunkin on" inside server config. However, when I turn on nginx server, i enountered the error:...

---

<div class="post-metadata">

**Author:** ![yanxin\_z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d6d6ee/32.png) [@yanxin\_z](https://www.ruby-forum.com/u/yanxin_z)\
**Post date:** [March 29, 2011, 8:44am UTC](https://www.ruby-forum.com/t/chunkin-module-is-not-working/204922/6 "2011-03-29T08:44:11Z")

</div>

mr alexander ,

thanks for the reply . can we print that variable into log file to see  
the checksum and file name …?

Posted at Nginx Forum:

> **[Re: chunkin module is not working](https://forum.nginx.org/read.php?2,185570,186525#msg-186525)**
>
> I am trying to use chunkin module in nginx, which is https://github.com/agentzh/chunkin-nginx-module I have the problem to use it. I add "chunkin on" inside server config. However, when I turn on nginx server, i enountered the error:...
