使用PHP 7.0和phpMyAdmin运行Cloud9(Ubuntu 14.04)

时间:2016-01-20 13:57:35

标签: php phpmyadmin ubuntu-14.04

我正在使用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。

1 个答案:

答案 0 :(得分:3)

我得到了它的工作..这是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工作区。我上传到〜/ workspace / my /.

创建/ 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/