Showing posts with label phpmyadmin. Show all posts
Showing posts with label phpmyadmin. Show all posts

Friday, June 9, 2017

Downgrading php from 7.0 to 5.0


Php7 is installed by default on Ubuntu 16.04. 

The copy of gregarius, an RSS aggregator / reader uses php revision greater than 4.  Many of the mysql php core functions, and string editing is needlessly mangled in 7.0, and editing and updating the gregarius package is a very large task.

It is easier to downgrade the php for now than editing gregarius.  FWIW gregarius is pretty much dead in support after 2006, very old, which is sad since it is a nice stable tool.

it requires mysql, but luckily the downgraded php 5 works along with the mysql extensions.

Procedure snarfed from another blog to remove php 7 and install 5.6 from another repository, ondrej.

Remove all the stock php packages
List installed php packages with dpkg -l | grep php| awk '{print $2}' |tr "\n" " " then remove unneeded packages with sudo aptitude purge your_packages_here or if you want to directly remove them all use :
sudo apt-get purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
Add the PPA
sudo add-apt-repository ppa:ondrej/php
If you get add-apt-repository: command not found run the following command first :
sudo apt-get install software-properties-common
Install your PHP Version
sudo apt-get update
sudo apt-get install php5.6
You can install php5.6 modules too for example
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
Verify your version
If you have installed php5.6-cli
sudo php -v
If you don't have php5.6-cli, put this on a .php file
<?php 
      //outputs php configuration info
      phpinfo(); 
?>

restarting apache

dpkg-reconfigure phpmyadmin

x

Sunday, May 22, 2016

Transfering SQL database between two linux servers

Process for moving a database between two linux servers running mysql.

Target server may or may not have the database created.  example used uses phpmydmin create database to create the empty database.

Use mysqldump to create an ".sql" file with the data from the database.  Example here is for an RSS reader application, and keeps track of the rss feeds for doing deltas for the read presentation.

Note for sql the password and user id are for the mysql users and the password on the mysql server.  They are not linux account passwords.  The commands can be performed from any userid with access to the mysql commands, since the database is worked via the mysqldump command to the mysql socket.  Access to the actual files is not required, since the work is done on those files by the mysql server.

backup:

 mysqldump --password=<some-password> -u <userid> rss > 2016-0522-rss-mysqldump.sql

create database in phpmyadmin: 

Databases->Create new Database [enter rss in name field] (Create)

restore:

mysql -u <userid> --password=<password> rss < 2016-0522-rss-mysqldump.sql


Friday, March 27, 2015

Lamp server install link



Here is a nice LAMP server setup page.

Using and posting this from a 2" x 2" x 2" quad core cubox debian system.

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-debian

Will copy edit inline later on update.

use sudo apt-get -y install apache2 mysql-server mysql-client php5-cli phpmyadmin 
to get that running

Install mysql
Install apache2 (if not by default)
install php

if php is installed prior to apache you may need to install

libapache2-mod-php7.0 (or whatever php if earlier or later install)