简体   繁体   English

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

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

I'm using Cloud9 (running Ubuntu 14.04). 我正在使用Cloud9(运行Ubuntu 14.04)。 I've been able to remove PHP5 and update to PHP 7.0.2 (phpinfo shows accurately). 我已经能够删除PHP5并更新到PHP 7.0.2(phpinfo准确显示了)。 However the removal of PHP5 also removes phpMyAdmin. 但是,删除PHP5也会删除phpMyAdmin。

When trying to install PHPMyAdmin I get the following errors: 尝试安装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.

I've added and updated my repositories. 我已经添加并更新了我的存储库。 I've tried to install php5-gettext and php-seclib but again it relies on PHP5. 我尝试安装php5-gettext和php-seclib,但同样,它依赖于PHP5。 The latest version of phpMyAdmin (4.5.3.1) is compatible with PHP5 and PHP7. 最新版本的phpMyAdmin(4.5.3.1)与PHP5和PHP7兼容。

Some threads indicate to install manually form phpmyadmin.com but I don't know how to do this :( 一些线程指示从phpmyadmin.com手动安装,但我不知道该怎么做:(

I'm looking for a solid method to upgrade my Cloud9 workspace to PHP 7 with phpMyAdmin. 我正在寻找使用phpMyAdmin将Cloud9工作区升级到PHP 7的可靠方法。 All I need is phpMyAdmin currently. 我现在需要的只是phpMyAdmin。

I got it working.. Here is full instructions for 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

Download phpmyadmin latest from phpmyadmin.net, extract and update contents to c9 workspace. 从phpmyadmin.net下载最新的phpmyadmin,提取内容并将其更新到c9工作区。 I uploaded to ~/workspace/my/. 我上传到〜/ workspace / my /。

Create /my/config/ directory 创建/ 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

Click the "SAVE" button. 点击“保存”按钮。 Copy the config.inc.php file out of ~/workspace/my/config/ into ~/workspace/my/ and delete the config folder. 将config.inc.php文件从〜/ workspace / my / config /中复制到〜/ workspace / my /中,然后删除config文件夹。

Restart your apache/mysql services and connect to http://localhost/my/ 重新启动apache / mysql服务并连接到http:// localhost / my /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM