Multiple PHP versions compiled with PHPBrew in ispconfig3

Discussion in 'ISPConfig 3 Priority Support' started by budgierless, Aug 31, 2017.

  1. budgierless

    budgierless Member

    Using PHPBrew to manage php versions, it's nothing special, it just automatically compiles php versions and manages them.
    i've compiled a few versions with is and they're located in /opt/phpbrew/php/
    They work well when set as system wide, ( apache mod php5.load etc) but when i add them to the ISPConfig's selector I cant get it to work, the browser returns error 503

    ubuntu: 16.04
    apache: 2.4
    PHP: 7.0 or Phpbrew php 5.3.29 system wide mode, replacing 7.0)

    Here the example on my configuration for php 5.3.29 in the ISPConfig's multiple PHP versions menu

    Path to the PHP FastCGI binary: /opt/phpbrew/php/php-5.3.29/bin/php-cgi
    Path to the php.ini directory: /opt/phpbrew/php/php-5.3.29/etc

    Path to the PHP-FPM init script: /opt/phpbrew/php/php-5.3.29/php5.3.29
    Path to the php.ini directory: /opt/phpbrew/php/php-5.3.29/etc/
    Path to the PHP-FPM pool directory: /opt/phpbrew/php/php-5.3.29/pool.d/

    Whats wrong, please advide?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I haven't used phpbrew yet. Your Linux system uses systemd, so ISPConfig expects that your custom PHP version has a systemd unit file like any other service so that the custom PHP version can be restarted with the command:

    systemctl restart php5.3.29

    Try to make a restart this way to see if phpbrew added a systemd unit file.
  3. budgierless

    budgierless Member

    UPDATE: I had to end up installing the phpbrew-5.3.29 as system-wide because it was the only way i could get it to work, this is fine but the new issue i have is when trying to access phpmyadmin, the message says: (PHP 5.5+ is required)!! the php7.0 is still their but is deactivated and even so, i cant keep switching from 5.3.29 to 7.0 each time i need to use phpmyadmin in production, Is their a way i could add a if-then or if-else code to force phpmyadmon to use one of the installed multi php's setup in ispconfig instead of the system-wide default? Or another way for example
    <IfModule modify.c>
    php7_module /usr/lib/apache2/modules/

    Please advise
  4. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    Use phpmyadmin in a subdomain which uses php7
  5. budgierless

    budgierless Member

    Thats sounds like a very good idea, but now how would i do this? I not a coder and would need step my step details to follow.
  6. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    Under System create php 7 as additional php version.
    Under Sites create a Subdomain (Vhost) and select php 7 for it.
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely the phmyadmin.conf file in apache contains a line that forces phpmyadmin to use the system mod_php. It might be nescessary to comment out that line so that phmyadmin will use the php of the subdomain website.
  8. budgierless

    budgierless Member

    I got the same message, did not work.
    what line should i be looking for?
  9. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    @till is right (as always), phpmyadmin is running through mod_php. You see this on the <IfModule mod_php.c> lines.

    Why did you change the default php on your Ubuntu? Maybe the other way round would be better...

Share This Page