Lilap
By:
Lilap

NGINX + PHP7-FPM = Gives Blank Pages

October 21, 2016 217 views
WordPress Nginx PHP Ubuntu 16.04

Hello,

So I have an NGINX + PHP7-FPM setup and the whole wordpress website works great... except... for when I do thiing such as letting the plugins do work.

What I mean by this is that when a plugin is importing photos or when it needs to change some settings etc using javascript, pages do not render properly or it gives me blank white pages.

Not too sure what is going on, but a guess would be that my setup is not allowing Javascript or any script without user input to be automatically executed within my server.

Anyone have had this problem or know any fixes?

Thanks

1 Answer

You don't have to do anything to allow JavaScript server-side. JavaScript is executed on client-side in browser unlike PHP which is executed on server.
Some basic explanation would be that JavaScript is fetched via your browser as text (just like html) and it your browser parses it to show content.
There are possibilities that uses JavaScript server-side but this is not your problem as all WP plugins is classic JS that executes in browser.

You must make sure that your browser have JavaScript enabled. Consider help for that, as it is different from browser to browser. Also does that JS code/plugin support your browser. Also try from some mainstream browser like Chrome and Firefox or even other machine. Note that Internet Explorer could not work at all with some of JS code so it's recommended to use another browser.

Beside that check does plugins that make problems even support PHP7. If they don't that could make problems.
Also verify that you have required PHP dependencies. There are some that is recommended to be installed:

  • sudo apt-get install php7.0-mysql php7.0-curl php7.0-gd php7.0-mbstring php7.0-mcrypt php7.0-xml php7.0-xmlrpc

Maybe even logs will help you. Try to find nginx logs and see is there something useful.
Usually log is located in /var/log/nginx/error.log which you can open with any text editor.
You can check whole directory (ls /var/log/nginx/) to see is there other logs.

Have another answer? Share your knowledge.