Browse Source

Fixed Debian 7 xdebug issue

bugfixes
gau1991 10 years ago
parent
commit
c0739c9463
  1. 15
      ee/cli/plugins/stack.py
  2. 20
      ee/cli/plugins/stack_upgrade.py
  3. 7
      ee/core/variables.py

15
ee/cli/plugins/stack.py

@ -470,6 +470,21 @@ class EEStackController(CementBaseController):
Log.debug(self, 'Creating directory /var/log/php5/')
os.makedirs('/var/log/php5/')
# For debian install xdebug
if EEVariables.ee_platform_distro == "debian":
EEShellExec.cmd_exec("pear install xdebug")
with open("/etc/php5/mods-available/xdebug.ini",
encoding='utf-8', mode='a') as myfile:
myfile.write(";zend_extension=/usr/lib/php5/20131226/"
"xdebug.so")
EEFileUtils.create_symlink(self, ["/etc/php5/"
"mods-available/xdebug.ini",
"/etc/php5/fpm/conf.d"
"/20-xedbug.ini"])
# Parse etc/php5/fpm/php.ini
config = configparser.ConfigParser()
Log.debug(self, "configuring php file /etc/php5/fpm/php.ini")

20
ee/cli/plugins/stack_upgrade.py

@ -75,15 +75,27 @@ class EEStackUpgradeController(CementBaseController):
EERepo.remove(self, ppa="ppa:ondrej/php5")
EERepo.add(self, ppa=EEVariables.ee_php_repo)
else:
EERepo.remove(self, repo_url="deb http://packages.dotdeb.org "
"{0}-php55 all"
.format(EEVariables.ee_platform_codename))
EERepo.add(self, repo_url=EEVariables.ee_php_repo)
EEAptGet.purge(self, ["php5-xdebug"])
EEFileUtils.searchreplace(self, EEVariables.ee_repo_file_path,
"php55", "php56")
Log.info(self, "Updating apt-cache, please wait...")
EEAptGet.update(self)
Log.info(self, "Installing packages, please wait ...")
EEAptGet.install(self, EEVariables.ee_php)
if EEVariables.ee_platform_distro == "debian":
EEShellExec.cmd_exec("pear install xdebug")
with open("/etc/php5/mods-available/xdebug.ini",
encoding='utf-8', mode='a') as myfile:
myfile.write(";zend_extension=/usr/lib/php5/20131226/"
"xdebug.so")
EEFileUtils.create_symlink(self, ["/etc/php5/mods-available/"
"xdebug.ini", "/etc/php5/fpm/conf.d"
"/20-xedbug.ini"])
Log.info(self, "Successfully updated from PHP 5.5 to PHP 5.6")
else:
self.app.args.print_help()

7
ee/core/variables.py

@ -82,9 +82,12 @@ class EEVariables():
ee_php_repo = ("deb http://packages.dotdeb.org {codename}-php56 all"
.format(codename=ee_platform_codename))
ee_php = ["php5-fpm", "php5-curl", "php5-gd", "php5-imap",
"php5-mcrypt", "php5-xdebug", "php5-common", "php5-readline",
"php5-mcrypt", "php5-common", "php5-readline",
"php5-mysql", "php5-cli", "php5-memcache", "php5-imagick",
"memcached", "graphviz"]
"memcached", "graphviz", "php-pear", "php5-dev"]
if ee_platform_distro == 'Ubuntu':
ee_php = ee_php + ["php5-xdebug"]
# MySQL repo and packages
if ee_platform_distro == 'Ubuntu':

Loading…
Cancel
Save