Sunday, December 30, 2018

How to resolve OPCache configuration issue when install Moodle?

Software Required

- macOS High Sierra
- XAMPP-VM/PHP 7.3.0. Please refer to download
- Moodle version 3.6.1. Please refer to download

Problem
  • During the Moodle installation on XAMPP, OPCache plugin checking message is displayed. Please refer to the screenshot below

Steps
  • To check the location of php.ini, browse to http://localhost:8080/dashboard/phpinfo.php
  • Obviously, php.ini is located at "/opt/lampp/etc/" directory
  • Uncomment ";" at the line 1031 to enable opcache library
zend_extension=opcache.so
    • Append the opcache configuration as shown below
    [opcache]
    opcache.enable = 1
    opcache.memory_consumption = 128
    opcache.max_accelerated_files = 10000
    opcache.revalidate_freq = 60
    
    ; Required for Moodle
    opcache.use_cwd = 1
    opcache.validate_timestamps = 1
    opcache.save_comments = 1
    opcache.enable_file_override = 0
    
    ; If something does not work in Moodle
    ;opcache.revalidate_path = 1 ; May fix problems with include paths
    ;opcache.mmap_base = 0x20000000 ; (Windows only) fix OPcache crashes with event id 487
    
    ; Experimental for Moodle 2.6 and later
    ;opcache.fast_shutdown = 1
    ;opcache.enable_cli = 1 ; Speeds up CLI cron
    ;opcache.load_comments = 0 ; May lower memory use, might not be compatible with add-ons and other apps.
        • Restart the XAMPP VM, the OPCache plugin checking message is not prompted anymore.

        How to resolve vim editor not found on XAMPP VM?


        Software Required

        - macOS High Sierra
        - XAMPP-VM/PHP 7.3.0. Please refer to download
        - Moodle version 3.6.1. Please refer to download

        Problem
        • During the Moodle installation on XAMPP, vim editor is not available
        • Try to install vim editor by executing the command below
        apt-get install vim
        • Error message as shown below is displayed
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        E: Unable to locate package vim

        Steps
        • Obviously, package index files are not up to date.
        • Run the command below, it will work like a charm. vim editor command is installed and it is ready for used.

        apt-get update
        apt-get install apt-file
        apt-file update
        apt-get install vim
        


            Tuesday, December 25, 2018

            How to resolve "No Entry" sign at Mac startup page?

            Software Required

            - macOS High Sierra


            Problem

            • Update my Mac OS (High Sierra) recently, no symptom after the OS update
            • Restart my Macbook recently, encounter Macbook unable to boot up issue
            • "No Entry" sign always show after the Apple logo
            • The system will reboot and it will keep repeating couple of times and remain shut down afterwards
            Steps
            • Make sure your Mac machine is shutting down. 
            • Press "Command" + "R" key
            • Press the "Power" button to start the Mac machine
            • "Mac OS X Utilities" window will be displayed
            • Select "Reinstall Mac OS X" option, click on "Continue" button
            • Follow the steps in the wizard, you will get the your Mac machine start up to work like a charm.
            Note: Reinstall Mac OS X will not cause data lost.

            Thursday, December 13, 2018

            How to resolve "Unknown version of Tomcat was specified." error message when add Tomcat server to Spring Tool Suite IDE?

            Software Required

            - macOS High Sierra
            Spring Tool Suite Version: 3.9.6.RELEASE

            Problem
            • Error message "Unknown version of Tomcat was specified." is displayed when adding new Tomcat server to Spring Tool IDE
            • Obviously, Tomcat installation directory cannot be found. The Tomcat server haven't install on the machine yet
            Steps
            • Run command below to install Tomcat on the machine
            brew install tomcat

            • Run command below to find the tomcat home directory
            brew ls tomcat
            • Add Tomcat home directory into "Tomcat Installation directory" field, for example "/usr/local/Cellar/tomcat/9.0.13/libexec"
            • Click on "Finish" button, the new Tomcat server will be added into the Spring Tool IDE instance.



              Tuesday, December 11, 2018

              How to resolve "The certificates path does not contain ca.pem" issue when NetBean connect to Docker?

              Software Required
              - macOS High Sierra
              - NetBean IDE 8.2
              - docker version 18.06.1-ce
              • Try to configure Docker connection from Netbean 8.2, encounter error message "The certificates path does not contain ca.pem" as shown in the screenshot below


              Steps
              • Run the command below to install socat
              brew install socat
                • Run the command below to start a bridge instance to listen to port 9090 and connect to Docker socket.
                socat tcp-listen:9090,fork UNIX:///var/run/docker.sock
                • Configure the URL to point to "http://localhost:9090" and leave the "Certificates Path" field empty.

                • Click on "Finish" button. Voila, all the Docker images and containers will be displayed.

                  Monday, December 10, 2018

                  How to resolve Netbean unable to create new project issue?

                  Software Required

                  - macOS High Sierra
                  - NetBean IDE 8.2

                  Problem
                  • Click File-> New Project menu, no response and unable to create a new project.

                  Steps
                  • Browse to Oracle website to download JDK1.8 and install the JDK1.8
                  • Open the terminal window, browse to 
                    "/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc", edit the netbeans.conf file to point to the jdk1.8 library that located at "/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home".
                    netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home"
                  •  Restart NetBean and repeat the same steps to create a new project. "New Project" window is popup.

                  Sunday, December 2, 2018

                  How to start Moodle on docker?

                  Software Required

                  - docker-compose version 1.22.0
                  - macOS High Sierra
                  - docker version 18.06.1-ce

                  Steps
                  • Construct the docker-compose.xml as shown below
                  version: '2'
                  
                  services:
                    mariadb:
                      image: 'bitnami/mariadb:latest'
                      environment:
                        - MARIADB_USER=bn_moodle
                        - MARIADB_DATABASE=bitnami_moodle
                        - ALLOW_EMPTY_PASSWORD=yes
                      volumes:
                        - 'mariadb_data:/bitnami'
                    moodle:
                      image: 'bitnami/moodle:latest'
                      environment:
                        - MARIADB_HOST=mariadb
                        - MARIADB_PORT_NUMBER=3306
                        - MOODLE_DATABASE_USER=bn_moodle
                        - MOODLE_DATABASE_NAME=bitnami_moodle
                        - ALLOW_EMPTY_PASSWORD=yes
                      ports:
                        - '80:80'
                        - '443:443'
                      volumes:
                        - 'moodle_data:/bitnami'
                      depends_on:
                        - mariadb
                  
                  volumes:
                    mariadb_data:
                      driver: local
                    moodle_data:
                      driver: local
                  • Run command below to pull the Moodle image 
                  docker-compose up -d

                  • Browse to http://localhost

                  • Login as user id: user and password: bitnami, Moodle console page is displayed