New to our community ?

Discover a world of possibilities! Join us and explore a vibrant community where ideas flourish and connections thrive.

One of Our Valued Members

Thank you for being part of our community. Your presence enriches our shared experiences. Let's continue this journey together!

Home Blog Page 6

How do I Install and enable PHP modules

0

Welcome back to shortlearner.com, in our previous post we learn how to install Apache Web Server on CentOS.
today in this post we will see How do I Install and enable PHP modules.

so before start this tutorial we should take an small overview about PHP IMAP Module and its advantages.

Enable IMAP extension

What is IMAP.?

so basically IMAP is a mailbox with having a powerful and open source library to connect mailbox with POP3, IMAP and NNTP using the PHP IMAP extension.

in PHP by default the IMAP extension is disabled. so we are writing a PHP script for finding that PHP IMAP is installed or not.
so we are creating a file with the name of info.php . to find the information about PHP.

so after running this info.php file ,we got some out like below image.

PHP IMAP Extension

Enable IMAP in Xampp

just follow the below steps to enable IMAP extension in xampp.
1.go to the file \xampp\php\php.ini and open php.ini in your editor.
2. find ;extension=php_imap.dll
3. Remove semicolon from ;extension=php_imap.dll.
4. Now, now it should looks like extension=php_imap.dll
5. Save your file and restart the xampp server.

Enable IMAP in Linux

so if you are a linux user and want to enable IMAP in your server. so just follow the below steps for enabling it.
1. open your terminal and run the below commands.

sudo apt-get install php5-imap

2. for enabling IMAP use the follow command.

sudo php5enmod imap

3.after enable IMAP we should restart our webserver by following command.

service apache2 restart

Install IMAP on Ubuntu

sudo apt install php7.1-imap

after installing IMAP on PHP7.1 restart apache by below command.

sudo systemctl restart apache2

hope you also install and enable the PHP module by following all the above steps. if you still having any problem ,feel free to contact us.

How to install Node JS in CentOS-7

0

Welcome back to shortlearner.com, in our previous post we learn how to install Apache Web server on CentOS.
today in this post we will see How to install Node JS in CentOS-7.
so before start this tutorial we take an overview about Node JS and CentOS.

What is CentOS

CentOS is a Community Enterprise Operating System. It is an open-source platform for non-productive developmental work.
For production concern, those works can be migrated to RHEL (Red Hat Enterprise Linux) Linux distribution platform.

install node js on centos

What is Node JS

The Node.js platform is a server-side runtime environment based on JavaScript.
Node.js is a super-fast, high-performance and lightweight framework, ideal for asynchronous programming. With Node.js you are able to execute multiple actions at the same time.
so basically Node JS is a platform where developers can use JavaScript for backend development.

Also Read
How to Install phpMyAdmin on CentOS 7 – Google Cloud

Before Installation

Before the installation process of Node JS make sure you have already installed these below stuff.

Apache Web Server  – We need to install Apache! Check out our article Install Apache on CentOS 7.
PHP  – Then we need to install PHP! Check out our article Install PHP on CentOS.
MySQL  – Then we need to install MySQL! Check out our article Install MySQL on CentOS 7.
follow the below steps for installation od node.js

Step 1: VM Setup

so in the very first step logged in to your google cloud account and select the Compute Engine option from the menu.
follow the below image for better understanding.
Now we can see VM instances in Compute Engine. Click on that as shown in below image

google cloud VM instance

so we just click on the open in browser window and than we will see terminal there. follow the below commands on the terminal.

Step2: Add Yum Repository

so before adding this repository we should know about what is Yum Repository.

YUM (Yellowdog Updater Modified) is an open-source command-line that creates, maintains, updates, removes and manages a high-quality set of packages on CentOS.

yum install -y gcc-c++ make

Step 3: Build native add-ons:

after installation of YUM repository ,we have to install native add-ons from NPM We will install a compiler.

The latest version of Node.js

curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash –

The stable version of Node.js

curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash –

Step4:Install Node.js

Now are having the packages of Node.js and NPM. We can install the Node.js package using the following command.
By executing below command, Node.js and NPM packages both will get install.

sudo yum install nodejs

After installation of Node.js

Step1:Testing Node.js

To check the installation of Node.js, we need to execute the below command. This will display you the version we installed.

node -v

Step2:Testing NPM

