Problems after upgrading to 3.1

Discussion in 'Installation/Configuration' started by Steffan, Sep 28, 2016.

  1. Steffan

    Steffan Member

    I have several problems after updating:

    In the controlpanel

    i see on different pages warnings like:

    Warning: idn_to_utf8() expects parameter 2 to be long, string given in /usr/local/ispconfig/interface/lib/classes/functions.inc.php on line 322 Warning: idn_to_utf8() expects parameter 2 to be long, string given in /usr/local/ispconfig/interface/lib/classes/functions.inc.php on line 322

    /etc/php.ini: error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

    When i go to the page system:
    The servernames are empty

    When i go to Server config i see the servernames
    When editing a server, the hostname is empty
    If i put the hostname in, im getting:
    1. Hostnnaam is niet ingvuld. (just a detail it should be: Hostnaam is niet ingevuld)
      Invalid Hostname.

    When i go to websites:
    non of the domains are in the list
    When i click on this page on a costumer i see the website detaiols but no dmomainname


    When i log in as a costumer also all the domainnames are empty
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which PHP version do you use?

    Regarding the error in the IDN function, the second parameter is a constant defined by PHP itself, IDNA_NONTRANSITIONAL_TO_ASCII, if this is missing then it's a problem in PHP itself, maybe the version that you use does not define it properly. The empty domains have the same reason, when the IDN function in your PHP is broken and does not translate the domains from and to IDN.
     
  3. Steffan

    Steffan Member

    PHP 5.6.26
    and php 7 as second php version

    php56w-intl.x86_64
    php70-php-intl.x86_64
    Are installed
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Which OS version do you use? The PHP 5.6.26 is the default package of the OS?
     
  5. Steffan

    Steffan Member

    CentOS release 6.8 (Final)
    the php 5.6.26 is from webtatic
    it worked fine before the update.

    There are no domains witch special characters only name.com etc
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Somehow, webtatic seems to have removed a PHP constant of the PHP-IDN extension which is used by idn_to_utf8 which causes this error now or they compiled a very old version into php 5.6. Older ISPConfig versions had no IDN functions, so it is possible they worked on a PHP where idn_to_utf8 is broken. I will have to see if we can find a workaround for this.

    What you can try is that you remove the IDN php module. Or you edit the /usr/local/ispconfig/interface/lib/classes/functions.inc.php file and add in
    line 293:

    return $domain;

    to skip the while IDN encoding and decoding.
     
    budgierless likes this.
  7. Steffan

    Steffan Member

    i removed php56w-intl but that didnt worked
    i added the line you said and that helps
    private function _idn_encode_decode($domain, $encode = true) {
    return $domain; #### amanualy edited on 2016-09-28
    if($domain == '') return '';


    Sitenote is it an option to tell ispconfig to use the second php (php7) to see if that works?
    And if so how do i do that?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Backup the file /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter, then edit it and change PHPRC line to point to the directory which contains the php.ini for php 7 and edit the path to the php binary in the exc line. Then restart apache.
     
  9. Steffan

    Steffan Member

    That did the trick!

    Well just tested let's Encrypt
    i see this warning
    016-09-28 11:53:57,702:WARNING:certbot.cli:You are running with an old copy of letsencrypt-auto that does not receive updates, and is less reliable than more recent versions. We recommend upgrading to the latest certbot-auto script, or using native OS packages.
    Failed authorization procedure. danseninstijl.nl (http-01):
    =================
    ls -la /root/.local/share/letsencrypt/bin/letsencrypt --version
    ls (GNU coreutils) 8.4

    And also this warning:
    PHP Warning: file_put_contents(/etc/hhvm/web532.ini): failed to open stream: No such file or directory in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 3065

    Warning: file_put_contents(/etc/hhvm/web532.ini): failed to open stream: No such file or directory in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 3065
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The lestencrypt warning is ok, nothing to care about.
    The other warnings are ok as well, they just mean that HHVM is not installed.

    The only problem is this:

    Failed authorization procedure. danseninstijl.nl (http-01):

    it means that letsencrypt could not reach the domain or one of its subdomains on your server to download the verification token.
     
  11. Steffan

    Steffan Member

    sorry my mistake, that warning was oke.
    That domain had a redirect to another domain.
    on another domain it worked.

    thanxs for the fast support.
    keep up the good job.
     
  12. Steffan

    Steffan Member

    Hm looks like after the change to php7 let's encrypt is not working.
    If tested a couple of sites all with the same problem.

    urn:acme:error:unauthorized :: The client lacks sufficient authorization
    i watched the directory on another screen and no .well-known/acme-challenge
    was created.
     
  13. budgierless

    budgierless Member HowtoForge Supporter

    SAME PROBLEM.
    I had the same 3 issues as stated in the orginal post of this thread.
    my system OS: Ubuntu 12.04.5 LTS using PHP 5.3.27.
    till's fix: added to line 293:
    return $domain;
    (this workedf and fixed alll the issues)
    I wanted to let you know this as my system is very different from the other mentioned above but same problem.
     
  14. Steffan

    Steffan Member

    The return $domain does not fix my lets Encrypt problem.
    I also changed back to php 5.6 but same problem.
    Looks like a permission problem
    If i see it correct then the auth. files are written in /usr/local/ispconfig/interface/acme/.well-known/acme-challenge/
    but not moved to the website.
    But i also dont see a setting to point the websites to /usr/local/ispconfig/interface/acme/.well-known/acme-challenge/

    If i change the file plugins-available/apache2_plugin.inc.php on line 1245
    --webroot-path /var/www/$domain/web

    it works without problems.

    But then the config isnt saved
    getting this error from the server
    RewriteCond: bad flag delimiters
    [60G[[0;31mFAILED[0;39m]
    looks like this line is the problem:
    RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ RewriteRule ^(.*)$ http://www.scoutsgottalent.nl$1 [R=301,NE,L]
    I dont see why this is added to the file

    I moved the .err file to the original file
    removed all the lines with .well-known/acme-challenge/
    and httpd restarts with no errors
    and ssl is working.

    other problems are that the settings
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^domain\.nl$ [NC]
    RewriteRule ^(.*)$ http://www.domain.nl$1 [R=301,L]
    are gone after this update

    Another thing i miss is that the domain is not redirected to https.
    Why isnt this by default?
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    This setting is in the apache ispconfig.conf file. Maybe you deselected reconfigure services during ispconfig update?

    This is added to redirect the letsencrypt request. see your own post where you complain that you can not find how letsencrypt is redirected.

    Because this would break a lot of websites, we will not add default settings that are known to break many sites. If you want such a redirect, then enable it on the redirect tab of the website.
     
  16. Steffan

    Steffan Member

    Im not awere that i did
    What is the best way to correct this?
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the apache ispconfig.conf file if it contains this for apache 2.2:

    Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-known/acme-challenge
    <Directory /usr/local/ispconfig/interface/acme/.well-known/acme-challenge>
    Order allow,deny
    Allow from all
    </Directory>

    or this for apache 2.4

    Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-known/acme-challenge
    <Directory /usr/local/ispconfig/interface/acme/.well-known/acme-challenge>
    Require all granted
    </Directory>

    Btw, we had used:

    If i change the file plugins-available/apache2_plugin.inc.php on line 1245
    --webroot-path /var/www/$domain/web

    this before, it does not work reliably, letsencrypt failed from time to time to create the token and there were also problems when letsencrypt is enabled right when you create a website
     
  18. Steffan

    Steffan Member

    Thanxs that worked....
    letsencrypt works now

    but still im getting
    /etc/httpd/conf/sites-enabled/100-xxxxx.nl.vhost:
    RewriteCond: bad flag delimiters
    [60G[[0;31mFAILED[0;39m]
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, maybe a problem with the apache version. which one do you have installed?
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Steffan likes this.

Share This Page