Archive

warning: cannot modify header information

When you visit your website sometime you see an error: Warning: cannot modify header information  – headers already sent by (output started at /public_html…….)

This error may occur from developer side. Sometimes send the output before calling header or most occur due to whitespaces.

warning: cannot modify header information

How to resolve this error:

you can resolve this problem by coding. Because this error may occur when you send your code output before the header () function. To avoid this problem you should set your header function before send the code output. To resolve this problem you will hire a developer.

Another method is to resolve this error by creating a phprc file. If you don’t know how to coding then don’t worry about that. you can solve this error within few lines. First of all you should know that how to create phprs file. you can create phprc file by using FTP or SSH.

How to create a phprc file in FTP:

  1. you login to your web server via FTP client. you are using file zilla for this process.

step 1 login file zilla

  1. Ensure that you are in your correct directory. Otherwise your small problem going to be big problem.
  2. Click on .php file which you see that already exit.

step 4 php file

  1. In .php folder you can see that there are several other folders. Which are representing the version of php. For choosing the version from this folder. you should ensure that which version is your site is using. For example your site using 7.4 and you should click on 7.4.

step 4 php versions

  1. In this directory you will see a phprc file. Right click on phprc file and choose view or edit.

step 5 edit file

  1. After clicking on this file you can see the following lines of code which is open in your default editor.

step 6 code

  1. When you complete your task then you want to save your file then you see a pop up message. Which show that file is change and check box ‘finish edit and delete local files’. Now click on yes button.

step 7 save file

 

  1. When you complete these steps then check that any php process is in running form or not. if process is running then kill off all these process. Which are running in php.
  2. When you have to complete all steps and kill the php process. Now confirm that your files our update or not. you can check by using phpinfo.php file.

Note: when different php versions are running in your site. E.g. you have four domains first two domains are using 7.3 version of php. Domain using 7.2 and fur using 7.4. And the problem is with 7.2 then you create a phprc file for 7.2.

you can create phprc file using SSH.

You might be interested in following articles:

How To Update Php In WordPress

Php Max_execution_time

How to create phprc file using SSH:

  1. Login to your website server via SSH.
  2. First ensure that you are in correct directory or not. For this type

[server]$ pwd

/home/example_username

  1. Run the mkdir If you want to create phprc file in 7.2 version then choose 7.2.

[server]$ mkdir  -p ~/ .php/7.2

  1. Change your directory into these folders which you create. By using the cd command.

     [server]$ cd .php/7.2

When you run pwd command. you can see the path of file which you create.

[server]$ pwd

/home/example_username/.php/7.2

  1. In the current folder create the phprc file without extension.
  2. Run this command for create the phprc file.

  [server]$ nano phprc

By using this command your nano text editor will open.

  1. Now you are going to edit your file using your php customization.

;{{{ this following lines were automatic added by arzhost_extension=opcache.so; }}}

  1. Now close your file and return to your shell.
  2. After completing all these steps. you should kill your running php processes. And ensure that your setting is update or not.
  3. you can see that your error Warning: cannot modify header information  – headers already sent by (output started at /public_html…….)  will remove.

How to edit a file in Linux

you can edit the file name in Linux in different ways. you can use nano and vim for how to edit a file in linux. All these are available in Linux distribution. E.g. ubantu, arch, debian, fedora etc.

How to edit a file in Linux using nano editor:

introduction of nano editor:

  • User interface of nano look like this.intoduction of nano editor

nano interface

  • On the top of the nano editor it tells about the version of nano and the file name.

nano editor version

  • Then in the prompt below the version number whole black screen. This is our main part where we type our commands for edit our files.

command area

  • Below of the editing area here are some shortcut keys.

short cut keys

How to edit file:

  1. Login to your web server through SSH.
  2. Navigate the directory location where you want to edit or create the file.
  3. In the command area type nano along with the file name. for example if you want to edit a file test.html then you write these lines of code:

                      [server]$ nano index.html

  1. A file is open name is test.html.

file name

  1. Now you can type your data which you want.

write your data

  1. When you have done to write your data then you can save your file by press ctrl+o.
  2. On the bottom of the prompt he asking you to write the file name. you confirm your file name test.html.
  3. Press the enter key for to save the file.
  4. When you have done your work then press ctrl+X for exit the nano.

Using ‘vim’ editor:

Vim is a good editor as compared to nano. Vim is for advance and nano is for fresh user.

