Archive

Structured programing vs. object-oriented programming

There are a lot of different programming languages for different usages. We are going to explain the differences between the two types of programming languages which are: 1. Structured programming 2.object oriented programming

What are they?

object-oriented: This type of programming language includes some objects and classes. A class is like a template and it defines some behaviors. Objects are the members of this template that have those defined behaviors. So, this shows us that all of these objects are related to each other. In the example below, all of the three cars are a member of the class “car”. This means that they all have features and behaviors of a car but they also might have other features that vary them from each other.

Example for class and its objects

Python is an object-oriented programming language.

Structured: This type of programming is based on some instructions and functions. So this type of languages are devides into some functions. A function is a named section of a program that performs a specific task. PHP is one of these programming languages.

Their focus:

Structured programming languages focuse on the process and then data. This is because in these types of languages we first call a function and then the instruction uses data to execute.

In object-oriented programming, data and information are important. That is why in these types of languages all information and data are related to each other and it prevents data repetition.

Their approach:

Structured programming follows a top-down approach. It means that an instruction is completely defined and used in other places. However, in the object-oriented languages, every object inherits its behavior from its upper class.

Security:

Structured programming languages are less secured than object-oriented ones. This is because data hiding can happen in object-oriented languages.

Capability:

Object-oriented language and its structure make you capable of creating all kinds of programs, even the complicated ones. But this is not the same for structured.

Reusability and flexibility:

Object-oriented languages are more flexible and reusable than structured languages. This is because structured languages have more function dependency.

If you enjoyed this post, You can visit our Blog for more!

Interpreted vs. Compiled languages

In this article, we are going to Compare Interpreted and Compiled languages. But first, let’s give you some needed information.

What are Interpreter and Compiler?

Compiler vs. Interpreter

Both Interpreter and Compiler are computer programs. Their responsibility is to translate high-level scripting languages to a machine language. High-level languages are the ones that are closer to human language. A machine language is an understandable language for machines.Scripting languages can either be interpreted or compiled. Interpreters translate Interpreted languages and Compilers translate compiled languages.

Interpreted languages: JavaScript, PHP, Perl, Ruby, Python, VBScript,…

Compiled Language: Visual Basic, C++, C#, Cobol,…

The differences:

Interpreted vs. Compiled
  1. How they work: Interpreters translate and execute scripts step by step. It means that they translate a statement, execute it and then goes for the next statement. Compilers translate everything and then, execute them.
  2. Platform dependent: Compiled languages are platform dependent. When a program is compiled, the operating system codes are also compiled in it. That’s why, when you compile a program on an OS, you can’t execute it on another OS. However, Interpreted programs aren’t like that. Interpreted programs only need an Interpreter to be executed. So, You can execute Interpreted programs on any platform that has an Interpreter.
  3. Speed: as we said earlier, Interpreters translate and execute step by step. That’s why it takes more time than compilers. Compiler translates the program once and after that it just executes it.
  4. Resource usage: Interpreter uses more CPU and RAM every time. Again it is because every time you want to execute interpreted language, interpreter has to translate and execute it. However, compile program executes faster and uses less RAM and CPU after being translated (compiled) once.
  5. Troubleshooting: Interpreted languages are easier to troubleshoot. When an Interpreter is translating a script, when a statement has a problem it just stops on that line and inform you about the error. So, you find the exact line that has a problem and fix the problem easily. Troubleshooting for Compiled languages is not that easy. Compilers translate the whole script and at the end inform you about errors. That’s why it’s harder to find the errors in compiled languages.

If you enjoyed this post, take a look at our other posts on our blog page!

What are TCP and UDP?

TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are two important protocols of the Internet. In OSI model Both of these are in Transport layer. This means that these protocols are for transfering data.In order to tell you the differeces between these two protocols, we have to explain about TCP first.

OSI Model

What does TCP do?

This protocol defines how Application Programs can establish a network conversation and maintain it. Application programs exchange data via this network conversation.So, when application programs want to send data to each other, This protocol does everything that is needed for this data exchanging.

How does it work?

TCP works with IP (Internet Protocol). This defines how computers send packets to each other.This means that when an Application Program (Web server) wants to send data, it asks the TCP layer to do it. TCP stack divides the file into packets, numbers them and then forwards them to IP layer for delivery.

This protocol is a connection-oriented protocol. This means that the connection maintained until the application programs at each end have finished exchanging messages.

Features:

There might be some problems during the transmission process. (Some packets might be lost, duplicated or delivered out of order) .TCP is able to detect these problems and fix them. For example: When a packet is lost, it will ask for re-transmission of the lost data.

