Posts by kess

    Why don't you just use a shared mount point on your subdomains ? The customers don't need to contact support for that.


    Example:

    - primary domain xxxyyyzzz.com -> /var/www/virtual/xxxyyyzzz.com/htdocs

    - subdomain de.xxxyyyzzz.com -> xxxyyyzzz.com

    - subdomain fr.xxxyyyzzz.com -> xxxyyyzzz.com

    - subdomain it.xxxyyyzzz.com -> xxxyyyzzz.com

    and so on...

    For those who can't wait for the next release, for those who know what they are doing, for those who understand how to use the root user and its power, for those who are able to recover a broken system, there's a quick and dirty method to add php7.2 and php7.3 to the phpswitcher plugin.


    Keep in mind that:

    - not all the modules are compiled, just the modules for my needs

    - there could be some errors (I'm sure there are)

    - this is only "tested" on Debian 9 amd64 with my personal configuration (standard) that could differ from yours

    - you know what you are doing

    - THERE IS NO SUPPORT

    - just to be clear, THERE IS NO SUPPORT


    So, let's begin:

    1. Install dependencies:

    Code
    1. apt install libzip-dev libopenmpi-dev libc6-dev libnewlib-dev valgrind libarb-dev libxml2-dev libsodium-dev libpth-dev libzfslinux-dev makedev

    2. Link some needed libraries:

    Code
    1. ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a
    2. cd /usr/include
    3. ln -s x86_64-linux-gnu/curl

    FOR PHP 7.2


    There's only modules.ini missing now, we need to "build" it:

    Code
    1. ls -1 /opt/phpswitcher/$compDate/php7.2/lib/php/20170718-zts-debug/ | grep .so > /opt/phpswitcher/$compDate/php7.2/etc/php/conf.d/modules.ini
    2. sed -i -e 's/^/extension = /' /opt/phpswitcher/$compDate/php7.2/etc/php/conf.d/modules.ini
    3. sed -i 's/extension = opcache.so/zend_extension = opcache.so/g' /opt/phpswitcher/$compDate/php7.2/etc/php/conf.d/modules.ini

    Last Step:

    edit file /opt/phpswitcher/$compDate/php7.2/etc/php/conf.d/modules.ini with your favorite editor and

    1. invert lines mysqli.so and mysqlnd.so

    2. move opcache.so to top (first line) of the file


    edit file /opt/phpswitcher/$compDate/php7.2/etc/php-fpm.conf with your favorite editor and change what follows:

    Code
    1. ;pid = run/php-fpm.pid => pid = /var/run/phpswitcher/psw7.2-fpm.pid
    2. ;error_log = log/php-fpm.log => error_log = /var/log/phpswitcher/psw7.2-fpm.log
    3. ;syslog.ident = php-fpm => syslog.ident = psw7.2-fpm
    4. ;emergency_restart_threshold = 0 => emergency_restart_threshold = 10
    5. ;emergency_restart_interval = 0 => emergency_restart_interval = 1m
    6. ;process_control_timeout = 0 => process_control_timeout = 60s
    7. ;daemonize = yes => daemonize = yes

    edit file /opt/phpswitcher/$compDate/php7.2/etc/php/php.ini with your favorite editor and change what follows:

    Code
    1. short_open_tag = Off => short_open_tag = On
    2. ;cgi.fix_pathinfo=1 => cgi.fix_pathinfo=1

    FOR PHP 7.3

    There's only modules.ini missing now, we need to "build" it:

    Code
    1. ls -1 /opt/phpswitcher/$compDate/php7.3/lib/php/20180731-zts-debug/ | grep .so > /opt/phpswitcher/$compDate/php7.3/etc/php/conf.d/modules.ini
    2. sed -i -e 's/^/extension = /' /opt/phpswitcher/$compDate/php7.3/etc/php/conf.d/modules.ini
    3. sed -i 's/extension = opcache.so/zend_extension = opcache.so/g' /opt/phpswitcher/$compDate/php7.3/etc/php/conf.d/modules.ini

    Last Step:

    edit file /opt/phpswitcher/$compDate/php7.3/etc/php/conf.d/modules.ini with your favorite editor and

    1. invert lines mysqli.so and mysqlnd.so

    2. move opcache.so to top (first line) of the file


    edit file /opt/phpswitcher/$compDate/php7.3/etc/php-fpm.conf with your favorite editor and change what follows:

    Code
    1. ;pid = run/php-fpm.pid => pid = /var/run/phpswitcher/psw7.3-fpm.pid
    2. ;error_log = log/php-fpm.log => error_log = /var/log/phpswitcher/psw7.3-fpm.log
    3. ;syslog.ident = php-fpm => syslog.ident = psw7.3-fpm
    4. ;emergency_restart_threshold = 0 => emergency_restart_threshold = 10
    5. ;emergency_restart_interval = 0 => emergency_restart_interval = 1m
    6. ;process_control_timeout = 0 => process_control_timeout = 60s
    7. ;daemonize = yes => daemonize = yes


    edit file /opt/phpswitcher/$compDate/php7.3/etc/php/php.ini with your favorite editor and change what follows:

    Code
    1. short_open_tag = Off => short_open_tag = On
    2. ;cgi.fix_pathinfo=1 => cgi.fix_pathinfo=1


    After each step read what your console output tells you, if everything is ok, go to the next step.

    To finish:

    Go to your i-MSCP Panel and add the 2 new version as you will do with a "normal" version


    Hope it helps.

    Sorry Nuxwin , but at present I've canceled everything pending.

    I had to generate the order and accept it without the automatic provision. I've than created the new domain manually using the i-MSCP interface.

    Hi Nuxwin

    thx for your reply.


    The domain name is a required field during registration, but the domain registration (real domain registration on a registrar) is not mandatory.

    A customer could have an existing domain name, and he only needs the Hosting Plan.


    Here's the order form, as you can see the domain name is present, but unfortunately the error is still there.


    What kind of further information do you need in order to investigate ?

    Thx a lot,

    bye Kess.

    Files

    Hello guys,

    I'm facing a strange error upon a new customer creation using the WHMCS module.


    I can't find no log in WHMCS or on i-MSCP Server. The only thing I have is the response in the WHMCS Module Queue:

    Code
    1. i-MSCP (WHMCS): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-1' at line 1

    i-MSCP Server:

    Debian 9 Stretch with default php 7.0 (with FPM) and MariaDB 10.1 using i-MSCP 1.5.3 (2018120800)

    Additional Plugins: ClamAV, LetsEncrypt, Mailgraph, Monitorix, OpenDKIM, PhpSwitcher, Postscreen, RoundcubePlugins, ServerDefaultPage, SpamAssassin, WHMCS


    WHMCS Server:

    Debian 9 Stretch with php 7.1 (with FPM) and MariaDB 10.1

    WHMCS 7.7.1 General Release


    i-MSCP Server has been recently upgraded from Jessie and php 5.6, to the specs written above.


    Please could someone give me some hint on how I can debug the problem ?

    There's no WHMCS log (I can see all the Others Plugin logs, but not for WHMCS).


    I Can see the request incoming in i-MSCP when looking at /var/log/nginx/access.log

    Code
    1. XXX.YYY.ZZZ.AAA - - [22/May/2019:16:46:08 +0200] "POST /whmcs HTTP/1.1" 200 200 "-" "i-MSCP (WHMCS)" "-"

    But unfortunately no further informations.

    Any help is appreciated.


    Thank you very much,

    Bye Kess.

    Just for your information,

    I modified line 1599 in /var/www/imscp/gui/library/Functions/Shared.php

    from

    Code
    1. $possibleHostSources = ['HTTP_X_FORWARDED_HOST', 'HTTP_HOST', 'SERVER_NAME', 'SERVER_ADDR'];

    to

    Code
    1. $possibleHostSources = ['HTTP_X_FORWARDED_HOST', 'SERVER_NAME', 'HTTP_HOST', 'SERVER_ADDR'];


    It seems that $_SERVER['HTTP_HOST'] returns w00.mydomain.com4443 and this is not the result we expect. I don't know why the result is not w00.mydomain.com:4443

    So I choosed SERVER_NAME as preference...


    Now the panel is working again as expected.

    Hello guys,

    I have the following problem after login to the panel.

    The server has been upgraded today from Jessie to Stretch and from i-MSCP 1.5.3 to i-MSCP 1.5.3-2018120800

    Everything went well, but unfortunately after the login form I can not do anything else.


    With Debug Mode enabled, I can see:

    Code
    1. An unexpected error occurred
    2. An exception has been thrown in file /var/www/imscp/gui/library/Functions/Shared.php at line 1634:
    3. Invalid Host "w00.mydomain.com4443"


    Unfortunately the logs are not telling big things… in effect the error is reported nowhere…

    This is the only thing I have.


    The list of the installed Plugins is: ServerDefaultPage, Postscreen, ClamAV, SpamAssassin, Monitorix, RoundcubePlugins, PhpSwitcher, OpenDKIM, Mailgraph, LetsEncrypt, WHMCS


    Please tell me where I can watch in order to find the cause.

    Thx for help,

    bye Kess.