NGinX Form Input Problem

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:
http://forum.nginx.org/read.php?2,220816,220816#msg-220816

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:
http://forum.nginx.org/read.php?2,220816,220820#msg-220820

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
[email protected]

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:
http://forum.nginx.org/read.php?2,220816,220822#msg-220822

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:
http://forum.nginx.org/read.php?2,220816,220825#msg-220825

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:
http://forum.nginx.org/read.php?2,220816,220824#msg-220824

Sure, you are very welcome, take care

Unai R.
CTO & Cofounder
LeanWired LLP
Singapore 168977
www.leanservers.com
[email protected]

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

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,220816,220828#msg-220828

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs