piler installation

Issue #1020 resolved
chandra created an issue

HI,

I am try to installed the piler in ubuntu 18.04 i am not getting the login.php page.

Please help me how to install in ubuntu 18.04.

Comments (17)

  1. Janos SUTO repo owner

    Well, follow the instructions on the piler site. Anyway, you provided basically nothing to help you. For starters what webserver do you use? What does your virtualhost config look like? Is there any webserver/php error log, etc?

  2. chandra reporter

    I am using apache and my appache log is geving me this error PHP Fatal error: Class 'Controller' not found in /var/www/html/piler/login.php

  3. chandra reporter

    Dear Sir,

    Please guide me what is the requirement and how to install piler with step by step i will follow the same and i will try to reinstall. This is my request.

  4. georg luthardt

    Hello,

    I’m struggling with the same problem, although with nginx, not apache.

    A look at /var/log/nginx/error.log showed:

    /var/piler/www/config.php on line 343
    PHP message: PHP Fatal error: require_once(): Failed opening required '/usr/local/etc/piler/config-site.php'

    the file is really missing. Instead the file lies at /var/piler/www/config-site.php

    eighter copying it from there to /usr/local/etc/piler/config-site-php or changing the faulty line to:

    require_once '/var/piler/www/config-site.php';

    helped in my case.

    perhaps this is the same problem here.

  5. Janos SUTO repo owner

    You might be right. I consolidated all the config files to ${sysconfdir}/piler directory, including config-site.php. When you execute make install config.php is fixed to look for config-site.php at this place. However, postinstall.sh still puts config-site.php next to config.php, ie. /var/piler/www dir. I’ll fix this soon.

  6. georg luthardt

    we…yes…

    right now there are 3 problems so in postinstall.sh:

    1. Line 16 complains about SYSCONFDIR unknown

    → fixed it by adding a line

    SYSCONFDIR=”/usr/local/etc” 
    

    above

    2. when installed on a fresh system, the crontab for PILERUSER is empty.

    → set -o errexit or set -o pipefail end the script in this case

    → temporary fix by commenting it out

    3. webui_install fails:

    chown "${PILERUSER}:${DOCROOT}" "${DOCROOT}/tmp"
    

    should most likely be:

    chown "${PILERUSER}:${PILERUSER}" "${DOCROOT}/tmp"
    

    I’ve fixed those locally, and will try to get the rest done. But for now you have some feedback :)

  7. georg luthardt

    edit: the line is wrong, but my first fix is also not correct. the config-site.php does not contain the correct settings afterwards…perhaps you can find the correct fix. I will also look further.

    last bug so far:

    line 413:

    envsubst "${SCRIPT_DIR}/config-site.php.in" > "$CONFIG_SITE_PHP"

    should be:

    envsubst < "${SCRIPT_DIR}/config-site.php.in" > "$CONFIG_SITE_PHP"

  8. georg luthardt

    ok, some more fiddling around with the envsubst line….

    1. problem $config in the input file → no way to escape the dollar. crude workaround, see here:

    https://stackoverflow.com/questions/14155596/how-to-substitute-shell-variables-in-complex-text-files

    change $config... to ${DOLLAR}config
    

    than in your postinstall script:

    add inside webui_install():

    DOLLAR="$"
    export DOLLAR
    

    2. works not with shell variables. So every needed variable needs to be exported:

    so add also inside webui_install():

    export <any variable to be replaced>
    

    OR:

    just do it the old way before the changes 😉

    Edit:

    proposed config-site.php.in

    <?php
    
    ${DOLLAR}config['SITE_NAME'] = '$HOSTNAME';
    ${DOLLAR}config['SITE_URL'] = 'http://' . ${DOLLAR}config['SITE_NAME'] . '/';
    ${DOLLAR}config['DIR_BASE'] = '$DOCROOT/';
    
    ${DOLLAR}config['SMTP_DOMAIN'] = '$HOSTNAME';
    ${DOLLAR}config['SMTP_FROMADDR'] = 'no-reply@' . ${DOLLAR}config['SMTP_DOMAIN'];
    ${DOLLAR}config['ADMIN_EMAIL'] = 'admin@' . ${DOLLAR}config['SMTP_DOMAIN'];
    
    ${DOLLAR}config['DB_DRIVER'] = 'mysql';
    ${DOLLAR}config['DB_PREFIX'] = '';
    ${DOLLAR}config['DB_HOSTNAME'] = '$MYSQL_HOSTNAME';
    ${DOLLAR}config['DB_USERNAME'] = '$MYSQL_USERNAME';
    ${DOLLAR}config['DB_PASSWORD'] = '$MYSQL_PASSWORD';
    ${DOLLAR}config['DB_DATABASE'] = '$MYSQL_DATABASE';
    
    ${DOLLAR}config['SMARTHOST'] = '$SMARTHOST';
    ${DOLLAR}config['SMARTHOST_PORT'] = '$SMARTHOST_PORT';
    

    proposed changes in postinstall.sh → webui_install()

       webui_install() {
       chmod 770 "${DOCROOT}/tmp" "${DOCROOT}/images"
       chown "${PILERUSER}:${PILERUSER}" "${DOCROOT}/tmp"
    
       DOLLAR="$"
       export DOLLAR
       export HOSTNAME
       export DOCROOT
       export MYSQL_HOSTNAME
       export MYSQL_USERNAME
       export MYSQL_PASSWORD
       export MYSQL_DATABASE
       export SMARTHOST
       export SMARTHOST_PORT
    
       envsubst < "${SCRIPT_DIR}/config-site.php.in" > "$CONFIG_SITE_PHP"
    
       echo "Done."
    }
    

  9. Janos SUTO repo owner

    You didn’t follow the instructions, because you should assign a dedicated host to the archive, or at least a dedicated virtual host. Installing to a sub-directory is not really supported.

  10. georg luthardt

    Hello Janos,

    thanks for fixing. We will try the new script in january, when I plan to setup our 'production-piler'.

    Since my last tests the test system was running and looks good for now. So with the improved postinstall script it should work without workarounds than.

    Thanks again for all your work, and prompt reactions to any issues 🙂

    Georg

  11. Log in to comment