Solved Web app installer on LAMP Cloudron cannot connect to server.
I'm trying to install the photo management app Piwigo onto a Lamp Cloudron.
The Piwigo web installer is saying it cannot connect to the database.
I can log into the database via phpmyadmin.
On the installer fields on the web form I'm using the explicit credentials for mysql found in /app/data/credentials.txt. (My plan was to manually edit the file created by the installer after installation and replace the explicit credentials with the environment variables. I didn't get that far.)
Upon submit of the web form installer I get the error "Cannot connect to server."
@shai Did you go into the file manager and ensure the file permissions in /app/data/public/ are set to www-data? I had this issue a little while back and that was the issue.
@jlx89 File ownership is www-data. File permissions are 777 for the config directory.
scooke last edited by scooke
Is it not connecting to the db before the DB configuration page appears? Or after you've entered the info and pressed "Start Installation"? One thing that I regularly overlook is that the Connection ("Host" at the top of the 'Database connection' section) is not the usual "localhost", but "mysql" for the LAMP app. Be sure you've used that before we try to figure out anything else.
@scooke I get the error after I've entered the values and clicked "start installation."
Yes, I know that "mysql" is the value for "host" and not "localhost".
Thanks in advance for further troubleshooting.
scooke last edited by
Is the included .htaccess file messing things up in the public folder of the LAMP app? Try renaming it. I'm going to try an install myself tomorrow and see what pops up.
I was able to get this going by following the on screen instructions.
the database name and username are the same here, make sure to read
/app/data/folder as well.
Can you show any logs during the install, screenshots, etc so we can see what went wrong?
Shai last edited by Shai
@murgero I had downloaded the zip archive, pushed it to the Cloudron and then unzipped it. I got to the installer by just navigating to the site url. With the original method I never succeeded or figured out what the problem was.
However, I started over and this time used Piwigo's netinstaller option where I only push one php file and then navigate to that file... the install went perfectly, no problems connecting to db.
My next step is to manually go into the config file and replace the credentials there with Cloudron environment variables.
Thanks to you and @scooke and @JLX89 who responded with helpful suggestions.
scooke last edited by
@shai Glad to hear it, I was going to give it a try this weekend, so this saves me a bit of time. Congrats.