让 Cloud9 (Ubuntu 14.04) 与 PHP 7.0 和 phpMyAdmin 一起运行


Getting Cloud9 (Ubuntu 14.04) running with PHP 7.0 and phpMyAdmin

我正在使用Cloud9(运行Ubuntu 14.04)。我已经能够删除 PHP5 并更新到 PHP 7.0.2(phpinfo 显示准确)。但是,删除 PHP5 也会删除 phpMyAdmin。

尝试安装PHPMyAdmin时,出现以下错误:

$ sudo apt-get install php7.0-cli php-seclib php-gettext
....
The following packages have unmet dependencies:
 php-gettext : Depends: php5 but it is not going to be installed or
                        php5-cli but it is not going to be installed
 php-seclib : Depends: php5 but it is not going to be installed or
                       php5-cli but it is not going to be installed
              Recommends: php5-mcrypt but it is not going to be installed or
                          php5-gmp but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我已经添加并更新了我的存储库。我尝试安装 php5-gettext 和 php-seclib,但它再次依赖于 PHP5。最新版本的 phpMyAdmin (4.5.3.1) 与 PHP5 和 PHP7 兼容。

一些线程指示手动安装表单 phpmyadmin.com 但我不知道如何执行此操作:(

我正在寻找一种可靠的方法来使用 phpMyAdmin 将我的 Cloud9 工作区升级到 PHP 7。我目前需要的只是phpMyAdmin。

我让它工作了。这是 PHP 7 + phpMyAdmin 的完整说明

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get -y purge php5 libapache2-mod-php5 php5 php5-cli php5-common php5-curl php5-gd php5-imap php5-intl php5-json php5-mcrypt php5-mysql php5-pspell php5-readline php5-sqlite
sudo apt-get autoremove
sudo apt-get install php7.0
sudo apt-get install php7.0-mysql
mysql-ctl start
# **REMEMBER What cloud9 user name you are. This is your mysql username.
sudo rm /etc/apache2/sites-enabled/phpmyadmin.conf

从 phpmyadmin.net 下载phpmyadmin最新版,提取并更新内容到c9工作区。我上传到~/工作区/我的/。

创建/my/config/目录

Run site /my/setup/
Created new server with:
Server name: localhost
Connection type: tcp
Connect without password: on
User for config auth: none
Password for config auth: none
Allow logins without a password: on
Control user: **your c9 username**
Control pass: none

单击"保存"按钮。将 config.inc.php 文件从 ~/workspace/my/config/复制到 ~/workspace/my/并删除配置文件夹。

重新启动您的 apache/mysql 服务并连接到 http://localhost/my/