TCP can help minimizing network congestion to prevent and reduce the happening of the mentioned problems. After all of these, if the data weren’t delivered, It will inform the sender about this.

UDP and TCP Differences:

  1. UDP is a connecetion-less. This means that UDP can’t find or reduce the problems like packet lost. This protocol just sends the packets in turn and doesn’t check if they were delivered or not.
  2. Because of the mentioned difference above, UDP can be faster. Because it doesnt wait to make sure a packet were delivered and fix the possible problems.

At last we can’t tell you which protocol is better, We can only say that if you are sending datas that only speed matters for it, use UDP. but if the delivery of all the packets matters to you, it’s better to use TCP.

Hope this article was useful to you!

Changing the PHP Version

Why?

Once in a while, there is a new version of PHP. When this happens, it’s better to change your version of PHP to the most updated one. This has different reasons that we will explain them shortly:

Outdated versions: When a new version of PHP gets released, after a while the older versions become outdated and won’t work anymore.

Better security: Updated versions of PHP have better security.

Plug-ins and modules: Some plug-ins and modules won’t work on the old PHP versions.

How?

Now that you know the reasons, Let’s see how you should change your PHP versions.

If you have Cpanel as control panel:

this process is much easier for you. Cpanel has a lot of benefits that here is one of them: supporting multi versions of PHP. This means that by default, Cpanel gives you this option to change your PHP version in its area. So, all you have to do is: go to “Select PHP version” section (if Cloudlinux is installed on your sever) or “Multi PHP manager” (if Cloudlinux isn’t installed on your server) and change your PHP version.

Select PHP version

If you have Direct Admin as control panel:

Direct admin doesn’t have the same option as Cpanel does. Direct admin doesn’t let you easily change your PHP version in its area. That’s why you can only change PHP version in your direct admin, by using SSH (Remote Access). This means that you have to have root access for this. You have root access for dedicated servers and VPS. If your server is shared hosting, because you are sharing that server, you can’t have root access.

If you have Dedicated Server or VPS follow these steps:

  1. Have a full backup of your data.
  2. Connect to SSH by using putty software and your server’s IP.
  3. Login with the root account.
  4. Now copy and paste each of these commands in turn and press enter after each of them.

(Remember to replace the *current PHP version* and *New PHP version* with correct versions.)

cd /usr/local/directadmin/custombuild

nano options.conf php1_release=*current PHP version* php2_release=*New PHP version* ./build php n

Now that the needed PHP versions are added, you can change it in domain setup section of your direct admin.

Change PHP version

Direct admin can only support maximum number of two PHP versions. If you have 2 PHP versions on it, you’ll see this in Domain setup section.

Change PHP version

If you enjoyed this post, take a look at other posts on our Blog.

Proxy Server

You might have heard of Proxy before. In this post, we are going to give you all the needed information about it. First, take a look at this picture:

Have you ever seen this message?

ip restriction

All the devices on the Internet are known by their IP. So, when something like the above message happens, it’s because they don’t want your IP to access the requested server. This IP restriction can happen for various. At this point, you might wish that there was a way that you could change your IP. That’s when a proxy can help you.

What is a Proxy Server?

Proxy can be a server or a software installed on a device. This means that there are some network devices that you can config and use them as a proxy server.

What does it do?

Proxy server a middleman between you and the requested server. It receives your request, send it to the requested server and then collects the server’s response and gives it to you. What’s the point? Well, remember the problem we mentioned at the beginning of this article? Proxy can somehow do something that the server wouldn’t understand it’s you who is requesting.

Let’s explain to you the exact process. You open your browser and look for a website or you look for an application (both of these are requests that should be sent to a server). You are connected to the Internet by your unique ip address so if your ip is restricted, you wouldn’t be able to get a response for your request. This is when the proxy comes in and acts as a middleman. The proxy will receive the request from you and then sends it with one of its own ips, to the requested server. The server won’t see your ip address and can only see the proxy server’s ip so It’ll respond. The proxy gets the response and gives it to us. Both server and the end user don’t see and feel these steps. For them, all of these happen like a normal request and response. So, It is kind of invisible to the Internet and only helps us to get what we want.

What does proxy do?

Benefits:

Access to blocked resources: We’ve already discussed this important benefit. To say it shortly, it can request a server (web server or …) on your behalf (with its own ip) and give us the response.

