system's Profile
Supporter
145
Points

Questions
51

Answers
50

  • Supporter Asked on March 2, 2017 in Software.

    Ya vestaCP should be installed on clean server , so to remove exim4 run then following commands to remove exim4

     
    apt-get remove exim4 exim4-base exim4-config exim4-daemon-light
    apt-get purge exim4 exim4-base exim4-config exim4-daemon-light
    

    This answer accepted by system. on March 2, 2017 Earned 15 points.

    • 589 views
    • 1 answers
    • 0 votes
  • Supporter Asked on February 13, 2017 in Software.

    cpanel 11.42 and higher version support 5.6 so you can upgrade easily to 5.6 if you are upgrading from mysql 5.5 , you will not need to recompile php for it , however if you are upgrading from 5.4 or lower version then its better to upgrade first to 5.5 than 5.6 respectively.

    so to upgrade to 5.6 first login to ssh
    and then edit cpanel.config file for desire mysql version

    nano /var/cpanel/cpanel.config
     

    find string mysql-version=   and set it to 5.6 

    save cpanel.config file and run

     /usr/local/cpanel/scripts/check_cpanel_rpms –fix
     

    this will remove old version of mysql and will install mysql 5.6 and will also upgrade mysql database tables , so you do not need to run mysql_upgrade command

    This answer accepted by system. on February 13, 2017 Earned 15 points.

    • 206 views
    • 1 answers
    • 0 votes
  • Supporter Asked on January 28, 2017 in Software.

    Hmmm mysql take long time with start or restart command can be issue of log file , in case when log file are too big this occur , solution is simple you just need to delete log files as you may have not limited log file size from my.cnf config file which you should do to avoid this in future ..

    so goto mysql data directory or if you do not know about your mysql data directory you can open my.cnf config file and then look for

    nano /etc/mysql/my.cnf    #   mysql config file my.cnf
    
    datadir         = /usr/local/mysql/data/
    
    

    so in my case it will be

    
    cd /usr/local/mysql/data/
    
    

    now remove error log and other log files

     

    rm mysql-error.log
    rm ib_logfile0
    
    rm ib_logfile1
    
    

     

    now try to start mysql server with

    
    service mysql restart
    
    

    if mysql server start goes ok then you edit my.cnf and below lines it end of file to limit log files size

     

    # LOGGING #
    
    log-error = /usr/local/mysql/data/mysql-error.log
    
    slow-query-log = 1
    
    slow-query-log-file = /usr/local/mysql/data/mysql-slow.log
    #relay log restrictions
    
    relay-log-space-limit=10M
    
    

     

    This answer accepted by system. on January 28, 2017 Earned 15 points.

    • 184 views
    • 1 answers
    • 0 votes
  • Supporter Asked on January 28, 2017 in Software.

    well from there error i can see you have php 5.4 installed and yum have GD library package for php 5.3 which is causing the conflict .

    so for php 5.4 you can install GD2 library with below command

    yum install php54-gd
    

    after that restart Apache 

    service httpd restart
    

    and finally you can check  in package list 

    rpm -qa | grep php
    

    you will see package name something like  

    php54w-gd-5.4.45-2.w6.x86_64
    

    now run phpinfo()  and check if GD library in it or not 

    This answer accepted by system. on January 28, 2017 Earned 15 points.

    • 1184 views
    • 1 answers
    • 0 votes
  • Supporter Asked on December 28, 2016 in Software.

    PECL id3 extension is simple just need little changes in code to make it compatible with recent php versions .

    • download and extract id3 extension using

     

    pecl download id3-alpha
    tar -zxvf id3*.tgz
    
    
    • next switch to extracted dir and edit id3.c

     

    cd id3-alpha
    vim id3.c
    
    

    change line #196 from

    
    function_entry id3_functions[ ] = {
    
    

    into

    
    zend_function_entry id3_functions[ ] = {
    
    
    • next configure it for installation with
    
    phpize
    
    

    if phpize command give you error then run below command to install few utilities then try again running phpsize  otherwise skip this step

     

    yum install php-devel
    yum install php-pear
    yum install gcc gcc-c++ autoconf automake
    
    

    if phpsize is ok then configure and make it with

    
    phpize
    
    ./configure
    
    make
    
    make test
    
    make install
    
    

    and finally edit php.ini to add the id3.so extension

     

    vim /etc/php5/apache2/php.ini
    or
    nano /etc/php5/apache2/php.ini
    
    

    add the below line to Dynamic Extensions section in php.ini

    
    extension=id3.so
    
    

    and now restart apache like

    
    service apache2 restart
    
    service mysql restart
    
    

    or

    
    /etc/init.d/apache2 restart
    
    /etc/init.d/mysql restart
    
    

     

     

     

     

    • 447 views
    • 1 answers
    • 0 votes
  • Supporter Asked on December 28, 2016 in Software.

    js code can be execute it end after loading of all scripts if its enclose in load function like

     

    $(window).load(function() {
    // code goes here like
    $('.popup').trigger('click');
    });
     

    or 

     
    $(function() {
    // code here
    });
     

    This answer accepted by system. on December 28, 2016 Earned 15 points.

    • 201 views
    • 1 answers
    • 0 votes
  • Supporter Asked on December 1, 2016 in Software.

    ya its good thinking to add google reCAPTCHA to phpmyadmin login page to make it secure.  To add reCAPTCHA first make sure you have latest version of phpmyadmin installed as older version not support reCAPTCHA.

    first signup for google recaptcha by visiting :: https://www.google.com/recaptcha/
    add one of your website domain there  and  get sitekey and secret key  , on that domain settings page goto bottom of page and  click Advance Settings  then you will see Domain Name Validation heading and with it you will see checkbox :: Verify the origin of reCAPTCHA solutions    , so uncheck that checkbox and save settings.

    so to upgrade phpmyadmin to latest version check ::  https://answers.w3db.xyz/question/how-to-upgrade-phpmyadmin-to-latest-version/ 

    once you have latest version of phpmyadmin or above 4.5  then login to ssh and edit

     

    cd /usr/share/phpmyadmin/
    nano /config.inc.php
    vim /config.inc.php   # if nano is not installed try to edit with vim
    cp config.sample.inc.php config.inc.php   # if no config.inc.php file is there then run it will create config.inc.php file then edit it with nano or vim
    

    in config.inc.php file add these two lines somewhere top or bottom or middle or below $cfg[‘blowfish_secret’]

    $cfg['CaptchaLoginPublicKey'] = 'paste here site key here you get from google in above step';
     $cfg['CaptchaLoginPrivateKey'] = 'paste here secret key you get from google in above step ';
    

    save it , and logout from phpmyadmin now you will see google recaptcha on login screen

     

    This answer accepted by system. on December 1, 2016 Earned 15 points.

    • 1075 views
    • 1 answers
    • 0 votes
  • Supporter Asked on December 1, 2016 in Software.

    this version mismatch warning actually mean that your existing php version was compiled with mysql another version and now currently installed version is different , anyway to fix this just install mysqlnd driver

     

    apt-get install php5-mysqlnd   # for Debian ubuntu etc
    yum install php5-mysqlnd   # for CentOS
     

    during installation it may ask you to remove php5-mysql package so press Y to remove it

    when mysqlnd driver is installed then restart php and mysql services

     

    service apache2 restart
    service mysql restart
    

     

     or
     
    /etc/init.d/apache2 restart
    /etc/init.d/mysql restart
    

    This answer accepted by system. on December 1, 2016 Earned 15 points.

    • 621 views
    • 1 answers
    • 0 votes
  • Supporter Asked on December 1, 2016 in Software.

    this error occur when phpmyadmin is unable to login to its phpmyadmin database , so this error caused by mostly uninstalling/updating/reinstalling phpmyadmin or mysql .

    to fix this we have just to update phpmyadmin config-db.php file with valid mysql account

    login to server and edit config-db.php file which can be found normally in

    
    /etc/phpmyadmin/config-db.php
    
    

    can be edited with vim / nano or other editors , personally i like nano

     

    apt-get install nano   # for debian / ubuntu
    yum install nano   # for CentOS
    
    

     

    then to edit config-db.php

     

    cd /etc/phpmyadmin/
    nano config-db.php
    
    

    then update these two lines with mysql account , which can be root account or you can create new user account in phpmyadmin  users tab

    
    $dbuser='phpadmina';
    
    $dbpass='accountpassword';
    
    

    save it by pressing Ctrl + X  , nano will ask to save file press Y

    and finally reload phpmyadmin and error will be disappeared .

     

    This answer accepted by system. on December 1, 2016 Earned 15 points.

    • 723 views
    • 1 answers
    • 0 votes
  • Supporter Asked on December 1, 2016 in Software.

    To purge mysql and install mariadb is easy on debian , just follow below steps

    first install some tools by running

    
    apt-get install software-properties-common
    
    

    next add mariadb identification key repository

    
    apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
    
    

    finally add repository , currently mariadb stable version is 10.1 , although you can check for new stable release on their site

    
    add-apt-repository 'deb [arch=amd64,i386] http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.1/debian jessie main'
    
    

    next update things before going to install maria

    
    apt-get update
    
    

    and finally time to install maria and during installation it will ask for root password , then type mysql old root password or if you have not changed mysql root password it will be same as your vestacp password so enter vestacp  password which will be your mysql root password by default , so  that when mariadb is installed then vestapcp will communicate with mariadb with that root account

    
    apt-get install mariadb-server
    
    

    once installation is done , you can reboot server by command

    
    reboot
    
    

    once server is reboot login again to ssh and check maria version by

    
    mysql -V
    
    

    you will see something like : mysql  Ver 15.1 Distrib 10.1.19-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

     

    This answer accepted by system. on December 1, 2016 Earned 15 points.

    • 998 views
    • 1 answers
    • 0 votes