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


Skip to content

LAMP

129 Topics 840 Posts
  • Scalar - a PHP/MySQL program - Need Installation Troubleshooting Help

    Moved Solved
    3
    0 Votes
    3 Posts
    444 Views
    nebulonN

    @jagan thanks for sharing the solution!

  • Mysql "loading local data disabled" error

    Solved
    3
    0 Votes
    3 Posts
    570 Views
    ShaiS

    @girish the local_infile is the approach the app uses to load data sets for optional functionality. I'll go to the forum for OpenEMR and see if there is a way for me to manually upload the data instead of being done through the webapp UI.

  • 0 Votes
    4 Posts
    567 Views
    ShaiS

    @girish Thank you!

  • Lamp mail don't work

    Moved
    6
    0 Votes
    6 Posts
    576 Views
    girishG

    I was able to send mails with PHPMailer.

    <?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; $sender = getenv('CLOUDRON_MAIL_FROM'); $senderName = 'LAMP Test Email'; $recipient = 'test@cloudron.io'; $usernameSmtp = getenv('CLOUDRON_MAIL_SMTP_USERNAME'); $passwordSmtp = getenv('CLOUDRON_MAIL_SMTP_PASSWORD'); $host = getenv('CLOUDRON_MAIL_SMTP_SERVER'); $port = (int) getenv('CLOUDRON_MAIL_SMTP_PORT'); $subject = 'Cloudron test (SMTP interface accessed using PHP)'; $bodyText = "Email Test\r\nThis email was sent through the Cloudron SMTP interface using the PHPMailer class."; $bodyHtml = '<h1>Email Test</h1>'; $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->setFrom($sender, $senderName); $mail->Username = $usernameSmtp; $mail->Password = $passwordSmtp; $mail->Host = $host; $mail->Port = $port; $mail->SMTPAuth = true; $mail->addAddress($recipient); $mail->isHTML(true); $mail->Subject = $subject; $mail->Body = $bodyHtml; $mail->AltBody = $bodyText; $mail->Send(); echo "Email sent!" , PHP_EOL; } catch (phpmailerException $e) { echo "An error occurred. {$e->errorMessage()}", PHP_EOL; //Catch errors from PHPMailer. } catch (Exception $e) { echo "Email not sent. {$mail->ErrorInfo}", PHP_EOL; } ?>

    (Adapted from https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-php.html )

  • LAMP composer: command not found

    Moved
    8
    0 Votes
    8 Posts
    877 Views
    girishG

    @thenils I have pushed a new package, can you please check? It should have composer 2.1.8

  • Update to PHP8

    9
    0 Votes
    9 Posts
    1k Views
    girishG

    @argovaerts @darkben The latest package supports PHP 8. See https://docs.cloudron.io/apps/lamp/#supported-php-versions on how to switch.

  • No php error

    Moved
    2
    0 Votes
    2 Posts
    315 Views
    nebulonN

    @softdoctor hi there, not sure how this is related to Cloudron. On Cloudron apps are installed in their own containers, did you try to use the lamp app for this?

  • Is it possible to give PHP apps precedence over HTML pages?

    Moved Solved
    4
    0 Votes
    4 Posts
    500 Views
    D

    @girish Thanks!

  • Verify Cron is Running

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    J

    @girish said in Verify Cron is Running:

    1 * * * * (echo "Trigger is running now"; /usr/bin/php -d memory_limit=-1 -d max_execution_time=0 /app/data/public/path/to/task/trigger.php) > /proc/$(cat /var/run/crond.pid)/fd/1 2>&1

    Perfect, thank you so much! That worked out very well!

  • opcache.enable

    Solved
    6
    0 Votes
    6 Posts
    703 Views
    C

    @girish Embarassingly it appears ther script that I was loading the php info through had specifically set opcache.enable to Off at runtime. In the app itself it is enables and all is good. Thanks again and apologies for the unnecessary effort in pushing a new package.

  • Install a docker container on a LAMP app

    3
    0 Votes
    3 Posts
    441 Views
    ei8fdbE

    @nebulon said in Install a docker container on a LAMP app:

    I think the easiest production-ready app package with go is https://git.cloudron.io/cloudron/simple-torrent-app maybe you can check that as reference.

    Thanks @nebulon I'll take a look at it. Packaging is still something I'm not fully sure about.

  • This topic is deleted!

    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Adding mcrypt extension

    Solved
    7
    0 Votes
    7 Posts
    860 Views
    robiR

    @nebulon you just run the update command(s)

  • LAMP Laravel and npm

    Moved Solved
    7
    0 Votes
    7 Posts
    916 Views
    nebulonN

    @deiwee I guess you would want to run it as www-data user though to not mess with file permissions. Did you get any error messages in the log? Of course after app restart it will always take at most a minute to kick the cron according to schedule.

  • Internal Caching

    2
    0 Votes
    2 Posts
    315 Views
    girishG

    @jlx89 there is no internal cache. Can you just do a plain curl -v https://clonedapp.domain.com and see what is happening? Could it be that you have the domain hardcoded in your LAMP app and it's redirecting you to that location? This happens fairly often when cloning WP with misconfigured plugins.

  • Mysql ssl error and auto-increment not working

    7
    0 Votes
    7 Posts
    856 Views
    girishG

    @carbonbee don't think it matters but I will push an update to phpMyAdmin 5.1.0 - https://www.phpmyadmin.net/news/2021/2/24/phpmyadmin-510-released/

  • Creating a queue worker for laravel app?

    Moved
    14
    0 Votes
    14 Posts
    2k Views
    ?

    @girish Hah this actually helps me with the Humhub app. Thanks! My solution was to use sed to delete line 312 in /etc/php/7.4/cli/php.ini lmao. Jank to the extreme.

  • Proper IP Address and Hostname on Log

    Solved
    4
    0 Votes
    4 Posts
    427 Views
    girishG

    @nj I have fixed this in the new package. However, it will work only for new installation. For existing install, you have to edit /app/data/apache/app.conf and add the following lines (You can add it after the DocumentRoot /app/data/public line):

    LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy CustomLog "|/bin/cat" proxy ErrorLog "|/bin/cat"

    After that restart the app.

  • Adding a second db to php 7.4 app

    Solved
    2
    0 Votes
    2 Posts
    399 Views
    girishG

    @shai you have to build a custom app, please see this guide https://docs.cloudron.io/guides/multiple-databases-lamp/

  • Migrating Drupal 7 to Cloudron Lamp 7.4

    Moved Solved
    4
    0 Votes
    4 Posts
    536 Views
    ShaiS

    @girish

    But a random web search

    +1 for random web searches!

    led me to where someone suggests that "I had this issue in drush command line, when there was an error parsing the settings.php file

    That was it! A missing comma in the databases array. Thanks so much!