Additional PHP versions helper

Discussion in 'Tips/Tricks/Mods' started by SergiX44, Dec 8, 2016.

  1. SergiX44

    SergiX44 Member

    webguyz, ahrasis, Pe46dro and 3 others like this.
  2. budgierless

    budgierless Member HowtoForge Supporter

    hi,
    this is good, but you have only said its auto compiles, but you need to gave more deatils, it a: basic php install or full featured module install including gettex, mysql, ftp etc.?
     
  3. SergiX44

    SergiX44 Member

    It's a full feature installation with modules. It also add and start script for FPM, and support version upgrade: if you have already installed PHP 7.0.12, and you want to upgrade to 7.0.13 you can select again the version from the menu and the script will upgrade the already installed version.
     
  4. vwpete

    vwpete New Member

     
    SergiX44 likes this.
  5. elmacus

    elmacus Member HowtoForge Supporter

    I did a test with PHP7.0, but messed up the Port for FPM, so script failed, rerun/update did not fix it, so FPM does not work.
    Testing again with PHP7.1 and setting correct port does work for 7.1. ( i did use same as ISPconfig: 9010 but i guess i should use another unused like 9011, this is testserver so its good to mess things up)

    Suggestion: if the input of port is not correct with numbers only, do failsafe handling and ask for port again.
    Thanks anyway for good script.
     
  6. eddie67

    eddie67 New Member

    Hello.

    I have tried the script. I get no error messages so it seems to work.

    But I do not get the new versions as a choise in the PHP-selector in ISP Config.
    I missed something?

    Thank you
    Eddie
     
  7. elmacus

    elmacus Member HowtoForge Supporter

    Did you add the PHP settings in System in ISPconfig ? You must.
     
    SergiX44 likes this.
  8. eddie67

    eddie67 New Member

    That was it !

    Thank you
     
    SergiX44 likes this.
  9. webguyz

    webguyz Active Member HowtoForge Supporter

    SergiX44,
    Thanks for automating a boring and tedious task. Installed on a server I was going to upgrade soon and php 7.1 installed perfectly!
     
    SergiX44 likes this.
  10. felan

    felan Member HowtoForge Supporter

    THis is pretty neat :) But is it possible to call the install directory like php-7.0 and php-7.1 instead of php71?
     
  11. ahrasis

    ahrasis Active Member

    I am using ondrej php on Ubuntu 16.04 for php 5.6, 7.0 and 7.1. I am thinking of switching to this but currently I do not think this will work on Ubuntu 16.04 without modifications. Have you developed a script for Ubuntu 16.04?
     
  12. SergiX44

    SergiX44 Member

    I've tested it on ubuntu 14.04, but I don't know on 16.04. On my machines i've Debian Jessie and working fine.
    The required packages are:
    Code:
    apt-get -y install build-essential libfcgi-dev libfcgi0ldbl libjpeg62-turbo-dbg libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev libkrb5-dev libpq-dev libxml2-dev libxslt1-dev
    I've choose that names to avoid any conflicts with pre-existing installations.
     
  13. felan

    felan Member HowtoForge Supporter

    Mhm undestandable. Would just be hard to move all settings over to a new directory structure...
     
  14. elmacus

    elmacus Member HowtoForge Supporter

    Any chance that you will update this script for Debian 9 ?
     
  15. SergiX44

    SergiX44 Member

    Yeah, I need to test on debian stretch and find the packages are changed.
     
  16. webguyz

    webguyz Active Member HowtoForge Supporter

    Was running great until the end. Got an error in bold below. This was a Debian 8 system
    Code:
    Wrote PEAR system config file at: /opt/php71/etc/pear.conf
    You may want to add: /opt/php71/lib/php to your php.ini include_path
    /usr/local/src/php-build/php-7.1.11/build/shtool install -c ext/phar/phar.phar /opt/php71/bin
    ln -s -f phar.phar /opt/php71/bin/phar
    Installing PDO headers:           /opt/php71/include/php/ext/pdo/
    Traceback (most recent call last):
      File "ISPCHelper.py", line 278, in <module>
        main_menu()
      File "ISPCHelper.py", line 261, in main_menu
        run_menu(sel, menu, main_menu)
      File "ISPCHelper.py", line 266, in run_menu
        menu[sel]()
      File "ISPCHelper.py", line 248, in php_menu
        install_update_php(versions[sel])
      File "ISPCHelper.py", line 218, in install_update_php
        shutil.rmtree('/usr/local/src/php-build/' + folder_name)
      File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
        rmtree(fullname, ignore_errors, onerror)
      File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
        rmtree(fullname, ignore_errors, onerror)
      File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
        rmtree(fullname, ignore_errors, onerror)
      File "/usr/lib/python2.7/shutil.py", line 241, in rmtree
        fullname = os.path.join(path, name)
      File "/usr/lib/python2.7/posixpath.py", line 80, in join
        path += '/' + b
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 14: ordinal not in range(128)
    root@dotwebguyz:~#
    
     
  17. SergiX44

    SergiX44 Member

    Which version of python are you using?
    Really weird, used under deb8 tons of times without problems.
     
  18. webguyz

    webguyz Active Member HowtoForge Supporter

    I ran it again on another Debian 8 server I created today and it completed installing 7.1 successfully. Must have been an issue on the other server I tried setting up. Will probably delete it and re-install Perfect Server setup.

    Thanks!
     
  19. mccharlet

    mccharlet Member HowtoForge Supporter

Share This Page