To check the installation of NPM, we need to execute the below command. This will display you the version of NPM we installed.

npm -v

So finally we learn the installation process of Node JS on CentOS 7.

How to Install Apache Web Server on CentOS

0

Welcome back to shortlearner.com . in our previous post we learn how to install phpmyadmin on CentOS.
today in this post we will see how to install Apache web server on CentOS.

so before start the installation process we should take an overview about Apache web server.

install apache on centos

What is Apache Web Server

Apache is the most widely used Web Server application in Unix-like operating systems but can be used on almost all platforms such as Windows, OS X, OS/2, etc.
The word, Apache, has been taken from the name of the Native American tribe ‘Apache’, famous for its skills in warfare and strategy making.

Also Read
How to Install phpMyAdmin on CentOS 7 – Google Cloud
How to Install MySQL on CentOS 7

What is CentOS

CentOS is a Community Enterprise Operating System. It is an open-source platform for non-productive developmental work.
For production concern, those works can be migrated to RHEL (Red Hat Enterprise Linux) Linux distribution platform.

Before Installation:

two main configurations are perfect before the installation of Apache Web Server

First one is Non-root User configuration and another one is the Firewall Configuration.
These configurations will have sudo privileges to execute the commands. These initial server setup will enable root login, authentication key, SSH Daemon configuration, increased security and usability.

Installation Process.

Let’s start the installation.
First, log-in with the SSH from your instance.
Go to Compute Engine and select VM Instances

google cloud VM instance

so we just click on the open in browser window and than we will see terminal there. follow the below commands on the terminal.

sudo yum install httpd

Installation will take some time so we should wait for it.
After the installation complete. Next step will be enabling the package from the updates.
wecan use the below command to enable the Apache web Service.

sudo systemctl enable httpd

we are going to start the Apache Web Service of the required version.
Here we need to start the package manually because the automatic start option will not be present.
So to start your Apache Service, apply the below command.

sudo systemctl start httpd

we can also manage the configuration by using the keywords, Start, stop, enable, disable, reload, restart etc.

How to Install phpMyAdmin on CentOS 7 – Google Cloud

0

Welcome back to shortlearner.com, in our previous post we learn how to install PHP in CentOS.
today in this post we will see how to install phpMyadmin on CentOS with the help of google cloud.

how to install phpmyadmin on centos

so before start this tutorial we should know some basic terms about phpMyadmin, centOS and google cloud.

What is phpMyadmin

so phpMyadmin is an open-source tool, which is used to administrate MySQL over the web interface.

phpMyadmin is one of the best GUI(Graphical User Interface) base database Management platform .

it is also used in MariaDB Database management. phpMyadmin is available in more than 78 languages.

What is CentOS

CentOS is a Community Enterprise Operating System. It is an open-source platform for non-productive developmental work.


For production concern, those works can be migrated to RHEL (Red Hat Enterprise Linux) Linux distribution platform.

What is Google Cloud

Google Cloud Platform offers services for compute, storage, networking, big data, machine learning and the internet of things (IoT),

as well as cloud management, security and developer tools. 

Features of phpMyadmin

provides compatibility to Create , Alter, Add, Drop, Rename , Import tables from CSV and SQL and Export tables from CSV, SQL, XML, PDF, etc. 

we can easily manage database, tables, fields, columns, indexes, relations, permission, etc.

 it can works with different operating systems and makes complex queries easier by using its predefined functions.


You can create PDF graphics of database layout. You can also search globally in a database or subset of it. 
phpMyAdmin can administrate multiple servers.

Also Read :

Also Read :

Password and Confirm Password Validation Using JavaScript
PHP Login Script With Remember me.
Change password using javascript, php and mysqli.
Check Email is Already Registered in Database using Ajax and JavaScript.

Before Installation

Before the installation process of phpmyadmin make sure you have already installed these below stuff.

Apache Web Server  – We need to install Apache! Check out our article Install Apache on CentOS 7.
PHP  – Then we need to install PHP! Check out our article Install PHP on CentOS.
MySQL  – Then we need to install MySQL! Check out our article Install MySQL on CentOS 7.

Step 1: VM Setup
so in the very first step logged in to your google cloud account and select the Compute Engine option from the menu.


follow the below image for better understanding.
Now we can see VM instances in Compute Engine. Click on that as shown in below image.

