Ubuntu20.04 Install Apache PHP MySQL on Digital Ocean Droplet

First create a Digital Ocean Droplet with OS Ubuntu20.04, choose password login for SSH into droplet. # apt update # apt install unzip -y # apt install curl -y Install Apache & MySQL Server # apt install apache2 -y # apt install mysql-server -y # mysql_secure_installation (it will ask you MySQL server login new password) … Read more

Fatal error: Call to undefined function mysql_query() – PHP

I was working on my old project it was using old mysql extension function for PHP, but Server have latest PHP version 7. So I am getting below Errors…. Fatal error: Call to undefined function mysql_query() – PHP Fatal Error: Uncaught error: Call to undefined function mysql_connect() Here is quick & dirty fix for old … Read more

Install Apache, MySQL, PHP 5.6 on Centos 7

Install Apache # yum update # yum install httpd # systemctl start httpd.service Now Browser your Apache Server http://Server_IP_address/ Enable Apache to start at server boot # systemctl enable httpd.service Install Mariadb MySQL # yum install mariadb-server mariadb # systemctl start mariadb # mysql_secure_installation Enable MySQL to start at server boot # systemctl enable mariadb.service … Read more

Importing data from non-wordpress mysql database

You have to create an import php file to get the Questions/Answers from a non-wordpress database and bring them into posts in wordpress. Question Table <?php /// non-wordpress database connection string here require(‘./wp-load.php’); $results = mysql_query(“SELECT * FROM questions”); while ($row = mysql_fetch_assoc($results)) {     $post_information = array( ‘post_title’ => wp_strip_all_tags( $row[‘question’] ), ‘post_content’ => $row[‘answer’], … Read more

Recover MySQL root Password

1. Stop the MySQL server. # /etc/init.d/mysql stop 2. Start the MySQL server process with the –skip-grant-tables option so that it will not prompt for password. # mysqld_safe –skip-grant-tables & 3. Connect to mysql server as the root. # mysql -u root Welcome to the MySQL monitor…. ……….. Type ‘help;’ or ‘\h’ for help. Type … Read more

Replace phpMyAdmin by Adminer

Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. It consist of a single file ready to deploy to the target server. Adminer is available for MySQL, PostgreSQL, SQLite, MS SQL and Oracle. phpMyAdmin is one of the most famous tools for managing the MySQL database. However, Adminer have important differences with … Read more

Upgrade PHP & MySQL on Plesk 10

1. Stop Running Apache & MySQL Server # /etc/init.d/mysqld stop # /etc/init.d/httpd stop 2. Set up the atomic channel # wget -q -O – http://www.atomicorp.com/installers/atomic | sh 3. Upgrade to PHP 5.3.x on plesk 10 # yum upgrade Now I can install “uploadprogress” extension easily pecl/uploadprogress requires PHP (version >= 5.2.0), installed version is 5.1.3 … Read more

CentOS Latest RPM for PHP MySQL

[root@svnlabs ~]# yum install php php-soap php-xmlrpc php-imap php-mcrypt php-mhash php-mbstring php-mysql php-xml php-gd php-cli php-common php-api Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: centos.mirrors.tds.net * extras: mirror.sanctuaryhost.com * updates: mirror.fdcservers.net Setting up Install Process Package matching php-5.1.6-32.el5.i386 already installed. Checking for update. Package matching php-mcrypt-5.1.6-15.el5.centos.1.i386 already installed. Checking for … Read more

Installing Apache, MySQL, PHP in CentOS 5.5 on Rackspace Cloud

Most of cloud users prefer Rackspace Cloud for its better service and cost effectiveness… All commands are performed as root to install Apache, MySQL, PHP in CentOS 5.5 Server on Rackspace Cloud. Install Apache # sudo yum install httpd mod_ssl Configure ServerName # sudo /etc/init.d/httpd start Remove Error Starting httpd: httpd: Could not reliably determine … Read more

PHP ORM – Create select box with mysql set or enum

PHP have rich set of functions to solve real time problems in programming and web development.. thanks to Rasmus Lerdorf eval — Evaluate a string as PHP code A SET datatype can hold any number of strings from a predefined list of strings. The ENUM datatype restricts to a single member of the set of … Read more