This project also requires PHP 8.1 and was made with Ubuntu 22.04 LTS and Nginx in mind, so I reccommend running this gallery on such.
With Nginx, you may need to configure the ```/etc/nginx/sites-available/default.conf``` for the new version on PHP. You must find the allowed index list and add index.php as such:
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
Then you have to find the ```fastcgi-php``` configuration and uncomment the lines and update the php version to 8.1 and now the config should look like the following:
With that, you may need to increase the ```client_max_body_size``` in the ```nginx.conf```, which should be located under ```/etc/nginx/nginx.conf```. There make sure your ```http``` looks like this:
http {
client_body_buffer_size 16K;
client_header_buffer_size 1k;
client_max_body_size 32M;
Most important of them being ```client_max_body_size```.
If you made it this far, congrats! We're not even close to done. Next you will need to setup your database. If you're running a seperate server for databases, that'll also work.
You first need to head over to ```app/server/conn.php``` and set the correct information, if you're using localhost, this should be the following details:
I recommend using a database name such as Gallery, but others should work just as well.
I also recommend not using root for this and setting up a user specifically for this, but I will not go through the process of making a such user here.
In the ```app/settings/manifest.json``` you have a list of infomation about your website. You must change ```user_name``` to your prefered name, ```is_testing``` to false (or anything else) as that is used for development and ```upload_max``` to your prefered file size max in MBs.
Since there is currently no automated install script for this gallery, you'll have to make your own folders to hold images in. To do that, go into the root directory of the gallery and type the following commands:
This'll make 3 new folders. That is where all the uploaded images will be held in. But before you go anywhere, you will need to ```chown``` the folders so Nginx can access the images within them, so do the following:
Head over to the Login section off the app and click the __Need an account__ button, from there you can enter your own details. Once you get to the token section enter __UserToken__. And with that, you have now set up your own image gallery!
As an admin, you can do things such as modifying other people's posts, reseting users passwords and checking logs for sussy behaviour. With that, use these tools with respect to others and don't abuse them.
If you trust someone enough, you can set them to a moderator through the settings > users > toggle admin. You can tell who is an admin by the green highlight to the left of their name.
### Images
Uploading images is as simple as choosing the image you want to upload, then clicking upload! Keep in mind that not all formats play well as this gallery uses Imagik to generate thumbnails and preview images, so images such as GIFs do not work as of now. Supported file formats include JPG, JPEG, PNG and WEBP.
You should also keep in mind the file size, by default images of 20MBs should be able to get uploaded. But if you run into issues, either raise the file size in the ```manifest.json``` or locate your ```php.ini``` on your webserver, usually under ```/etc/php/8.1/fpm/php.ini```, and modify ```upload_max_filesize```, then ```post_max_size``` to a same or greater value.