For private non commercial use Single File PHP Gallery can be used for free.
When used commercially a donation for at least 10$ must be made per domain where it is used.

You are of course still more than welcome to donate if you like the gallery,
even though you only use it privately.

Under no circumstances can Single File PHP Gallery or any part of it be distributed or sold,
or be part of another work that is being distributed or sold.

Making a donation: Domain name must be clearly stated in the donation,
otherwise the donation will not grant use of the script under donating conditions.
Donations are not refundable.

Use the PayPal donate button on the page for donations: http://sye.dk/sfpg/

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.