PHP Pages are not displaying

Hello, I want to enable php in MITB to use a register page,
I’ve followed the instructions
location ~* .php$ {
include fastcgi_params;
fastcgi_pass php-fpm;
fastcgi_index index.php;
cd /root mailinabox/tools/webupdate
nginx -s reload

I don’t have any errors, but my php pages (even phpinfo) aren’t displaying (sourcecode is blank too)
What can I do ?

Not serve PHP from Mail-in-a-Box. There is a good reason that it is unsupported.

If only I could use registration without PHP…


For what reason does it have to be on the same server? None.

Oh I didn’t know that it was possible to use the script on an another server (i’m a beginner in web developpment)

Thank you!

It all depends on the script and how it is written!

What is the end goal here?

To install this:


Can you please specify which of the two scenarios you need to accomplish.

  1. Have random users sign up for their own email account.

  2. Have the ability for an ‘admin’ to register users for email accounts. (So that they do not have direct admin access to your admin area)

There is a better option available if your true goal is #2.

In the meantime perhaps @murgero will be able to shed some light on the script not working properly. I believe he wrote it before PHP7 was in wide use, but am not certain.

P.S. I too have tried to install this and am not successful either, though I know that others have been able to in the past.

I want to accomplish the #2 scenario (MIAB is for a local usage)

So, what can I do to do the script working ? Downgrade php? :frowning:

Look at this instead: @hardilliam

Username: [redacted]

Password: [redacted]

If anyone would like to demo this script, PM me.

The above is a live working demo of:

This script can be installed on any web hosting outside of the MiaB itself. Alternatively, I can host it for $3/month or $25/year.

1 Like

But, randoms users cannot registrate themselves?

EDIT: I’m so sorry, I didn’t noticed that I told you that I wanted to do the #2 option but it’s the #1! I want that random user can registrate themselves in MIAB

(Sorry to have wasted your time.)

No, they cannot. I am not a PHP programmer so I am not able to determine why the script is only returning a blank screen when run.

With luck @murgero will comment.

@hardilliam - Did you follow this guys comment to enable PHP: If you did you will need to restart the mailinabox service as well I believe: Is atleast being able to toggle PHP planned?

Lemme try that real quick - nice to see you btw! @murgero

1 Like

Also, please check /var/log/nginx/ for any errors in the PHP - It’s quite possible there is an error with the newer version of MIAB

Sure! But it seems that the “MySql part” of the script isn’t working.
Like I said, when I press the “Submit” button, I don’t get any errors or success message, it just redirect to the index.php page.


None of my MIAB use MySQL, so I am not sure what you are referring to.

There is where MIAB is installed >>
(I thought there was MySql in your script (I’m not a dev lol))

There is the logs
error.log -
access.log -
register.php (password edited) -

In the directory where you are storing the script, please update:

git pull origin master I made a few modifications which may resolve your issue.

Edit: Please let me rewrite this script. The quality of this is not up to my new standards. If you can give me a couple days, I can work something out here.

1 Like