piler installation
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)
-
repo owner -
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
-
repo owner OK, one step closer. Show me your virtualhost config, please.
-
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.
-
repo owner Well, follow the installation procedure on the piler wiki: http://www.mailpiler.org/wiki/current:installation
-
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.
-
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.
-
repo owner Any update on the matter?
-
we…yes…
right now there are 3 problems so in postinstall.sh:
- 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 :)
-
repo owner Eh, my bad. Thanks for the feedback, I’ll fix these soon.
-
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"
-
ok, some more fiddling around with the envsubst line….
- 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." }
-
repo owner I'll fix it soon. I’ll keep you posted.
-
reporter Dear Sir,
I followed the instructions and installed and first login it is going with host name http://ipaddress:8080/mail1/index.php?route=health/health like this after that i pressed the back button it is coming properly. http://ipaddress:8080/ And i have one more dough i have mailserver in different server and i installed the plier in different server how to send the mails to this server.
-
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.
-
repo owner - changed status to resolved
Hello Georg, I've finally managed to fix the postinstall script on the master branch.
-
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
- Log in to comment
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?