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.
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.
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:
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!
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.