jubianchi / phpswitch

A CLI utility to help you build and test PHP versions
http://jubianchi.github.io/phpswitch/
MIT License
90 stars 8 forks source link

php switch off doesn't restore Apache configuration #21

Open dlange opened 10 years ago

dlange commented 10 years ago

When switching to a php version and activating it for Apache everything works fine, however when turning it off again with "php switch off" it does not automatically restores the apache configuration.

Here the response when activating a php version for apache for the first time:

php switch php-5.2.10 -a
Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
Backuping system default Apache2 module
    From: /usr/lib/apache2/modules/libphp5.so
    To: /usr/lib/apache2/modules/libphp5.so.system
Switching Apache2 module to php-5.2.10
You should restart apache2 using one of:
    - sudo /etc/init.d/apache2 restart
    - sudo service apache2 restart
    - sudo apachectl restart
    - ...
PHP switched to php-5.2.10
PHP 5.2.10 (cli) (built: Jan 19 2014 02:22:36) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies 

And here the response when turning it off again:

php switch off -a
PHP switched to system default version
PHP 5.4.4-14+deb7u7 (cli) (built: Dec 12 2013 08:42:07) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
    with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.