How to create and edit the file:

  1. Login to web server through SSH.
  2. Navigate the file which we want to create or edit it.
  3. Type vim as well as file name which we want to edit. E.g. our file name is test.html then we write like this:

[server]$ vim test.html

  1. When we open vim we confuse how to write file name here.

vim interface

  1. For enter in the insert mode of vim press I on keyboard.

                    vim insert mode

  1. If we want to delete a character which is under the cursor we can press ‘X’.
  2. If we have done changes with our file then we want to save our file then press ‘X’ as well as ensure that we are in insert mode.
  3. If we are not in insert mode and we want to save our file without any change then we can press q.
  4. If we have made some changes with our file and we want to save without any change and leave the file we can press q!. Butt ensure that we are not in insert mode.
  5. If we want to leave the vim then we can press esc

 Read the following articles:

How to update php in wordpress

 Why we need to update PHP version:

  PHP plays an important role in your wordpress. you should see the latest updates of PHP. If your PHP version is latest then your web sites work efficient. Now the current version of PHP is 7.4.  If your PHP version is latest then your site is faster than old version. If you want that your site become safe from hackers. then you should update PHP version because it has the latest security features. and you should know that how to update php in wordpress.

There are a lots of benefits if your website use latest version of PHP. Latest version help your website on high rank position. If you use latest version then your site is secure from hacker and you can secure your data and cost. Some time you forget to update PHP version. So you should make a backup for your site otherwise you face many problems.

How to update php in wordpress

For update the PHP version you should follow these steps:

  • Login to your wordpress account.
  • Click on dashboard.

wordpress dashboard

  • After click on dashboard scroll down the page. you can see that a warning massage is show in box PHP update required.

php update required

  • For update the php version you want to login your cpanel.
  • In cpanel go to software section and click on multiPHP manager. After click on it you this this type of window.

php diffrent versions

  • you can see that in your cpanel in domain part behind the every domain 7.1 version of PHP is install.
  • Now you are going to update your PHP version.
  • you can see that on arrow position PHP versions are available.
  • you choose latest version and click on apply.

latest php version

  • Now your PHP version is change.

change version

  • Now check out in your wordpress dashboard error is drop or not.

no error

  • Our php version is update successful.

There is another method to check the health of your website:

  • Login to wordpress and move cursor on plugin chooses add new plugin.
  • Search a plugin health check and troubleshooting. install this plugin and apply on your website.
  • This plugin tells you about the health of your website as well as recommended improvement.

health care

Conclusion:

In this article we talk about the security of your website. How to improve the security using PHP latest version. And how to update PHP in wordpress using cpanel and convert on wordpress.

You can also read the following articles:

How To Zip A Directory In Unix

Php Max_execution_time

how to zip a directory in unix

Zip is like a container in which you compress the files and contain huge data. When you want to transfer a huge data to another place. Then you compress the files and transfer data. you save the zip files using .zip extension. Today websites have heavy data when you want to download some files then you download in compressed form. you save these files using .zip extension and compress files using software which is installed in your system. Today almost every operating system has zip system like UNIX, mac and windows etc. here you use unix you should know that how to zip a directory in unix.

How top zip folder using zip command in UNIX:

You can zip the files in UNIX by using the zip command. There are many option to zip files, when you use zip command as well as you use many other option like ‘-r’ ‘f’ ‘u’ ‘d’ ‘m’ ‘j’ ‘o’ ‘9’ ‘q’ ‘v’ ‘c’ and there are many others every option have its own characteristics. But here you use ‘-r’ option. If you want to zip folder you write these lines of code:

$ zip –r <output_file>  <folder_1>  <folder_2>  … <folder_n>

If you want to archive a folder name ‘arzhost’ in zip file which is ‘test.zip’. for achieve this task you use these commands:

                            $ zip –r test.zip arzhost

If you want to see that our zip file is created or not then you use ‘Is’ command for archive file.

                                    $ Is – I  |  grep .zip 

If you didn’t know that where your zip file is store then you use these lines of code to find oyour files.

 $ find  /  -name  * .zip  2>  /dev/null 

Zip the folder using FIND option:

One of the most power full command is to zip files into your folders. you use ‘FIND’ command and link it to ‘exec’ option for execute the zip command. If you want to zip your folders in current working directory then you use these lines of code.

                 $ find . -maxdepth 1 -type d -exec zip archive.zip {} +\     

