Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Web app installer on LAMP Cloudron cannot connect to server.

    LAMP
    4
    9
    432
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Shai
      Shai last edited by

      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."

      Any ideas?

      J 1 Reply Last reply Reply Quote 0
      • J
        JLX89 @Shai last edited by JLX89

        @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.

        Shai 1 Reply Last reply Reply Quote 0
        • Shai
          Shai @JLX89 last edited by

          @jlx89 File ownership is www-data. File permissions are 777 for the config directory.

          1 Reply Last reply Reply Quote 0
          • scooke
            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.

            A life lived in fear is a life half-lived

            Shai 1 Reply Last reply Reply Quote 0
            • Shai
              Shai @scooke last edited by

              @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.

              murgero 1 Reply Last reply Reply Quote 0
              • scooke
                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.

                A life lived in fear is a life half-lived

                1 Reply Last reply Reply Quote 0
                • murgero
                  murgero App Dev @Shai last edited by

                  @shai Hello,

                  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 credentials.txt in /app/data/ folder as well.

                  Can you show any logs during the install, screenshots, etc so we can see what went wrong?

                  --
                  https://urgero.org
                  ~ Professional Nerd. Freelance Programmer. ~
                  Matrix: @murgero:urgero.org

                  Shai 1 Reply Last reply Reply Quote 2
                  • Shai
                    Shai @murgero 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 1 Reply Last reply Reply Quote 2
                    • scooke
                      scooke @Shai 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.

                      A life lived in fear is a life half-lived

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post
                      Powered by NodeBB