# NGinX Form Input Problem

**URL:** <https://www.ruby-forum.com/t/nginx-form-input-problem/215457>\
**Category:** NGINX\
**Created:** [January 5, 2012, 12:51am UTC](https://www.ruby-forum.com/t/nginx-form-input-problem/215457 "2012-01-05T00:51:39Z")\
**Posts on this page:** 8\
**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:** [January 5, 2012, 12:51am UTC](https://www.ruby-forum.com/t/nginx-form-input-problem/215457/1 "2012-01-05T00:51:39Z")

</div>

I have just recently set-up a new LEMP in Ubuntu 11.10 (64-bit) and  
running NGinX ver 1.0.5. the server is running fine but I cannot seem to  
get any forms to work. On my old server (windows) the forms worked fine,  
but now I get the following error “502 Bad Gateway”.

NGinX was installed with apt-get install, it is not a version that I  
compiled myself. Also I am running PHP5-Fastcgi.

I have tried setting the forms to work in two different ways, one to  
write to a text file and also to write to MySQL database…but with no  
luck.

Any ideas on how to get the forms working again??

Posted at Nginx Forum:

> **[NGinX Form Input Problem](https://forum.nginx.org/read.php?2,220816,220816#msg-220816)**
>
> I have just recently set-up a new LEMP in Ubuntu 11.10 (64-bit) and running NGinX ver 1.0.5. the server is running fine but I cannot seem to get any forms to work. On my old server (windows) the forms worked fine, but now I get the following error...

---

<div class="post-metadata">

**Author:** ![deneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@deneb](https://www.ruby-forum.com/u/deneb)\
**Post date:** [January 5, 2012, 4:45am UTC](https://www.ruby-forum.com/t/nginx-form-input-problem/215457/2 "2012-01-05T04:45:55Z")

</div>

So the only thing that I have found is this  
HttpFormInputModule…looks like I will have to uninstall the rpm  
version and then download the source code and recompile/reconfigure  
nginx.

The last time I did this I had added the http\_flv\_module but during that  
recompiling I could not get the http\_xslt\_module to compile at all and  
did it without\_http\_xslt\_module.

I really didn’t want to do this but as far as the mechanics goes for my  
site I am almost there…just need to be able to accept data from  
forms.

Does this sound like I am on the right path???

Posted at Nginx Forum:

> **[Re: NGinX Form Input Problem](https://forum.nginx.org/read.php?2,220816,220820#msg-220820)**
>
> I have just recently set-up a new LEMP in Ubuntu 11.10 (64-bit) and running NGinX ver 1.0.5. the server is running fine but I cannot seem to get any forms to work. On my old server (windows) the forms worked fine, but now I get the following error...

---

<div class="post-metadata">

**Author:** ![deneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@deneb](https://www.ruby-forum.com/u/deneb)\
**Post date:** [January 5, 2012, 4:50am UTC](https://www.ruby-forum.com/t/nginx-form-input-problem/215457/3 "2012-01-05T04:50:15Z")

</div>

Do you get the error “502 bad gateway” with any PHP page? It seems PHP  
might not be working at all. I would recommend creating a very simple  
PHP page and testing if it works with the following content for example:

\<?php phpinfo(); ?\>

Let us know if this works.

–  
Unai R.  
CTO & Cofounder  
LeanWired LLP  
Singapore 168977  
[www.leanservers.com](http://www.leanservers.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![deneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@deneb](https://www.ruby-forum.com/u/deneb)\
**Post date:** [January 5, 2012, 5:43am UTC](https://www.ruby-forum.com/t/nginx-form-input-problem/215457/4 "2012-01-05T05:43:53Z")

</div>

Yes I get the error, “502 Bad Gateway”, when I request a PHP page.  
I checked on my terminal and php5-fpm is running.

I also use a php script in the nginx config to run webstats which is  
also running.

What information should I post to help solve this problem???

Posted at Nginx Forum:

> **[Re: NGinX Form Input Problem](https://forum.nginx.org/read.php?2,220816,220822#msg-220822)**
>
> I have just recently set-up a new LEMP in Ubuntu 11.10 (64-bit) and running NGinX ver 1.0.5. the server is running fine but I cannot seem to get any forms to work. On my old server (windows) the forms worked fine, but now I get the following error...

---

<div class="post-metadata">

**Author:** ![deneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@deneb](https://www.ruby-forum.com/u/deneb)\
**Post date:** [January 5, 2012, 7:14am UTC](https://www.ruby-forum.com/t/nginx-form-input-problem/215457/5 "2012-01-05T07:14:29Z")

</div>

Unai thank-you so much for your help and pointing me in the right  
direction. I just did a test and now the forms are working. I can  
write to a text file and when I changed it to see if I could write to a  
database I did not get the 502 BAD Gateway Error. (Instead I got a  
message saying it couldn’t connect to the database…but I think this  
is my error…going to set up a new dBase and test again.)

I must say you folks that hang out here are absolutley brilliant!

Posted at Nginx Forum:

> **[Re: NGinX Form Input Problem](https://forum.nginx.org/read.php?2,220816,220825#msg-220825)**
>
> I have just recently set-up a new LEMP in Ubuntu 11.10 (64-bit) and running NGinX ver 1.0.5. the server is running fine but I cannot seem to get any forms to work. On my old server (windows) the forms worked fine, but now I get the following error...

---

<div class="post-metadata">

**Author:** ![deneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@deneb](https://www.ruby-forum.com/u/deneb)\
**Post date:** [January 5, 2012, 6:45am UTC](https://www.ruby-forum.com/t/nginx-form-input-problem/215457/6 "2012-01-05T06:45:31Z")

</div>

okay…I retraced my installation of PHP and it looks like I had never  
started a PHP FastCGI daemon (if that makes any sense) now I am able to  
see the php info page. I can also see under modules that MySQL is  
running. I am going to test my forms again right now.

Posted at Nginx Forum:

> **[Re: NGinX Form Input Problem](https://forum.nginx.org/read.php?2,220816,220824#msg-220824)**
>
> I have just recently set-up a new LEMP in Ubuntu 11.10 (64-bit) and running NGinX ver 1.0.5. the server is running fine but I cannot seem to get any forms to work. On my old server (windows) the forms worked fine, but now I get the following error...

---

<div class="post-metadata">

**Author:** ![deneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@deneb](https://www.ruby-forum.com/u/deneb)\
**Post date:** [January 5, 2012, 10:25am UTC](https://www.ruby-forum.com/t/nginx-form-input-problem/215457/7 "2012-01-05T10:25:30Z")

</div>

Sure, you are very welcome, take care

Unai R.  
CTO & Cofounder  
LeanWired LLP  
Singapore 168977  
[www.leanservers.com](http://www.leanservers.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![deneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@deneb](https://www.ruby-forum.com/u/deneb)\
**Post date:** [January 5, 2012, 10:15am UTC](https://www.ruby-forum.com/t/nginx-form-input-problem/215457/8 "2012-01-05T10:15:38Z")

</div>

Forms are writing to the database! Thanks Unai, and have a great day!

Posted at Nginx Forum:

> **[Re: NGinX Form Input Problem](https://forum.nginx.org/read.php?2,220816,220828#msg-220828)**
>
> I have just recently set-up a new LEMP in Ubuntu 11.10 (64-bit) and running NGinX ver 1.0.5. the server is running fine but I cannot seem to get any forms to work. On my old server (windows) the forms worked fine, but now I get the following error...
