how to upgrade php to current version in ispconfig3?

Discussion in 'HOWTO-Related Questions' started by Maslak Yavuz, Jan 25, 2019.

  1. Maslak Yavuz

    Maslak Yavuz Member

    Hi,
    I use ispconfig 3.0.5.4p8 on ubuntu14.04lts and php version is 5.5.9.
    How can i update php without being any problem ?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Both Ubuntu and ISPConfig are very old. Is that ISPConfig still supported? Ubuntu support ends in April.
    Without any problem is very strict requirement.
    My advice, which includes no guarantees, is take disk image backup of your host, upgrade Ubuntu to 16.04 and then to 18.04, upgrade ISPConfig. Then you have newer PHP and if needed can install additional PHP versions.
    https://www.howtoforge.com/tutorial...fig-3-from-debian-packages-on-debian-8-and-9/
     
    ahrasis likes this.
  3. Maslak Yavuz

    Maslak Yavuz Member

    Hi
    as you said, i copied the image of server and I upgraded on the cloned server to ispconfig3.1.13 and ubuntu 16.04 so far. I will promoted it to ubuntu18.04 but
    new ubuntu has php7.0, as far as i see, some sites works and some doesn't work
    for example an error in a web site in this upgraded server as following;
    PHP Parse error: syntax error, unexpected '?>\r', expecting function (T_FUNCTION)

    So can i work multiple php version both 5.6 and 7.x on this ispconfig server ?
    could you give me a doc ?

     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I gave link to the doc in message #2. Do you read the answers you get?
     
  5. Maslak Yavuz

    Maslak Yavuz Member

    I followed the link (https://www.howtoforge.com/tutorial...fig-3-from-debian-packages-on-debian-8-and-9/) you gave. The server has both php5.6 and 7.0 on ubuntu16.04 anymore. Also i configured additional php versions in ispconfig.
    But i only see default php for phpversion in ispconfig as attached image. So i can not switch php version each virtual sites.
    How can i fix it ?
     

    Attached Files:

  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Go through the Tutorial again. There is some setting you have not done correctly. Then you get the extra PHP versions to that drop-down menu.
     
  7. Maslak Yavuz

    Maslak Yavuz Member

    Unfortunately, i could not manage to bring installed phpversions in ispconfig php version section for a virtual site. It only comes default.
    Also after upgrading, phpmyadmin comes with some warnings as attached.
    Perhaps after upgrading ubuntu 14.04 to 16.04, i need to reinstall/reconfigure ispconfig ?
     

    Attached Files:

  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    When you upgrade the underlying operating system, you must go through the Perfect Server Guide for the new OS and check settings and installed programs correspond to the Guide. So in your case for Ubuntu 16.04.
    My advise was to upgrade ISPConfig last. That way it can do reconfigure services when all the services are installed and configured. You can force the reconfigure services by downloading the ISPConfig 3.1 installation package, and running the install/update.php script from there, and remembering to choose reconfigure services.
     
  9. Maslak Yavuz

    Maslak Yavuz Member

    Actually I followed a link "https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-ubuntu-16-04-lts " and i managed to upgrade to the ubuntu16.04. So default php version has become 7.0as default. But i saw some php values regarding the php in the exist ispconfig still stayed php5.x. So I need to reinstall ispconfig without spoiling databases and users relations. as far as i see, I could not find how i can upgrade the both OS and ispconfig . There is only install docs for ispconfig from beginning. i need full docs for upgrading. otherwise I get stuck in middle of the deploying. phpmyadmin start to come with warnings. fortunately I only did a test on the test environment.
    As you know, it is more clear and pure first installation an ispconfig and os . But it is getting hard to upgrading an exist structure.
    So, I need a clean upgrading instructions for ispconfig. is there one in its official site?
    Regards
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    There are ISPConfig updating instructions, and they are on the main site.
    It is a bit complicated when the operating system is upgraded and then ISPConfig. This is done upgrading the OS in the usual way following the upgrade instructions in Release Notes. Then the operating system must be set up following the ISPConfig Perfect Server Guide for this upgraded operating system. At this point upgrading ISPConfig and letting it reconfigure services (which it does by default, so do not turn it off) is the final step in upgrade.
    If this upgrading in place does not work for you, there is an alternative. Install a new ISPConfig system using the desired new OS, then use Migration Tool to migrate users, databases, websites and e-mails from the old system to the new.
     
  11. Maslak Yavuz

    Maslak Yavuz Member

    could you advise a migration tool about that ? regards
     
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    It is in the main site documentation.
     
  13. Maslak Yavuz

    Maslak Yavuz Member

    I install fresh centos7.6 by using "https://www.howtoforge.com/tutorial...l-php-pureftpd-postfix-dovecot-and-ispconfig/" and then i shall try to restore the exist ispconfig into new server.
    By the way, on the other hand i will follow installing additional
    PHP-FPM & FastCGI for ISPConfig 3.1 on Ubuntu 16.04
    https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/
    I got an error first phase as following
    ./configure --prefix=/opt/php-5.6.40 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap-ssl --with-gettext --with-xmlrpc --with-xsl --with-kerberos --enable-fpm
    That's began to install and.. i got an error and the installation failed as below
    /opt/php-5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_open’:
    /opt/php-5.6.40/ext/openssl/openssl.c:5048:17: error: storage size of ‘ctx’ isn’t known
    EVP_CIPHER_CTX ctx;
    ^
    /opt/php-5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_digest’:
    /opt/php-5.6.40/ext/openssl/openssl.c:5154:13: error: storage size of ‘md_ctx’ isn’t known
    EVP_MD_CTX md_ctx;
    ^
    /opt/php-5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_encrypt’:
    /opt/php-5.6.40/ext/openssl/openssl.c:5233:17: error: storage size of ‘cipher_ctx’ isn’t known
    EVP_CIPHER_CTX cipher_ctx;
    ^
    /opt/php-5.6.40/ext/openssl/openssl.c: In function ‘zif_openssl_decrypt’:
    /opt/php-5.6.40/ext/openssl/openssl.c:5316:17: error: storage size of ‘cipher_ctx’ isn’t known
    EVP_CIPHER_CTX cipher_ctx;
     
    Last edited: Jan 28, 2019
  14. Maslak Yavuz

    Maslak Yavuz Member

    i installed ispconfig by the perfect server on the fresh centos7.6 successfully. php version came 5.4.16 along with centos7.6.
    I can reach ispconfig panel. Then i wanted to try restoring old ispconfig version.
    the old and new server's ip addess are different. Besides their ssl certs are different too.
    So i copied ispconfig_db_backup.sql from the old server to the new server. and then i ran mysql to restore from old ispconfig.
    [root@webcp mysql]# mysql --force -uroot -p dbispconfig < ispconfig_db_backup.sql
    Enter password:
    ERROR 1062 (23000) at line 51: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 117: Duplicate entry 'AF' for key 'PRIMARY'
    ERROR 1062 (23000) at line 175: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 214: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 224: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 373: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 383: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 429: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 475: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 503: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 541: Duplicate entry 'db-db_version' for key 'PRIMARY'
    ERROR 1062 (23000) at line 589: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 599: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 637: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 647: Duplicate entry '1' for key 'PRIMARY'

    How can i fix it ?
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Just a guess, you probably did not empty your current database before you restored the old database?
     
  16. Maslak Yavuz

    Maslak Yavuz Member

    I did not empty current database on fresh installed ispconfig before i restored the old one. If i delete all tables in the new databate before restoring the old one, in this time i get an error when i try to restore from old database that there was not bla bla table something like that.
    I emptied this time from dbispconfig on the newserver. And then I restored from the old dbispconfig.
    It worked. new server comes along with php5.4 as default. I shall install update it and add additional php versions. Thank a lot.
     
    Last edited: Jan 29, 2019
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Empty the tables, not delete them.
     
  18. Maslak Yavuz

    Maslak Yavuz Member

    Last edited: Jan 29, 2019
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to copy them from passwd, shadow, group and gshadow file of the old server to the new server. Copy only the web*, ssh users of the sites users and client* groups, not the whole files.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page