Difference between revisions of "IMAGEBROWSER"
Jump to navigation
Jump to search
| Line 30: | Line 30: | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
</pre> | </pre> | ||
5. Configure app on the server | |||
<pre> | <pre> | ||
cd /var/www/html | |||
cp config/config.example.php config/config.php | |||
nano config/config.php | |||
</pre> | |||
'''Set these values''' | |||
<pre> | |||
'base_url' => '', | |||
'categories_dir' => __DIR__ . '/../categories', | |||
'thumbnail_dir' => __DIR__ . '/../cache/thumbs', | |||
'db' => [ | |||
'host' => '127.0.0.1', | |||
'port' => 3306, | |||
'database' => 'imagebrowser', | |||
'username' => 'imagebrowser_user', | |||
'password' => 'your-strong-password', | |||
'charset' => 'utf8mb4', | |||
], | |||
</pre> | </pre> | ||
'''Use base_url => '' if the app is at the domain root. If installed in a subfolder like /gallery, use:''' | |||
'base_url' => '/gallery', | |||
6. Set Permissions | |||
'''Apache/PHP must be able to read categories/ and write to cache/ and uploads:''' | |||
<pre> | <pre> | ||
sudo chown -R www-data:www-data /var/www/html/cache /var/www/html/uploads /var/www/html/categories | |||
sudo chmod -R 775 /var/www/html/cache /var/www/html/uploads /var/www/html/categories | |||
</pre> | |||
7. Apache Setup | |||
'''Check which document root Apache is actually serving:''' | |||
sudo apachectl -S | |||
<pre> | <pre> | ||
Revision as of 16:33, 29 May 2026
Server Setup
1. upload contents to web folder
Even if PHP is already installed, confirm MySQL and GD support:
sudo apt update sudo apt install php-mysql php-gd exiftool php -v php -m | grep -E 'pdo_mysql|gd'
Create Database
In phpMyAdmin:
Create a database, for example imagebrowser.
Use collation utf8mb4_unicode_ci.
Import:
database/schema.sql
4. Create MySQL User
You can do this in phpMyAdmin, or with MySQL CLI:
CREATE USER 'imagebrowser_user'@'localhost' IDENTIFIED BY 'your-strong-password'; GRANT ALL PRIVILEGES ON imagebrowser.* TO 'imagebrowser_user'@'localhost'; FLUSH PRIVILEGES;
5. Configure app on the server
cd /var/www/html cp config/config.example.php config/config.php nano config/config.php
Set these values
'base_url' => '',
'categories_dir' => __DIR__ . '/../categories',
'thumbnail_dir' => __DIR__ . '/../cache/thumbs',
'db' => [
'host' => '127.0.0.1',
'port' => 3306,
'database' => 'imagebrowser',
'username' => 'imagebrowser_user',
'password' => 'your-strong-password',
'charset' => 'utf8mb4',
],
Use base_url => if the app is at the domain root. If installed in a subfolder like /gallery, use:
'base_url' => '/gallery',
6. Set Permissions
Apache/PHP must be able to read categories/ and write to cache/ and uploads:
sudo chown -R www-data:www-data /var/www/html/cache /var/www/html/uploads /var/www/html/categories sudo chmod -R 775 /var/www/html/cache /var/www/html/uploads /var/www/html/categories
7. Apache Setup
Check which document root Apache is actually serving:
sudo apachectl -S