so before start this tutorial we should take an small overview about PHP IMAP Module and its advantages.
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.
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.
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.
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.
Welcome back to shortlearner.com, so today we are starting a new tutorial category in our learning platform. in our previous post we learn how to implement Razorpay payment gateway with the help of PHP. so in this post today we will learn how to Install PHP on CentOS. before start this tutorial first of all we should take an small overview about CentOS and PHP.
we all know about PHP is a server side scripting language which stands for hyper text processor. mostly PHP is used from web based software, its easy to learn. 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. so in this post we will learn to install the PHP version 5.6. which is most popular PHP version.
In our next article we see how to install PHP My Admin and MySQL in CentOS. Let’s see some features about PHP version 5.6 Reduced Memory due to the reuse of php://input. Numeric, String and constant have scalar expression. A constant array can use constant keywords. PHP 5.6 can be used for command-line scripting. Graphical user interface application can also be used by clients. It has advanced protection patches.
Please make sure that remi:repo file was enable. i.e Enable=1 (inside remi:repo file) .Next point is to check the package was having required version for installation . Step1: Type the below command to install the rpm release packages. This will help you to install the packages of PHP version you wish to install.
Step2: now we are install utils. This will provide user with advanced package management options. So that no manual configuration required for enabling and disabling the packages. For this, install utils command given below.
Enter Y after the utils command execution completed. Step3 : In the next step we will be the most important program provided by utilities is configuration manager, through which the activation of ‘Remi repository’ will happen. This will be the default manipulating repository settings provided by utilities. which is help us to install any version of PHP.
In the end of command you can see two digits, which represents the version number.Eg: 56 for PHP 5.6 , 74 for PHP 7.4Below command will enable you the selected version.
Step4: We are going to install the PHP of required version. You can use any extension from the list given below with respect to your library files.
In this short article, We will write simple and easy code to get the domain name from URL by using some predefined PHP function.
First we need to parse URL using parse_url(). so we can get the array from parse URL and now we can fetch the specific host from the array using $parse[‘host’].
so in the below example we will find the domain name from a predefined URL which are in our $url variable. so copy the below code and run it on your server so you will found the domain name from a long URL.