Cloudron LAMP App (PHP 7.3)


Overview

This page is a placeholder showing information on how to use the LAMP stack (PHP 7.3.17-1+ubuntu18.04.1+deb.sury.org+1) This page will get overwritten, when an index.php or index.html is uploaded. You can always access the database credentials from the file credentials.txt with SFTP.

The credentials shown here can only be used from within your app. They will not work from outside the Cloudron.


MySQL Credentials

Use the following environment variables in the PHP code to access MySQL:

CLOUDRON_MYSQL_HOST mysql
CLOUDRON_MYSQL_PORT 3306
CLOUDRON_MYSQL_USERNAME add8d2f255bae66a
CLOUDRON_MYSQL_PASSWORD 824dbd385888746908772635378245a9f91023dbdd310dda
CLOUDRON_MYSQL_DATABASE add8d2f255bae66a

phpMyAdmin Access

It is installed here. For login credentials see phpmyadmin_login.txt via SFTP.


Cron

Put a file called crontab into the directory /app/data and it will picked up at next app restart. It has to be in the cron syntax without username and must end with a newline. For example, the following crontab updates feeds every hour:

0 * * * * php /app/code/update.php --feeds

Commands are executed as the user www-data. Generate cron patterns via crontabgenerator.


Sendmail Credentials

Use the following environment variables in the PHP code to send email:

CLOUDRON_MAIL_SMTP_SERVER mail
CLOUDRON_MAIL_SMTP_PORT 2525
CLOUDRON_MAIL_SMTPS_PORT 2465
CLOUDRON_MAIL_SMTP_USERNAME lampphp73.app@bergesolutions.com
CLOUDRON_MAIL_SMTP_PASSWORD 826aa4b941be527df4d19fccab72eb572c1282b75dbbde6e
CLOUDRON_MAIL_FROM lampphp73.app@bergesolutions.com
CLOUDRON_MAIL_DOMAIN bergesolutions.com

Redis Credentials

Use the following environment variables in the PHP code to connect to Redis:

CLOUDRON_REDIS_URL redis://redisuser:0de11a0687ed8851f6e2f96aca761d6961e840b6d045bd60@redis-0fb224be-758a-4ee2-8e8c-11774e146656
CLOUDRON_REDIS_HOST redis-0fb224be-758a-4ee2-8e8c-11774e146656
CLOUDRON_REDIS_PORT 6379
CLOUDRON_REDIS_PASSWORD 0de11a0687ed8851f6e2f96aca761d6961e840b6d045bd60