Bandwidth savings and improved speeds: Proxy can cache a website (save a copy of it). So, when a server gets a lot of requests, the proxy will only send request there once and caches the responded information. So, The next time a request for that server comes in, It will search in its cache first. If it finds the needed information, it will pass that to you and won’t request to the target server anymore.So, this makes the request process faster and uses less bandwidth because the proxy will send requests only if doesn’t have the response on its cache.

Improved security: Proxy servers can be configured to encrypt your web requests to keep prying eyes from reading your transactions.

What is IIS?

IIS, that is the abbreviation of “Internet Information Services”, is a web service that runs on Windows systems. We have explained about web servers completely in an earlier article but to explain shortly, we can say that a web server is a server software or hardware that is in charge of taking requests from browsers and giving them the needed files of the web page, they want to visit. Some web servers run on Linux and some of them run on Windows. IIS is one of the most famous web servers that run on Windows OS.

How does IIS work?

There are two main process models for web servers:

  • Handling all requests on a single thread
  • Thread-per-request

The first one means that even if your CPU has lots of free threads, the web server processes all the requests with one single thread and does other things with other threads.

The second one means that when a web server receives a new request, the web Service associates that request with a thread from the thread pool and executes it. The thread pool is a place where all free threads wait there until they are needed to process a request. In another word, each request will be processed by a different thread.

So, the web server (IIS) gets a request, processes it and if everything goes well, it will respond to the client. The protocols that IIS and all the other web servers use to communicate are, HTTP or HTTPs.

IIS Features

IIS has a lot of features

  •  It is used to host ASP.NET web applications (open-source server-side web application framework designed for web development to produce dynamic web pages developed by Microsoft.)
  • It is used to host static websites. (a Website that contains web pages with fixed contents.)
  • Built-in authentication options such as Basic, ASP.NET, and Windows auth.
  • Application pool: Application pools allow you to isolate your applications from one another, even if they are running on the same server. This way, if there is an error in one app, it won’t take down other applications. Additionally, application pools allow you to separate different apps that require different levels of security.
  • Remote management: IIS can also be managed via the CLI or using PowerShell.

IIS has different versions that the features might be more or less for each of them.

Hope this article was useful to you!

Web Server

What is Web Server?

In simple words, Web server is a service or a feature that a server can serve to you. If you want to have a website on your server that you want the world to be able to visit it, you MUST have a web server on that server.

How can we access the web server?

As we said earlier, Web server is located on any server that has the files of a website. In order to tell you what it does, first you have to know how you can access it.

When you open a browser and type in the domain of the website that you want to visit (for example: Airoserver.com), the browser is going to look for the server that has the files of the requested domain. How does it find the server? Well, each server has its own unique IP and each domain is pointing to an IP. There is a service called DNS that can translate the domain to its IP address, so after this process your browser finds the server that this domain is located on it.

What is a web server?

What does it do?

Now that you have reached the targeted server, the web server is in charge of receiving requests from browsers and answering them with the needed file of the requested website page. In another word, you requested for a specific page, the webserver searches the server for all of the needed data of that page (frontend codes) and gives them to you so you can visit the requested page.

What does a web server do?

Different kinds of webserver:

We can categorize web servers differently. One of the most common ways of it, is to categorize them as Linux and Windows ones. The most famous ones for Linux is Apache or LiteSpeed and for Windows it’s IIS (aka Internet Information Service) .

We hope that this article was useful to you!

Xeon vs. Core i processors

One of the most important parts of your computer is the processor. Intel is the most famous company that produces different kinds of processors. In this article we are going to compare 2 kinds of them which are Xeon and Core i.

Mostly, Personal computers have one of the core i series which you might know them as core i5, i7, i9. However, Xeon is used for servers and workstations.

The differences:

Firstly, Xeon processors have better energy efficiency. It means that they produce less heat comparing to their efficiency and performance.

Secondly, in equal situations, they have less system crash and computer freezing.

Finally, we have to tell you that Xeon and Core are based on the same architecture but Xeon has some additional and advanced features that cause the mentioned differences. Here are some of those features:

Xeon’s Features:

  • QPI (The Intel Quickpath Interconnect) on motherboards that have dual socket for processors.: this increases the scalability and bandwidth available.
  • Intel Direct IO and Integrated IO technologies: They Increase the processor’s efficiency.
  • Supporting more cache space: This increases the speed and performance.
  • ECC memory (Error Correction Code): This is used in most computers where data corruption cannot be tolerated under any circumstances and it maintains a memory system immune to errors.
  • More memory slots
  • Supporting up to 12TB of RAM.

All of these and other features like more registers and etc. makes Xeon a better processor for servers, workstations, data centers and mainframes.