zip folder using find

 How to zip directories using bash system:   

you can zip folders using bash programming language. Sometime you haven’t any GUI then you can zip files in CLI using bash programming. If you want to zip any folder in bash language then you use ‘for loop’. you follow these lines of code:

                   $ for file in $(ls -d */); do zip archive.zip $file; done  

zip directories using bash

If you want to zip a folder which is start with any letter e.g. E .A folder is start with E letter then you follow these lines of code:

                  $ for file in $(ls -d */ | grep E); do zip archive.zip $file; done 

zip a folder

you have to zip our folder successfully.

conclusion: by reading this article we hope that you know that how to zip a directory in unix.

 

         

 

 

 

 

 

 

 

php max_execution_time

When you install PHP it executes in the default setting. Sometimes it is good for many websites. Sometimes your website needs different settings then you can change PHP settings. E.g. your website required heavy files to upload. But the default setting allows you to limit the upload files. For changing the settings you will create a ‘phprc’ file and change values. php Max_execution_time is the largest time in which a script is allowed to run before end. Default time is 30 seconds.

php max_execution_time:

Default time of execution is 30 seconds it will be too short for you. you can change this value by creating a phprc file. you can create a phprc file via FTP and SSH.

Creating phprc file via FTP:

  1. you login to your web server via FTP client. you are using file zilla for this process.

step 1 open file

  1. Ensure that you are in our correct directory. Otherwise your small problem going to be big problem.
  2. Click on .PHP file which you see that already exit.

step 2 php file

  1. In .PHP folder you can see that there are several other folders. Which are representing the version of PHP. For choosing the version from this folder. you should ensure that which version your site is using. For example your site using 7.4 and you should click on 7.4.

step 4 php versions

  1. In this directory you will see a phprc file. Right click on phprc file and choose view or edit.

step 5 edit phprc file

  1. After clicking on this file you can see the following lines of code which is open in your default editor. using this code you can change your php max_execution_time.

step 6 phprc code

  1. When you complete your task then you want to save your file then you see a pop up message. Which show that file is change and check box ‘finish edit and delete local files’. Now click on yes button.

step 7 save file

  1. When you complete these steps then check that any PHP process is in running form or not. If process is running then kill off all these process. Which are running in PHP.
  2. When you have to complete all steps and kill the PHP process. Now confirm that your files update or not. you can check by using phpinfo.php file.

If you have already phprc file then follow these steps:

10. Login to your server. Ensure that you are in correct directory to create file. Click right on file you see an option view and edit click on it.

step 10 edit file

11. After click on edit next prompt open asking him to choose the editor. you choose our default window editor notepad.

step 11 choose editor

12. After choose the editor notepad open. you can write here code.

step 12 write code

13. When you write your code then click on file and save this file.

step 13 save edit file

14. When you save your file within few seconds a new prompt open. you check the box and click on yes button.

Delete file:

15. Login to server via FTP.

16. Very important thing is that ensure that you are in correct directory or not.

17. Write click on file and click on delete.

step 17 delete file

18. When you complete your task he asking him to confirm the file delete or not click on yes button.

step 18 confirm delete

your php installation appears to be missing the mysql extension which is required by wordpress

When you visit our word press site, you will see this type of error.(your php installation appears to be missing the mysql extension which is required by wordpress)

A question is rise that why this error come? And how to resolve it?

This happen that when your PHP code is not well suited with the current version of PHP which your site is currently using. If you are using any version of PHP over 7.0 might be possible you can see this error. It happened due to the old code is not updated. you should upgrade wordpress core files to the current version as well as plugin which you use in your site.

How to check that which version of PHP your site is using?

Firstly check that which PHP version of your site is using.

If you want to see that the information about your PHP server and which version you are using.

you use PHPinfo () this is a function of PHP it show you reliable information about PHP server and PHP version.

There is another function which is phpversion () it display only the information about PHP version.

In your website go to document root directory and upload PHP file using FTP client.

upload php fileopen your browser then you go to your domain.com/phpinfo.php, now you can see the version of php server on your screen.

php server version

How to resolve your php installation appears to be missing the mysql extension which is required by wordpress

Upgrade wordpress :

If you have to update your PHP version over 7.0 and still seeing this error you must upgrade your wordpress core files and plugin.

Login to your account and follow these steps:

dashboad update

