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 daf04743f4c639a2
CLOUDRON_MYSQL_PASSWORD 9b4be33d18d2f70b382983deae93b8bb89bac433f8f706d5
CLOUDRON_MYSQL_DATABASE daf04743f4c639a2

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 www.stie.app@ypls.ac.id
CLOUDRON_MAIL_SMTP_PASSWORD 2624a0ac070cf4d50e0f5d99f43da2445a0d76a7abc7f80b
CLOUDRON_MAIL_FROM www.stie.app@ypls.ac.id
CLOUDRON_MAIL_DOMAIN ypls.ac.id

Redis Credentials

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

CLOUDRON_REDIS_URL redis://redisuser:819446a406393028dca49ee61e5425d840b11ab7896b36d5@redis-63715446-dac8-4c9e-801a-1ae06ae01462
CLOUDRON_REDIS_HOST redis-63715446-dac8-4c9e-801a-1ae06ae01462
CLOUDRON_REDIS_PORT 6379
CLOUDRON_REDIS_PASSWORD 819446a406393028dca49ee61e5425d840b11ab7896b36d5