google cloud VM instance

so we just click on the open in browser window and than we will see terminal there. follow the below commands on the terminal.

Step 2: Adding the EPEL Repository
before adding this repository we should take an small overview of EPEL.
so basically EPEL is Extra Package for Enterprise Linux.

which creates, maintains, and manages a high-quality set of additional packages on CentOS. EPEL has an epel-release package that includes GPG

keys for package signing and repository information.
just follow the below command in the terminal for add this repository

sudo yum install epel-release

Step3 : Install PhpMyAdmin
we have enable EPEL Repository ,now we have to install phpmyadmin by using followinng command.

sudo yum install phpmyadmin

Step 4 : Configuration
so for doing configuration first of all we need to have grant remote access.
We are going to make changes in the config file.


For that, we can get into the config file by using the below command.

vim /etc/httpd/conf.d/phpMyAdmin.conf

once the command is executed we will see the below lines which is shown in the below image.

configuration of phpmyadmin in centos

Step 5 : Edit in phpmyadmin.conf file
In the above image, wecan see the line Require ip. The default value will be 127.0.0.1.
we need to replace the IP string with our machine IP.

  • To update the change , press “i”.
  • Replace that “Require ip” with the IP of your machine.
  • Saving the changes made in the config file, enter “:wq“.
  • Then exit from the phpMyAdmin.conf file by pressing ESC Key.

the changes are updated in the phpMyAdmin.conf file.

Step 6 : Restart the Apache Web Server
Now we need restart the apache web server to sync up the updated phpMyAdmin.conf file with Apache Webserver.

Once this is done, we are ready to start using phpMyAdmin.
use the following command to restart the apache web server.

systemctl restart httpd

After installation of phpMyAdmin

so we have successfully installed the phpmyadmin in our CentOS.
to check the GUI (Graphics user interface) of phpmyadmin.

go to the browser and type http://127.0.0.1/phpmyadmin . so the default IP is 127.0.0.1 so you must replace it with your machine IP.

Setup Login Credentials
You can set your credentials (Username and Password) in a below-mentioned manner.

First, we need to get into the phpMyAdmin installation directory by using below command.

/etc/phpMyAdmin

Here you can find the below mentioned file.

config.inc.php

Now we are going to create your credentials in this file. By using below command we can edit the config.inc.php file.

vim config.inc.php

Edit the file with your own credentials. As we did before, for Saving the changes made in the config file, enter :wq. And then exit from the config.inc.php file by pressing ESC key.

Unable to create directory Error in WordPress

0

Welcome back to shortlearner.com, in our previous post we will see how to install WordPress in CentOS.
In this post today we will see how to fix the unable to create directory error in WordPress.

unable to create directory in wordpress

so i recently i was working on a WordPress based project so when i try to upload/import media into WordPress’s media library then i got some kind of error ,which are mentioned below.
this tutorial is for you. It will show you how to fix this annoying error.

Also Read :
Get Domain name from URL
How to Send Attachment on mail using PHP.
PHP Login Script With Remember me.
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

  • Unable to create directory wp-contents/uploads
  • not able to create directory/ wp-contents/uploads/ Is its parent direcotry writable by the server.?
  • Unable to create directory wp-contents/uploads/2020/07

There are a few different possibilities for this error to show up. I will try to cover all the possibilities so hopefully one of them will help you fix the issue.

1: Update/Change the Uploads Directory Settings

this is one of the easiest way to fix that kind of errors. i personally recommend to follow these steps if you have an error like that.

  1. Log into your WordPress admin dashboard.
  2. Go to Media which are inside the Settings menu (Settings -> Media).
  3. Enter wp-content/uploads in the text box.
  4. Save the changes by hitting the “Save Changes” button and you are done.
Unable to create directory Error

2. Manually Change the Folder Permission

if the above method is not working for you don’t worry about it.
we have one another trick to handle this kind of annoying errors.
just follow the below steps and change the folder permission.

  1. Change folder permissions on the wp-content directory to 775 and try the upload again
  2. If it fails, change the permissions to 777 and try again
  3. if it still fails then do step 1 and 2 for the “wp-content/uploads” directory too

Once you can successfully create the folder and upload the media, be sure to return the permissions on wp-content directory to 755 (your folders should have a permission of 755 for security reasons).

Unable to create directory wp-content/uploads