Php won't work. (Noob Level)

  • Posted December 28, 2013


I tried 4 different OS but php didn’t work in any.

Now I’m on CentOS 6.5 x64 with nginx mysql & php If i go to “info.php” i got simply “nginx error!”

What shoould I do?



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

On Ubuntu, you have to create the <code>info.php</code> file, manually. <i>See</i> <a href=“”>How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 12.04</a>.

What exact error do you get?

That’s my default.conf ; <br> <br> <br>server { <br> listen 80; <br> server_name; <br> <br> #charset koi8-r; <br> <br> #access_log logs/host.access.log main; <br> <br> location / { <br> root /usr/share/nginx/html; <br> index index.html index.htm index.php; <br> } <br> <br> error_page 404 /404.html; <br> location = /404.html { <br> root /usr/share/nginx/html; <br> } <br> <br> # redirect server error pages to the static page /50x.html <br> # <br> error_page 500 502 503 504 /50x.html; <br> location = /50x.html { <br> root /usr/share/nginx/html; <br> } <br> <br> # proxy the PHP scripts to Apache listening on <br> # <br> #location ~ .php$ { <br> # proxy_pass; <br> #} <br> <br> # pass the PHP scripts to FastCGI server listening on <br> # <br> location ~ .php$ { <br> root /usr/share/nginx/html; <br> fastcgi_pass; <br> fastcgi_index index.php; <br> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; <br> include fastcgi_params; <br> } <br>