Click on update button and upgrade your wordpress.

upgrade wordpress

you can see that an update is available now update wordpress and check that your problem is resolve or not.

Myqsl is installed ?

if you have to update your word press and your problem isn’t resolve then you should check that your mysql is installed and enabled or not.

If mysql is not installed then you should create an info.php file in root directory of your wordpress via FTP.

It will be look like this:

php info file

Save this file and go to browser and type https://.www.ourdomain.com/info.php . you can see a page which contains the information of your php installation.

If it is installed it shows like client api library version.

api library

If this it’s look empty then extension is not installed. Installation of steps depends on your host and system.

If your host is using cpanel then you can change the extension of mysql by clicking on select php version in your software.

 

 

 

 

 

 

 

how to redirect a domain to another site

There are many ways to redirect the websites every website owner has its own technique to redirect his website. When we want how to redirect a domain to another site a question is rise that. When we redirect our domain does our mx record change or not. Answer is that our mx record will not change.

How to redirect a domain to another site

1. Redirect in c panel

                                 Sign in to cpanel and go to domain side, click on redirect icon.

redirect in cpanel

In Manu bar here are two types of redirect permanent (301) or temporary (302). We chose permanent (301) because it is place on server and browser level. 301 tells to the browser this is my permanent page and I don’t need to go back. 301 redirect is common, good and healthy for website. Search engine confess and index 301 redirect. And it is best for SEO. 302 redirect is use when we want to change our website in future. We use it for a short period. For a long period we can use 301.

permanent 301

2. Which domain redirect

In next step we select which domain we want to redirect. We can redirect all domains or simple choose one on which we redirect. In the first box we put our simple address e.g. example.com. But in the second box we add full address e.g. https://example.com/blogtest. To complete all these steps then click on add button. If we want to redirect www to non-www it will also redirect. E.g. if we want to redirect example.com then it will also redirect to www.example.com.

add link

3. Check Domain Redirect or Not

You can check that your domain is redirect or not. Below the add button you can see in current redirect box our redirected domains are shown below.

current directory

If you want to turn off your redirect you will be able to change in the host configuration.

Here some other helpful articles:

How To Redirect Http To Https

Contact Form 7 Not Sending Emails

how to redirect http to https

If you have SSL certificate in your website. Then you can automatic redirect your visitors HTTP to HTTPS for a secure connection. In HTTPS ‘S’ shows that your communication is secure. But how to redirect http to https?

For example:

https://arzhost.com

In this link‘s’ shows that arzhost website is secure.

There is nothing to do from your side. you enforce the site to use secure URL.

how to redirect http to https

For main domain enforce the SSL:

  1. Login to cPanel
  2. In domain side click on domains

domain section

  1. After click on domains page is open and you can see that there is an option you can enable or disable HTTPS redirect. you should leave to enable it. If there is no option to on it. Then SSL is not installed in your domain. Make sure that SSL is install or not if not installed then installed it.

enable https

If this section is on then your site is using HTTPS.

  1. Enforce the SSL for addon name.
  2. Linux using .htaccess files for redirection. you will need to create .htaccess file in your control panel file manager.
  3. In cpanel click on file manager.

on file manager

  1. In file manager section click on setting.

click on setting

  1. Ensure that show hidden file is check and save.

check box hidden files

  1. Click on public_html

click on public_html

  1. In public_html click on .htaccess

If you have .htaccess file good. If you have not then click on file and name the file .htaccess and create it.

create htaccess file

  • Select the file .htaccess and click edit

edit htaccess file

  • If you created .htaccess file, use this code for setup the URL redirect HTTPS version for your website.

 

<ifmudule mod_rewrite.c>

Rewriteengine on

Rewritebase /

Rewriterule  ^index\.php$  – [ L ]

Rewritecond  %{REQUEST_FILENAME}  ! – f

Rewritecond  %{REQUEST_FILENAME}  ! –  d

Rewriterule      .   /index.php   [ L ]

</ifmodule>

  • If .htaccess file is already exit then don’t make duplicate rewritrengine on.
  • Ensure that lines start with rewriteenginecond and rewiteRule
  1. Save changes and close it. That’s all.

 

 

 

 

 

How much does an SSL certificate cost

