I am moving from a stand-alone PC to a VM in Proxmox.
I researched in the forum and it appeared to be a simple case of doing an SQL dump from the old system and copying the entire contents of the /vaw/www/piwigo folder.
Build the new VM (Ubuntu in my case) and install the LAMP stack.
Apache tested OK with the default page.
I rebuilt the database with MySQLdump and all tables are now there with their contents.
I edited the apache2.conf file in sites-enabled and it now points to the correct location, /var/www/piwigo
I created users piwigo_user and www-data and just to try to get it working ended up making them both admins. I also, in desperation, changed permissions to the entire /var.www/piwigo tree to 777 but still can't get it to work. I'm sure it's a user or permission issue but I'm out of my depth and can't find what they should be.
I didn't get as far as getting any error logs, all I got was the following error, so now I'm stuck. Any ideas, should I start again?
Piwigo encountered a non-coverable error
[mysql error]
Access denied for user 'piwigo_user'@'localhost' (using password: YES)
#1 my_error /var/www/piwigo/include/common.inc.php(122)
#2 include_once /var/www/piwigo/index.php(11)
Offline
Make sure your local/config/database.inc.php $conf['db_...'] settings match reality.
Offline
Thank you so much, I think I'm close now as it appears to be working. I will test it properly tomorrow and tighten down my permissions on the WWW tree (not 777 maybe 644?).
For info, I had to create the mySQL user and then grant them privileges. Your suggestion on where to look was just what I needed.
GRANT ALL PRIVILEGES ON piwigo_db.* TO 'piwigo_user'@'localhost' WITH GRANT OPTION;
Thanks again, it's been two days solid on this, but I'm happy now.
UPDATE on permissions in case it helps others I found this on a forum:
chown -R www-data:www-data /var/www/html/piwigo/
chmod -R 777 /var/www/html/piwigo/
Last edited by BobbyV (2024-02-26 13:13:11)
Offline
777 permissions are almost always unnecessary if not bad, see [Forum, post 183419 by erAck in topic 31993] What are the correct permissions for Piwigo files and directories ?.
Offline