All in all, we can’t tell you which processor is better than the other one. Each of these processors were designed for specific users. In these kind of situations, It’s better that you decide on what’s the usage of this computer and how you are going to use it and then choose the best CPU that matches your need.

Here in AiroServer.com, We use the most up-to-date and the most powerful kind of Xeon processor for all of our virtual private servers. We also offer dedicated servers with Xeon processors. For more information about these you can contact our support team.

Remote desktop connection authentication error’s solution

There are different errors that you might see while working with Remote desktop connection, in this article we are going to give you a solution for one of them which is: the Remote desktop connection authentication error. When this error happens, a dialog box appears on your screen that you can see it in the below image.

Remote desktop connection authentication error

If you click on the link written on the dialog box, it takes you to Microsoft support page which will give you some information about Credential Security Support Provider protocol (CredSSP), some updates and other things that none of them can help you much with your problem. That’s why we wrote this article to give you an easy solution for this matter.

The suggested solution for the Remote desktop connection authentication error:

This error doesn’t mean that there is anything wrong with your system or the target machine. It mainly happens because of windows updates.

To solve the problem, follow these three easy steps:

Step 1: Go to the search section on your taskbar and type in cmd.

Step 2: Right click on the command prompt and click on the “Run as administrator”.(As shown in the picture below)

How to run cmd

Step 3: Now copy and paste this Command to your command window and press enter.
(As shown in the picture below)

reg add “HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters” /f /v AllowEncryptionOracle /t REG_DWORD /d 2

Cmd solution for RDC authentication error

After this, you should be able to easily connect to your target machine using Remote desktop connection.

Other solutions:

There are some other solutions for Remote desktop connection authentication error like updating the target machine, lowering the security level of the host machine and etc. but these might have their own problems and they might take more time, That’s why our team recommend you to choose our given solution which is easier and faster.

Hope this article was useful to you!

How to convert MBR to GPT

In This Article, we are going to show you how to convert your hard disk from MBR to GPT. First, Let’s say why you might need to do this.

Have you ever seen this Error during Windows installation?

(Windows cannot be installed to this disk. The selected disk has an MBR partition table. On EFI systems, Windows can only be installed to GPT disks.)

Converting MBR to GPT Error

Firstly, you may want to ask these questions:

-Is GBT better than MBR?

-Why some people want to convert MBR to GPT?

To answer these questions, we are going to discuss some of the differences between GPT & MBR.


The main two differences between MBR & GPT:

  1. Number of Partitions: MBR Disks can support 4 main partitions or 3main partitions and an extended on; However, GPT Disks can support more than 128 partitions in windows.
  2. Partitions’ space: Each partition of MBR Disks can have a maximum of 2TB space. This amount for each partition of GPT disks is more than 2TB.

Other amazing benefits of GPT disk:

  1. The ability of saving multiple copies of data on OS (Operating System.)
  2. If data were overwritten or damaged, GBT disk can recover them. So, the OS can work again. However, MBR disk doesn’t have this option so it can’t easily recover the overwritten or damaged data.

Two solutions for how to convert MBR to GPT:

1.Converting from MBR to GPT through Windows installation process:

  • To convert MBR to GPT Follow the follwing steps:

Step 1.Insert the installation DVD/Flash to your Pc and restart it.

Step 2.Boot the DVD/Flash on UEFI mode.

Step 3.Choose the custom installation

Step 4.Select all the partitions and delete them

Step 5.Click on unallocated space drive and click next.

After this, all of your partitions have been deleted, Now by following the rest of these steps, you can convert your disk type from MBR to GPT.

  • Converting MBR to GPT using command prompt:

Step 6. On the same window (partitions) of the installation process, After doing all the above steps, press shift+f10 to open command prompt

Step 7.Type in Diskpart in cmd and then type in list disk and press Enter.

Step 8.Type in select disk DiskNumber to choose the drive that you want to convert.

Step 9.Type in Clean to clean all the partitions on that disk.

Step 10.Run “Convert gpt” to convert the chosen disk to GPT.

Now that you’ve finished all these steps, you can continue the rest of the installation just like a usuall one by creating partitions with GPT type.

2.Converting from MBR to GPT using third-party softwares:

There are hard disk management softwares that are produced to ease hard disk related issues separated from OS layer and etc. just by booting these during the system startup. One of softwares in this category that our team have personally experienced is “Paragon hard disk manager”.

For using this solution you just need to insert the bootable disk of this software on your boot device and use the disk management wizard of this software in order to convert your MBR disk to GPT one. After that you can easily do the windows installation process.