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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved opcache.enable

    LAMP
    2
    6
    299
    Loading More Posts
    • 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.
    • C
      ccfu last edited by

      I am trying to enable opcache in a LAMP app. The master value in the php info shows that opcache.enable is On but the local value is Off and adding opcache.enable=1 to php.ini does not seem to do anything.

      I am sure this is quite trivial and I am almost certainly overlooking something here, but I just can't work it out. Anybody able to point me in the right direction here?

      girish 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff @ccfu last edited by

        @ccfu Tried this PHP file in a fresh LAMP 7.4 app:

        <?php
          phpinfo(); 
        ?>
        

        And I get:
        038f601b-61ae-4fd9-8f61-007b9ece32da-image.png

        1 Reply Last reply Reply Quote 0
        • girish
          girish Staff last edited by

          I pushed a new package that enables opcache explicitly. Don't think it changes anything since it was already enabled in the previous package as well.

          C 1 Reply Last reply Reply Quote 0
          • C
            ccfu @girish last edited by ccfu

            @girish Thanks for looking into this. With the new package opcache.enable_cli is now ON which was OFF before, otherwise no change as far as I can tell.

            I can, however, confirm that in a fresh install opcache.enable is ON as in your screenshot and indeed other sites installed in a LAMP app also show that opcache.enable is ON. I am now wondering whether the fact that the webroot in this instance has been changed in the apache.conf to a folder immediately below /app/data/public is the reason. I can't see why it should be, but that's the only thing I can think of right now. When I have time later I will install a new instance and see whether I can identify this or something else as the cause.

            girish 1 Reply Last reply Reply Quote 0
            • girish
              girish Staff @ccfu last edited by

              @ccfu Indeed, I did enable opcache for the CLI in the new package.

              C 1 Reply Last reply Reply Quote 0
              • C
                ccfu @girish last edited by

                @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.

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                Powered by NodeBB