Attention Valery Kholodkov :) Upload Module query

Hello Folks and hello Valery,

I want to run the example.php that comes alongwith Valery’s upload
module. However, I’m having problems trying to set it up correctly.
(Sorry I have never worked on php before so please please pardon my
query here, but I wanna make a good progress this weekend for my
hobbyist project :slight_smile:

So, after compiling nginx code and creating nginx.config, where exactly
should I put the example.php and upload.html files?

Another side query is, would it matter if I use Apple’s LLVM GCC
compiler for compiling the nginx code? I have Lion on my Mac (10.7).

Thanks a lot in advance and happy weekend!!

Kind regards,
~Viren

Posted at Nginx Forum:

On Sat, Dec 03, 2011 at 01:34:52AM -0500, drvirens wrote:

Another side query is, would it matter if I use Apple’s LLVM GCC
compiler for compiling the nginx code? I have Lion on my Mac (10.7).

I’m working with FreeBSD ports tree on FreeBSD9 with clang. I’d like
to tell that www/nginx and www/nginx-devel compiles well with clang,
as well as with gcc.


Sergey A. Osokin
[email protected]
[email protected]

Run it on Apache or PHP-FPM behind nginx.


Best regards,
Valery K.

Thank you Valery and Sergey. I was able to compile nginx on Mac 10.7
using gcc llvm compiler and also able to use Valery’s module to upload
files to my nginx server. Now I’m stuck in reading the values sent by
upload module to backend server, specifically the below fields:

Set specified fields in request body

        upload_set_form_field "${upload_field_name}_name"

$upload_file_name;
upload_set_form_field “${upload_field_name}_content_type”
$upload_content_type;
upload_set_form_field “${upload_field_name}_path”
$upload_tmp_path;

        # Inform backend about hash and size of a file
        upload_aggregate_form_field "${upload_field_name}_md5"

$upload_file_md5;
upload_aggregate_form_field “${upload_field_name}_size”
$upload_file_size;

I saw that in PHP it is done using _PHP[ ] syntax, but not sure how
could that be done in CppCMS.

Thanks anyways for your earlier replies.

Posted at Nginx Forum: