Creating new users using PHP not recognized by Apache 2.4

Solution 1:

Every time you add yourself to a group you need to log out and log back in for changes to take effect. The same thing is happening here, by restarting Apache you allow it to "log back in" and be in the user's group which then allows it to read and serve the user's files.