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


Skip to content
  • Create cron in LAMP

    Solved LAMP
    5
    0 Votes
    5 Posts
    54 Views
    matix131997M

    Thanks, it works!

  • 1 Votes
    7 Posts
    116 Views
    J

    The things we learn going through the support requests!

  • 0 Votes
    8 Posts
    170 Views
    matix131997M

    I am back after a small test.

    @timconsidine Yes it is a large number of small files.

    After checking with different formats. Only started to work as it should with ".tar" format. It works like lightning with a new folder or in the current folder where the application is located.
    With this format, the extraction takes in a second and is ready.

    And I use a server from Hetzner - CX41 (Intel, 160GB Disk and 16GB RAM).

    EDIT:

    I would still add that I had resources allocated during the test: 4GB ram and 75% CPU. I still checked with the standard one, i.e. 256MB ram and 50% CPU - with ".tar" format it extracts just as fast.

  • 0 Votes
    8 Posts
    481 Views
    R

    @girish That works great! Many many thanks for you prompt support!

  • 0 Votes
    7 Posts
    318 Views
    M

    @girish thanks, I usually fire up a fresh one and use duplicator to migrate it to the live domain 😉

  • How to switch PHP version?

    Support
    3
    0 Votes
    3 Posts
    291 Views
    girishG

    @ritesh What PHP version are you looking for? Usually, we make a new version of the LAMP stack as new versions come out. I guess maybe it's time for PHP 8 (if that's what you are looking for).

  • 0 Votes
    6 Posts
    414 Views
    girishG

    @msbt the old LAMP app will be left as-is. So, no change to that in the foreseeable future.

  • 0 Votes
    9 Posts
    631 Views
    girishG
    apt install -y cron apache2-dev php7.4 php7.4-{bcmath,bz2,cgi,cli,common,curl,dba,dev,enchant,fpm,gd,gmp,imap,interbase,intl,json,ldap,mbstring,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,soap,sqlite3,sybase,tidy,xml,xmlrpc,xsl,zip} libapache2-mod-php7.4 php-{apcu,date,geoip,gettext,imagick,gnupg,mailparse,pear,redis,twig,uuid,validate,zmq} ghostscript libgs-dev ffmpeg && \

    is what we install. exiftool is there in the base image.

  • 0 Votes
    14 Posts
    929 Views
    girishG

    @saikarthik said in IMAP port and server settings for LAMP app mail client:

    What I blurred out in the picture is actually a valid cloudron mailbox ID.

    Yes, but it seems there is some extra text before it like Test User: "Test User". Can you remove that and try?

  • 0 Votes
    3 Posts
    355 Views
    M

    hi @girish . great info, thanks. I will try it out.

  • Support at command in LAMP app

    Moved Solved LAMP
    5
    0 Votes
    5 Posts
    245 Views
    alex-adestechA

    @girish you're a genius man! I think it should work, I'll try it and come back. Thanks!!

  • 0 Votes
    3 Posts
    250 Views
    murgeroM

    @girish Thanks! I was hoping to get an official feature going - but thanks, I'll check the link out!

  • 1 Votes
    9 Posts
    470 Views
    girishG

    @Nicolas One way to avoid this mistake is use getenv('CLOUDRON_MYSQL_USERNAME'), getenv('CLOUDRON_MYSQL_DATABASE') instead of the raw values. This way when you migrate next time, it will pick up the correct database connection values.

    The full env list for MySQL is at https://cloudron.io/documentation/custom-apps/addons/#mysql

  • Disable Strict Mode Mysql

    Moved Solved LAMP
    18
    0 Votes
    18 Posts
    3k Views
    O

    @girish Thanks for your prompt reply. Ok I will try to contact them to inquire about this. Will keep you guys updated. Best wishes !

  • LAMP stack with Postgres

    Solved Support
    7
    1 Votes
    7 Posts
    720 Views
    girishG

    I put a package at https://git.cloudron.io/cloudron/php7.3-postgres-app/ . This is a PHP 7.3 app that has postgres.

  • 0 Votes
    10 Posts
    700 Views
    girishG

    @Trankery Yup, I will mark this as a feature request for a future release.

  • Lamp App with Git

    Moved Solved LAMP
    5
    0 Votes
    5 Posts
    502 Views
    murgeroM

    @girish & @jdelon02

    I believe LAMP app supports cron, in that case use the following script to auto-pull from a git repo whenever an update is pushed to that repo:

    Put in /app/data/updateGit

    #!/bin/sh ## CD to the path where the app is installed. cd /app/data/public UPSTREAM=${1:-'@{u}'} LOCAL=$(git rev-parse @) REMOTE=$(git rev-parse "$UPSTREAM") BASE=$(git merge-base @ "$UPSTREAM") if [ $LOCAL = $REMOTE ]; then echo "Up-to-date" elif [ $LOCAL = $BASE ]; then echo "Need to pull" git pull elif [ $REMOTE = $BASE ]; then echo "Need to push? Some files changed / commited here, this should not have happened." else echo "Diverged?? Help!" fi

    Then in /app/data/crontab:

    */5 * * * * bash /app/data/updateGit 2>&1 ## Or if you wanna avoid filling logs: */5 * * * * bash /app/data/updateGit 2>&1 > /dev/null

    This will check if a pull is needed from a repo every 5 minutes. (Re: https://crontab.guru/every-5-minutes)

    You can also modify the bash script to rebuild, npm install, composer install, etc when needed too.

  • Using MongoDB instead of MySQL in a LAMP app?

    Moved Solved LAMP
    7
    0 Votes
    7 Posts
    580 Views
    S

    @girish sorry for spamming this old thread. I added a complete new post: https://forum.cloudron.io/topic/4203/git-push-ci-cd-workflow-for-the-lamp-app

  • ionCube PHP Loader not detected

    Moved Solved LAMP
    4
    0 Votes
    4 Posts
    306 Views
    girishG

    @hdavy2002 Pushed an update to fix this now.

  • Shlink on LAMP, APC absent?

    Moved Solved LAMP
    9
    0 Votes
    9 Posts
    286 Views
    yusfY

    Okay, I understand. It's fine by me.

    The separate admin panel's latest release just renders a blank page for me (locally and on LAMP) ¯_(ツ)_/¯