简体   繁体   中英

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

I'm using Cloud9 (running Ubuntu 14.04). I've been able to remove PHP5 and update to PHP 7.0.2 (phpinfo shows accurately). However the removal of PHP5 also removes phpMyAdmin.

When trying to install PHPMyAdmin I get the following errors:

$ 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. The latest version of phpMyAdmin (4.5.3.1) is compatible with PHP5 and PHP7.

Some threads indicate to install manually form phpmyadmin.com but I don't know how to do this :(

I'm looking for a solid method to upgrade my Cloud9 workspace to PHP 7 with phpMyAdmin. All I need is phpMyAdmin currently.

I got it working.. Here is full instructions for 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. I uploaded to ~/workspace/my/.

Create /my/config/ directory

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.

Restart your apache/mysql services and connect to http://localhost/my/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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