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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. Try install OpnForm

Try install OpnForm

Scheduled Pinned Locked Moved Solved LAMP
15 Posts 6 Posters 2.6k Views 6 Watching
  • 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.
  • R riamehdi

    I try to install https://github.com/JhumanJ/OpnForm on LAMP app.
    Impossible to set PHP 8.2 always stay at PHP 8.1. I reboot not happen.
    The doc : https://docs.cloudron.io/apps/lamp/#supported-php-versions not work.

    I tray also install npm modules. Get error NPM not found in user www-data !
    The doc : https://docs.cloudron.io/apps/lamp/#composer also not work.

    How fix these two issues ?

    girishG Offline
    girishG Offline
    girish
    Staff
    wrote on last edited by
    #4

    @riamehdi said in Try install OpnForm:

    Impossible to set PHP 8.2 always stay at PHP 8.1. I reboot not happen.

    How are you checking if PHP version is incorrect ?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      riamehdi
      wrote on last edited by riamehdi
      #5
      root@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:/app/code# su - www-data
      www-data@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:~$ cat /app/data/PHP_VERSION 
      ; Set the desired PHP version in this file
      ; Restart app for changes to take effect
      PHP_VERSION=8.2
      www-data@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:~$ php -version
      PHP 8.1.24 (cli) (built: Oct  6 2023 09:46:42) (NTS)
      Copyright (c) The PHP Group
      Zend Engine v4.1.24, Copyright (c) Zend Technologies
          with the ionCube PHP Loader v13.0.2, Copyright (c) 2002-2023, by ionCube Ltd.
          with Zend OPcache v8.1.24, Copyright (c), by Zend Technologies
      www-data@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:~$ 
      

      I reboot and stop and restart, it has no effect.

      girishG 1 Reply Last reply
      0
      • robiR Offline
        robiR Offline
        robi
        wrote on last edited by
        #6
        root@591fdddd-9946-470f-b7ce-03859c924ec7:/app/code# ll /usr/bin/php
        lrwxrwxrwx 1 root root 21 Oct 16 12:34 /usr/bin/php -> /etc/alternatives/php*
        root@591fdddd-9946-470f-b7ce-03859c924ec7:/app/code# ll /etc/alternatives/php
        lrwxrwxrwx 1 root root 15 Oct 16 12:38 /etc/alternatives/php -> /usr/bin/php8.1*
        root@591fdddd-9946-470f-b7ce-03859c924ec7:/app/code# 
        

        that does appear to be the wrong symlink in the CLI, however, the PHP apps from the web side seem to use the right version. https://lamp.demo.cloudron.io/

        Conscious tech

        1 Reply Last reply
        0
        • R riamehdi
          root@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:/app/code# su - www-data
          www-data@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:~$ cat /app/data/PHP_VERSION 
          ; Set the desired PHP version in this file
          ; Restart app for changes to take effect
          PHP_VERSION=8.2
          www-data@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:~$ php -version
          PHP 8.1.24 (cli) (built: Oct  6 2023 09:46:42) (NTS)
          Copyright (c) The PHP Group
          Zend Engine v4.1.24, Copyright (c) Zend Technologies
              with the ionCube PHP Loader v13.0.2, Copyright (c) 2002-2023, by ionCube Ltd.
              with Zend OPcache v8.1.24, Copyright (c), by Zend Technologies
          www-data@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:~$ 
          

          I reboot and stop and restart, it has no effect.

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by girish
          #7

          @riamehdi the PHP CLI version is mentioned as a note in the doc page you linked. You have to use the php8.2 binary instead. If you use apache and phpinfo() it should says 8.2 as well. This is an unfortunate side effect of our packaging system (it's hard to fix up symlinks at run time on a readonly filesystem)

          8ea68853-2372-4faa-8e75-da5aa0bf4fd7-image.png

          1 Reply Last reply
          0
          • R Offline
            R Offline
            riamehdi
            wrote on last edited by
            #8

            You're right @girish
            I do have: PHP 8.2.11 displayed on Laravel base page.

            I used this Composer command via PHP 8.2 :

            php8.2 /usr/bin/composer install
            

            If it helps others.

            Néanmois, pour la partie NPM, je suis bloqué.

            Comment installer avec l'utilisateur root ou www-data ?
            Avec l'utilisateur www-data, j'ai cette erreur :

            www-data@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:~/OpnForm$ npm install
            -bash : npm : commande non trouvée
            

            Avec l'utilisateur root, j'ai cette erreur :

            root@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:/app/data/OpnForm# npm install
            npm ERR! code EROFS
            npm ERR! syscall open
            npm ERR! path /root/.npm/_cacache/tmp/29927d23
            npm ERR! errno -30
            npm ERR! rofs EROFS: read-only file system, open '/root/.npm/_cacache/tmp/29927d23'
            npm ERR! rofs Often virtualized file systems, or other file systems
            npm ERR! rofs that don't support symlinks, give this error.
            
            npm ERR! Log files were not written due to an error writing to the directory: /root/.npm/_logs
            npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
            
            girishG 1 Reply Last reply
            0
            • R riamehdi

              You're right @girish
              I do have: PHP 8.2.11 displayed on Laravel base page.

              I used this Composer command via PHP 8.2 :

              php8.2 /usr/bin/composer install
              

              If it helps others.

              Néanmois, pour la partie NPM, je suis bloqué.

              Comment installer avec l'utilisateur root ou www-data ?
              Avec l'utilisateur www-data, j'ai cette erreur :

              www-data@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:~/OpnForm$ npm install
              -bash : npm : commande non trouvée
              

              Avec l'utilisateur root, j'ai cette erreur :

              root@49e68d6c-00e4-4ad6-b381-6cde1e1268b8:/app/data/OpnForm# npm install
              npm ERR! code EROFS
              npm ERR! syscall open
              npm ERR! path /root/.npm/_cacache/tmp/29927d23
              npm ERR! errno -30
              npm ERR! rofs EROFS: read-only file system, open '/root/.npm/_cacache/tmp/29927d23'
              npm ERR! rofs Often virtualized file systems, or other file systems
              npm ERR! rofs that don't support symlinks, give this error.
              
              npm ERR! Log files were not written due to an error writing to the directory: /root/.npm/_logs
              npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
              
              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #9

              @riamehdi try changing the default cache location, like npm install --cache /tmp/cache .

              (This should already work by default but looks like something went wrong, I am investigating)

              1 Reply Last reply
              0
              • girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #10

                Indeed, there was a bug in the base image that /root/.npm is not symlinked properly. This is fixed now but a new base image will be released only in 6 months or so. For the moment, just use the above workaround.

                1 Reply Last reply
                3
                • R Offline
                  R Offline
                  riamehdi
                  wrote on last edited by
                  #11

                  the workaround does work.
                  Thank you

                  1 Reply Last reply
                  3
                  • nebulonN nebulon marked this topic as a question on
                  • nebulonN nebulon has marked this topic as solved on
                  • Dave SwiftD Offline
                    Dave SwiftD Offline
                    Dave Swift
                    wrote on last edited by
                    #12

                    Sorry to change topics, but this looks like a great app that would fill a gap in Cloudron's offering. Before I put it in the App Wishlist, what do you think of it? Does the AI feature work when self-hosting? I tried it on their site and it was pretty impressive.

                    jdaviescoatesJ 1 Reply Last reply
                    2
                    • R Offline
                      R Offline
                      riamehdi
                      wrote on last edited by riamehdi
                      #13

                      Salut @Dave-Swift, yes, AI works well in self-hosting via a LAMP server. All you need is an OpenAI API key. It's really impressive!
                      I haven't been able to secure the application with a simple environment variable to block registrations. Any ideas?
                      For now simple action :

                      // Route::post('register', [RegisterController::class, 'register']);
                      

                      from routes/api.php 😉

                      1 Reply Last reply
                      2
                      • Dave SwiftD Dave Swift

                        Sorry to change topics, but this looks like a great app that would fill a gap in Cloudron's offering. Before I put it in the App Wishlist, what do you think of it? Does the AI feature work when self-hosting? I tried it on their site and it was pretty impressive.

                        jdaviescoatesJ Offline
                        jdaviescoatesJ Offline
                        jdaviescoates
                        wrote on last edited by
                        #14

                        @Dave-Swift said in Try install OpnForm:

                        this looks like a great app that would fill a gap in Cloudron's offering. Before I put it in the App Wishlist

                        Agree, please do go ahead and add it 🙂

                        I use Cloudron with Gandi & Hetzner

                        1 Reply Last reply
                        2
                        • G Offline
                          G Offline
                          GusBotsford
                          wrote on last edited by
                          #15

                          Thank you so much all, for your suggestion, it solved my problem also.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Bookmarks
                          • Search