Choosing a correct SSL (secure socket layer) certificate is a big challenge for website owner. you must choose correct SSL certificate because security should be your first priority. Which SSL certificate you choose. How much does an SSL certificate cost? it depend on your website rather it’s a blog website or ecommerce website. Both required a good SSL certificate. Now a day’s people have limited time to go in markets for shopping.

Now they prefer online shopping and payment through his cards. If your website has bad quality SSL then hacker can attack on your website. Might be possible that hacker steal data and use it on wrong way. you should make your website secure. Consumer should trust on you and they feel free to use your website. If you worried about the security of website. Then contact to arzhost and don’t think that how much does an SSL certificates cost. They provide you a good solution in reasonable price. There are different types of SSL certificate domain:

Validation, organization validation and extend validation.

1. Domain validation:

Domain validation is the basic secure level of website. you can buy in few minutes you will provide your email to arzhost. They send you an email you open it and you must ensure that the link which you receive from arzhost. Should start with webmaster, postmaster, hostmaster and administrator.

2. Organization validated certificate:

organization validated certificate is almost like domain validation. Organization validated is less popular and people didn’t use it. Most of the business man and different companies. In which they don’t share any identity or payment transaction they can use it.

3. Extend validation certified:

it is the most secure and popular certificate. If you want to use this certificate you provide your all information of domain and organization. Most of the ecommerce companies are using. People feel free to share his information and buy anything from website. When you buy online from any website you should see the green padlock. It show that the website is secure and trustful. 70% of companies are using to make his website secure.

How much does an SSL certificate cost

How can we register domain:

if you want to register your domain on arzhost.com then you follow these steps.

  1. Type manager.arzhost.com on your browser.
  2. you are in arzhost website.

step 2 arz home page

3. Move the cursor on the store and click on it. you can see there are different services of arzhost.step 3 arz store

4. If you want to use the SSL service then click on it.

5. you are in the services of SSL and its packages.

step 5 arz ssl packages

 

6. Now choose any SSL e.g. you want to use comodo EV SSL click on it. And enter the required information.

step 6 choose domain

7. Arzhost provide all extension e.g. .com, .net, .biz, .info etc. we can choose any of them.

8. you can add your new domain.

9. you can transfer of domain from another registrar.

10. can can use your existing domain and update your name server.

we hope that you know that How much does an SSL certificate cost and different services of SSL.

 

how to add another email account to outlook 2016

Outlook is a web base application it is like Gmail. It is a Microsoft application by using outlook you can send and receive emails from your pc. Outlook has two versions Microsoft express outlook and Microsoft outlook. Microsoft express outlook was first introduce in window 98 to window XP. Microsoft outlook have latest features and it is powerful then express. If you want to use extra features of Microsoft outlook you will be pay for it. If you want to use Microsoft outlook you should know that how to create account in Microsoft outlook. and how to add another email account to outlook 2016.

how to add another email account to outlook 2016

  • Open outlook from pc search Manu
  • Click on FILE

open file

  • Click on add account

click on add account

  • On the next step what we see it’s depend on our outlook version.
  • If our outlook version is Microsoft 365 and outlook 2016

enter email address

Enter your email address and connect

  • If our outlook version is 2010 and 2013 then it will be look like this

email address and possword

Enter your name, email address and password.

In outlook version 2016:

2016 version

  • Enter email address
  • Click on advanced option and check box to let me set up account manual.
  • Click on connect

choose IMAP

  • What we choose POP or IMAP, IMAP is best.

IMAP settings

  • On the next window we need to enter incoming mail and outgoing mail.
  • Server is our arzhost mail server. For incoming server we use ‘imap.arzhost.com. If we want to prefer POP connection then use ‘pop.arzhost.com’. Outgoing mail server is always ‘smtp.arzhost.com’.
  • We should use only arzhost mail server name. Avoid to use subdomain name. otherwise we will get insecure warning if we use incorrect hostname.
  • If we use IMAP then use port 993. For outgoing port we use 465 or 587.

Port 465 is recommend with SSL. But some email clients are unable to use it.

If it is unable to use it then port 587 is best with STARTTLS.

  • Click on Next button

IMAP password

  • Enter your password and click on connect button

successful added

  • If all these steps are successful then we will get setup.

 

 

 

 

 

 

 

 

90%OFF

New year Sale

Hurry Up! Offer ends in
days 01 02 hrs 23 00 mins 31 32 secs 34 35
Buy Now
We are offering a Discount Promotion on All VPS. you can get upto 75% DiscountBuy Now
+ +