You are here

upgrading phpMyAdmin

Recent exploits that use phpMyAdmin highlight the need to keep this code up to date. For more info, see:

#first set up the basic info.
#find latest version here:
#pma directory--could be: mydir=/usr/share
# using ln -sfn /usr/share/phpmyadmin/ /var/www/html/phpMyAdmin

phpMyAdmin=phpMyAdmin  #could be: phpMyAdmin=phpmyadmin
#test with:
ls $mydir/$phpMyAdmin/

#now do the install (you may want to run this one line at a time

cp -a $mydir/$phpMyAdmin/ ~
wget -O - "$version/phpMyAdmin-$version-english.tar.bz2"  | tar xj -C $mydir
mv $mydir/$phpMyAdmin $mydir/$phpMyAdmin-old
mv $mydir/phpMyAdmin-$version-english $mydir/$phpMyAdmin
cp -a ~/ $mydir/$phpMyAdmin

#once you have tested it, then the old version can be deleted:

rm -Rf $mydir/$phpMyAdmin-old

#If the program needs to be setup:

cd $mydir/$phpMyAdmin
mkdir config                  # create directory for saving
chmod o+rw config             # give it world writable permissions

#visit the /setup page

mv config/ .    # move file to current directory
chmod o-rw     # remove world read and write permissions
rm -rf config                 # remove not needed directory