What is Content Type in Drupal 8

Users who are new to Drupal system may get little confused for the term Content Type. Drupal 8 is highly flexible CMS where user can create content more than just a article. Most of the CMS allows to create a fixed type of content. For example WordPress allows to create post or page type of content. When you create a post in WordPress, the form has few input fields like title, description, tag etc. So the form fields are fixed for post in WordPress. We can say that WordPress allows to store information in only one particular fashion.

Drupal 8 content type

If user want to store information about a electronic product then desired fields in form may be product title, product price, product specification, product description, product rating etc.  CMS like WordPress or Joomla has no provision to input product details in independent form fields.

Let’s take example of different cases. When you fill up form for some examination then input fields in form are specific. Similarly when you fill up form for ticket booking then input fields in form are also specific. There are lot of different types of forms which collect information from user. If we apply same concept to Content Management System(CMS) then CMS also use form to collect information. This collected information from the form is saved into database and later it is retrieved for displaying to the end users.

So it is the input form which allows CMS to collect different type of information. Some CMS like WordPress has one particular type of form which is typically used for article type of data input. WordPress like system are not user-firledly for storing specific type of content. But Drupal has solution for specific type of content also. Drupal allows to create forms for different types of content.Drupal allows to create customised forms for different type of content. If you want to collect information about student profile then you can create a form with specific fields like student name, class, date of birth, school name, home address etc. If you want to collect information about examinination result then you can create fields like roll no, marks obtained  etc. If you want to collect information about taxi hiring services in city then you can have fields like taxi no, owner name, rates for 80 km, rates for 120 km, night charges etc.

You would have understood that Drupal allows to create form with different types of fields. Drupal is quite flexible for creating different types of form for content.Each of these form represents a particular content. Different form represent different Content Type in Drupal 8.

The above discussion is  primarily meant to convey the meaning of term Content Type in Drupal 8. How a content type is created and how it is used to input content is also need to be understood.

User can create a particular Content Type from the Structure section in Drupal 8 Admin panel. Give a name to this new Content type and then add fields in this Content type. Now this particular Content Type in Drupal 8 becomes a bundle of fields to store specific information.

For inputing information in this specific Content Type, you need to access it from the Content section of Drupal 8 admin panel. If administrator gives access to this Content Type from some other menu then you can access it from other menu item also. But Administrator has access to all content types from Content section for content generation. You select your content type and then insert information in each of the field for saving it into database.

How to build website with Drupal 8 – Content

This is in continuation to my earlier articles about Drupal 8 wherein Drupal 8 configuration, Drupal 8 Extension, Drupal 8 Appearance and Drupal 8 User management has been discussed. Now two important things for Drupal 8 website development i.e Drupal 8 Content and Drupal 8 Structure need to be understood. As the name suggest Drupal Structure section gives lot of options for website design. We will discuss Drupal 8 Structure in next article. In this article I just like to discuss Drupal 8 Content.

Drupal 8 content

What is Drupal 8 Content

All CMS gives us platform to store content in database and publish the same on webpage for end users. Content can be an article, employee details, equipment details, product details or other information which need to be stored in database.

As we know that digital information is saved in database through the webform. Each form has multiple fields and those fields allows to input specific information about the content. Lets take example of content which stores details of product. In this specific product detail content , there is lot of information about the product like product name, price, discount, seller, rating, specifications, description etc. In this case you need a form to store all these information about the product. The form will have fields for inputting all these information.So the group of these fields for specific content creates a bundle of fields. The bundle of fields is created for a specific type of information. A particular bundle represents a specific group of field, means a specific content type. Therefore a content type is group of fields for inputting specific information.

Content types are created from the Drupal 8 Structure section because it is part of website design.

For storing information into any content type, you need to enter into Drupal 8 Content section. The Content section is accessible from the primary menu for administrators. The Content section shows list of content types which you earlier created in the structure section. Select any content type for inputting information, you will see number of form inputs where you can insert inputs and then save the information in the database.

Website administrator has rights for all the action that’s why he can see all the content types. Create content, edit content, delete content, edit own are different actions associated with content. Permission for each of these action for each of content type can be given to particular role by the administrator.We earlier discussed User permissions and roles in Drupal 8 user management. Users who are not authorized will not be able to create, edit or delete content. So you can delegate authorities to groups for different tasks for each of content type.

Broadly we can say that Content section is the gateway where you can access different Content Types for inserting information into CMS. On the other hand Content Types in Structure section is the place which allows you to create a specific Content Type.

How to build website with Drupal 8 – Extend

When you install Drupal 8, you first look at the primary menu . Each menu item provide link for specific administrative zone. One of the primary link is Extend. The meaning of term Extend itself convey the role of this section. The Extend section allows you to extend the Drupal 8 system .

Drupal 8 Extend

In my first article about Drupal 8 introduction , I just talked about the modular approach of Drupal 8 CMS. The Drupal 8 has a core system which control the basic functionality of a web system. The core system is designed in such a way that it allows you to add other application packages into Drupal 8 system.

Why you need additional software packages in Drupal 8 system

Drupal 8 standard package come along with core application and some added apps called modules. This default system provides certain facilities to users.If user want some facility which is not available in default system then user can add a module into Drupal 8 system. For example, you can add Google Analytics module for monitoring website traffic. Similarly you can add Webform module for creating forms and surveys for users.

Where can you get modules for Drupal 8

Drupal website has a repository for core, themes, modules and distributions. The Download & Extend link in Drupal website list all these added packages for Drupal. You can access and search for your required feature. There are thousand of Drupal modules which extend the horizon of Drupal 8 system.

The Extend section can be accessed from the primary menu. This section basically deals with adding/removing and updating modules. This section is divided in three tabs i.e List, Update and Uninstall

List

This List tab in Drupal 8 Extend section shows the list of installed modules in your Drupal 8 system. You can see that there are several modules which are installed along with standard Drupal 8 package. The standard Drupal 8 system which we see after installtion is the result of several core modules. Core modules View, Taxonomy, Node, Field , File etc provide several features in Drupal 8 system. User has option to install new module. You can download compressed file package of particular module and then upload it into your drupal system for installation. Alternatively you can directly install from the package url.

Update

This Update tab in Drupal 8 Extend section provides information on available updates for the installed modules.

Uninstall

This Uninstall tab in Drupal 8 Extend section allow to uninstall module from the Drupal 8 system. Drupal has a system of module development where modules depend on other modules as well. If other module is dependent on a particular module X then this restrict uninstall of this X module.

Overall Drupal 8 Extend option gives a user friendly interface for module installation, uninstall and update. It becomes very easy to add,remove or update module from this interface ,otherwise doing same thing as a developer could have been very difficult for users.

How to build website with Drupal 8 – Website Appearance

Website appearance is one of the important aspect of website design.Storing content into database, content retrieval from the database and presentation of content over standard templates are key functions of a CMS. The outer presentation layer picks the content and displays it in a systematic manner. Drupal themes are part of outer presentation layer and themes are the main element which govern the Drupal 8 website appearance.

Drupal 8 website appearance

Each webpage can be divided into multiple parts like main content area,header, footer,sidebar and other smaller sections. Theme designer creates different parts in the theme template and website administrator puts different information in each of these parts. For example You can place blocks in header, sidebar etc. If you place login block in header then it will be visible in header.If you place it in sidebar then it will appear in sidebar.

Broadly Drupal 8 website appearance includes install/uninstall of theme, updates of theme and settings for each of the theme. Drupal 8 website appearance section can be accessed from the primary menu. There are three tabs in this section i.e List,Updates and Settings.

List

This section shows the list of themes installed in Drupal 8. There is provision to install new themes. You can give url of theme package or upload the package for installation into your Drupal 8 system. After installation , new theme will be visible in the list of available themes. If you want to use one particular theme for your website then you need to set it as default.

Update

This section provides information on the available updates for these installed items. Drupal 8 system automatically checks for available updates but there is option to check updates manually.

Settings

There are few Global settings for the themes like Logo image. favicon etc. These are applicable to all the themes.You can select link of any theme here to access settings of particular theme. This is the main area where you can change color scheme of theme and change other theme parameters.Each theme developer provides set of parameters which theme user can configure for specific appearance. User can configure color for fonts, borders,background text etc. These setting allows you to change Drupal 8 website appearance as per user specific requirement.

I hope this broader idea of Drupal 8 website appearance will help you in understanding the Drupal system.

How to use Google Handwriting Input for Android smartphone

Technology is improving day by day. Old type-writers are now completely replaced by computers. Even methods for Typing text over computers and smartphones is also changing very fast. Smartphones which were equipped with just virtual keyboard are getting different alternatives for text input. Experts were trying for handwriting and voice input method for last several years. Now handwriting input tool has reached to a mature level where users can conveniently use it.

Google handwriting input tool

Several smartphone users find problem in using virtual keyboard as the keys are quite small. Similarly voice input has problem of picking surrounding noise. So the handwriting input method looks most challenging alternative to all other methods. Handwriting input is quite a user friendly method for text input.

Now Google has a given a next level of text input method , i.e Google handwriting input. It is more intuitive and fast for text input. At present it support 82 languages .After installation Google handwriting input tool becomes part of Android system so you can use this input method on any application and it works with or without internet connection.

What is Google Handwriting input

As the name suggest, handwriting tool works same as we write on paper. Only difference is that we write on some touch sensitive electronic device which read the written text and convert it to print text. The Google handwriting input tool is intelligent and sensitive tool for reading handwritten text.

You can install Google handwriting input tool in your Android phone and activate it. Once you configure , you get one more option to input text in your Android smartphone. Generally people use android keyboard to input text by using virtual keys of keyboard. In Google handwriting input, you don’t have to push virtual keys. You just need to write text with your finger or stylus on the touch screen. Your handwritten text is interpreted by Google handwriting input application and displayed on the screen.

Google handwriting input tool is quite fast in recognizing handwritten text. There is no noticeable delay. It is designed quite intelligently so that it can recognize and interpret different types of handwriting properly. It recognizes independent characters and cursive writing also.It is quite useful for complex languages like Hindi and other south Asian languages which use complex script for keyboard input.

How to use Google Handwriting input in Android smartphone

First check that your Android smartphone has Google Handwriting Input installed or not. If Google handwriting input is not installed then go to Google play store and download it. After downloading and installing Google Handwriting Input, your smartphone gets capability of handwriting recognition. For using this app, first activate the Google handwriting input method.

One important thing to keep in mind is that Google handwriting input converts handwritten text into active language of your android system. If system language is English, handwritten text is interpreted as per English vocabulary. If android system language is Hindi then handwritten text is interpreted as per Hindi vocabulary. If the vocabulary for particular language is not available in system, then Google handwriting input downloads additional package.

activate Google handwriting input

Activate Google handwriting input

Go to “Settings -> Languages & input -> Google Handwriting Input”. Select Google Handwriting Input option to activate it.

How to switch between Google handwriting input and other input method?
If Google handwriting input is active then you can press globe button to open keyboard option.Alternatively you can long press space-bar to open keyboard options.
If other keyboard is active then long press space-bar to open keyboard options.

How to use more languages?
In the settings section, go to Input Languages. You can turn off system language and choose any other language.Google handwriting input will now recognize handwritten work of other language.

How to enter spaces between words?
You can enter spaces between words by tapping the space-bar. The recognizer automatically inserts space also based on understanding of previously entered text. This works efficiently for commonly used words.

Advantage of using Google handwriting input tool

Google Handwriting input tool is result of technological advancement and it provides a latest convenient way to input text in the smartphone.

  • You can enter text in your style of writing text.
  • You need not to switch between virtual keyboards for entering different types of character like numeral, small and capital alphabets , comma, slash etc .Google handwriting input understands all type of characters which were part of virtual keyboard.
  • Your speed of text input can be better by writing text on touch screen instead of moving finger for different virtual keys.
  • People who find inconvenience in typing over virtual keyboard will be highly benefited as they just need to enter text as they write on paper.

How does CloudFlare and MaxCDN differ in CDN operation

CloudFlare and MaxCDN are both providing CDN services along with some added features. Both have few specific qualities which keep them always competitive. Generally CDN’s are desired for improved performance and then other features like security come into role.At first, I like to discuss the basic idea of website delivery without CDN and then go into the CloudFlare and MaxCDN delivery concepts.

How webpage is loaded in browser

This is the first basic question which we should be aware of before going into other details. I don’t want to display a complicated picture of webpage loading by going into several technical terms but I just want to convey basic concept of website loading into the browser so that CDN concepts can be understood easily.

When we enter the website URL in browser, it collects IP address of the web server which is hosting that website.

How browser finds IP address of webhost?

There are several places where IP address of web host is available. Browser maintain few record, your router maintains few record, and your ISP maintain few record. These are nearest places which can provide IP address of web host. If address is not available in your proximity, then next level of domain name servers are contacted. This is a chain process where a next higher level of authority is contacted for getting the IP address of particular domain name.

Once the IP address of web host is resolved, browser sends request to that IP address for particular webpage which is then served by the web server. Each webpage consists of several components like JavaScript, CSS files, images, html file etc. The main HTML file is served at the beginning which connects to all the linking documents. This HTML file is served by webhost and linking documents are served from their corresponding host. The linking documents may be stored in same server or some other server therefore the URL of each linking document can tell you its web hosting location. If you enter any website URL in Pingdom tool and check the attached documents to particular webpage then you may understand that most of the static contents like images, JavaScript, CSS files etc are stored on same webhost ( If CDN is not used) . Few third party scripts like Google fonts, Google plus badge, Facebook Like box etc connect your webpage from their own third party servers.

So the browser collects HTML page, linking document and complies everything to form your webpage. The process of webpage render by browser is itself a topic of interest but I am confining it within few words to avoid unnecessary diversion from the topic.

How does website work without CDN

webpage delivery without CDN

The last paragraph tells us briefly about website loading. Let’s forget about third party component. Assume that webpage has html, JavaScript, CSS and images. All these images, CSS, JavaScript is linked in the html file. Browsers receives html file and fetch all its linked documents thereon. This way all the components are received at the client side where browser renders the webpage.

How does MaxCDN work

After the above discussion, the webpage loading processes are understood little better. In the above case of webpage loading without CDN, if we add few techniques to host those CSS, JavaScript and images in a different server and browser download those files from their corresponding servers then it can benefit us by reducing the number of files transferred by webhost. Why should we do it? Generally webserver has resource limitation, especially in case of shared hosting so time to transfer these static files from server to browser increases due to server responses hence we can transfer these static files like images, JavaScript, CSS to other fast server and serve them from those location instead of webhost. How we can do it? We know that static components are linked in html files therefore upload those static resources on CDN server and change their corresponding linking URL in HTML file so that they are served from other fast servers instead of web host.

webpage delivery with maxcdn

When we configure MaxCDN, we change the URL of static component which we plan to host on MaxCDN. This URL changing process is through applications. If your primary domain is example.com then these applications just change the primary domain URL to MaxCDN server URL. The browser do not find any difference for total number of downloaded files so webpage rendering is done similarly.

How does CloudFlare Work

The CloudFlare operation is little different. It takes control of complete website. CloudFlare servers acts like proxy servers. When we activate CloudFlare, all the primary domain requests are terminated at CloudFlare servers. This is done by changing the name server record.

So all the URL requests land on CloudFlare server which initially check for the security issues and then it check for cached components available in CloudFlare server. Generally CloudFlare does not cache html so the html file request is completed by your web host. CloudFlare applications automatically read all the linked documents of your webpage. CloudFlare cache static components which are hosted in your web server. Third party static components are not cached by CloudFlare.

So this way, only HTML file is served by web server .Other static component, hosted at the web server are now served by CloudFlare CDN servers from their cache.

webpage delivery except html with cloudflare

CloudFlare has option to cache everything in their Custom cache option available in the page rules settings. If you cache everything then CloudFlare servers maintain cache of all type of files like html, css, js etc. In this case, CloudFlare servers serve all the resources (except third party resources) for webpage. This option completely isolates your web server for public delivery of webpages. This improves speed of delivery but it is useful only for webpages which contain static kind of information. Dynamic webpages like admin pages, login pages etc should not be served from CDN.

complete webpage delivery with cloudflare

I think the above discussion would have given basic idea of CloudFlare and MaxCDN operation. You can use both the CDN simultaneously also.

How to create website with Drupal 8 – User management

User management is one of important aspect of any web system. You can access the Drupal 8 user management from the People section. People section has three tabs i.e List, Permissions and Roles. Look at following points to see how Drupal 8 User management works.

Drupal 8 user management

Drupal 8 user management

  • Administrator has default right to create user from the administrator interface. Administrator can add user, delete user, block user, unblock user or change other user settings.
  • Each website has certain content which is visible to everyone, means anonymous users can see the content. Some of the content may be for certain authorized users, meant for registered users. So you can control the access to some content by setting the view authority. Similarly other action like creating, deleting etc can also be controlled by giving authority to specific group of users. So Drupal 8 user management also includes permissions and user roles.
  • In general terms, Roles are user groups which can be assigned specific authority through permissions so that they can perform certain action on website. Default roles in Drupal 8 are Anonymous user, Authenticated users and Administrator. You can create new roles like editor, manager etc.
  • Understanding roles and permissions is essential for managing different actions associated with website administration. Each module has certain actions which can be performed either by users or administrators. These actions are defined by the module developer in the code and administrator need to delegate authority for these actions. For example Taxonomy module has lot of features. Actions like Administer vocabularies and terms , edit term in particular vocabulary, delete term in particular vocabulary has to be performed by someone who is authorized.Similarly editors can have permissions to edit content, manager can delete content etc.
  • Each module is meant for some specific purpose. For example user module provides option to create user, delete user, edit user etc. So the authorities who can perform these action need to be defined for administrative purpose. So the permissions can be assigned from this interface for each of these actions to specific roles.
  • The above discussion about user roles, their permissions for actions, creation of user or editing specific user are main aspect of user management.
  • User registration is also one of the process which is connected with Drupal 8 user management. Drupal 8 user module has registration and login feature. As we discussed in last article for Drupal 8 website configuration, the configuration section has option to enable/disable user registration. Different options of user registration can be configured from Configuration section.

I hope that this basic idea of Drupal 8 user management will help you in understanding Drupal.

How to create website with Drupal 8 – Website configuration

After you install Druapl 8, you can login into Drupal system as administrator. Administrator is top most authority for this Drupal 8 installation who has all the rights of user management, configuration etc. Drupal 8 has lot of options and features which are configured by the administrator or other authorized users. Configuration sections has options for general settings of the website and it can be accessed from Primary menu.

Drupal 8 website configuration

Drupal 8 website configuration

System

  • Site Information – These are general settings for Drupal 8 system like website name, slogan, default front page and error pages etc
  • Cron – Drupal 8 runs certain tasks periodically like update check, content indexing to search engines etc. You can set time interval for cron or run the cron manually.

Media

Each website use different media types like images,video etc . Administrator can set different styles for images like small image, medium image, large image etc. There are multiple effects available like crop, resize, rotate,scale etc which can be applied on uploaded image.

REGIONAL AND LANGUAGE

As the name suggest, administrator can set default time zone, country and date/time for this website.

PEOPLE

As you will see that there is a People section in primary menu also which has option for Drupal 8 user management and access control but the People option in Configuration section has general settings for user management.

There are certain general settings for user registration and cancellation. You can configure different types of email messages for account activation, cancellation, password recovery etc.

There is one important thing to remember about the user registration. The default user registration form has few fields like user name, password, email etc. If you want to collect additional information during user registration, you can add more fields by Add field option in Manage Fields tab.

DEVELOPMENT

  • There is one important setting in this section i.e Performance . As we know that Drupal 8 is a complex system and dynamic page generation may take time so its better that visitors are supplied information from the cached content. Page Caching drastically improves the performance of website.
  • Drupal 8 also provides option to aggregate CSS and JS files which is essential for reducing the number of http request. In my point of view, you must select the caching option and CSS/JS aggregate option for better performance.
  • You also get option to put website in maintenance mode.

There are few other options Like RSS publishing , search and meta information etc for Drupal 8 website configuration which you can explore easily.

I hope , you could have understood the basic set of options in the Drupal 8 website configuration section.

How to build a website with Drupal 8

Drupal 8 is improved a lot over its previous versions.It is mobile friendly, feature rich, highly configurable, secure and highly extensible for various requirements. Before going further, let me briefly describe Drupal 8. First basic question may be What is Drupal, How it is different.

drupal 8 logoDrupal is a Content management system. You may treat it as framefork also but let me confine this discussion to Drupal 8 as CMS. There are several open source CMS like WordPress, Joomla etc. Basic purpose of all CMS is same i.e Content management but they all differ for the features they provide to users. WordPress is most simple with limited development features. On the other hand Drupal 8 is a feature rich CMS and offers lot of options for complex site development.

Initially Drupal 8 system look slightly complex but little understanding of terms and system makes it easier. Drupal complexity benefits users by offering several configuration options which other CMS does not so use Drupal 8 if you want to develop some website which is more than just few article pages or more than just a blog.

Creating a website with Drupal 8 requires basic understanding of Drupal system. If you understand Drupal 8 way of working, then you can create highly complex website easily. Drupal 8 has a core which includes kernel and several other modules.Core internal system includes routing of url requests, loading of files,modules,libraries,database etc. Core modules provides several inbuilt features like user, node (primary element which store individual content), taxonomy, forum, search, view etc.

In other terms,Drupal is flexible for adding new features , Drupal is flexible for look and feel of website. If you want to have some feature which is not available in default core package then you can download specific module for new feature and install it. Similarly you can change look and feel of website by changing the theme. Different types of themes are available for Drupal 8 website.

Lets start understaing the Drupal 8 system

Drupal 8 administration

The above Diagram shows different menu options available in Drupal 8 admin panel. Different features of Drupal 8 are divided among these categories.I just briefly state each of these option so that you can have basic idea of Drupal 8 administration.

  • Help – This section is for different help topics
  • Reports – The reports section provides options for different reports like error log,message log, available update etc.
  • People – This is place where you have options for user management. In addition, you can create different roles and accord permission to each role for specific task of website.
  • Configuration – This has options for configuration of website standard parameters like website name, email, region settings, date & time settings etc.
  • Extend – This section shows different modules installed in your Drupal 8 system.You can add new module, remove existing modules and activate/deactivate installed module.
  • Appearance – This section shows the installed themes in the system. You have option to install new theme, remove existing theme and control different parameters of theme for look and feel of website.
  • Content – This section has option for creating and managing content for website.Similarly you have option for comment management and file management in this section. Content may be just a Article for most of content management system but it has much broader role in Drupal 8 system. Content can be blog post, user profile, job posting,product review, product detail etc. Here these are different content type. Why are these different? Because each one has different fields for content insertion. A content type for a product detail may have fields like product pics, product title, product rating, product price, product specification, discount etc. Different types of website has their own specific content and its responsibility of Content management system to store content in database. You require a form to insert content in database and each form can have different fields.So the group of fields in a form represents specific information i.e content type. Most of the content management system provide only one type of content i.e article but drupal allows you to create multiple content type with each having specific input fields. The structure section of Drupal 8 administration allows you to create content type which we will see in next structure section.
  • Structure – This is the heart of Drupal 8 system. It allows to create structure of website. There may be a question ? What are the elements which define the structure of a website.
    • What type of information you want to display in your website – Create Content type
    • How you wish to group or link your content – Create Taxonomy
    • Each webpage has multiple section in template i.e Header, footer, sidebar etc.It means that webpage can be divided among multiple blocks so what you want to display in each block – Configure block in Block Layout
    • Where and how you want to display menu on webpage – Create and configure Menus
    • You created content type to store different types of information in database. But how you like to display information to viewers. – Create Views
    • Each site has contact us page. What fields you would like to display and how you like to display contact us page – Create and configure Contact forms.
    • Mostly websites include a comment system in their page to get feedback on their information. There are lot of parameters for a comment system. How can you create a specific comment system for you site – Create Comment types.

So in this way Drupal 8 allows you to control each and every bit of structural element. I will discuss each of the section in detail later but the broad idea of Drupal 8 system is must to avoid confusion while learning.

I will suggest users that first you check out easiest things then slowly move further. Drupal 8 has lot of features , dont get confused. First understand different sections of admin menu. I can say that first you develop understanding on sections Help, Extend, appearance, configuration,Reports,People. These six sections can be understood easily. Then you move on content section where default content types Article and Basic Page are available.Just create a sample article or basic page and view that individual piece of content on page.

The most crucial part is Structure. It takes some time to understand and practise. First you create a content type with simple fields.Then go again to Content section and add content. Here you select your recently created Content Type.Now insert some info in the fields.Check the saved result.

This is the begineing of Drupal 8 administration. I will discuss each of the section in next few articles. I hope that i could convey some understanding to reader. My objective is to convey basic understanding in simple terminology.

How to use Phalcon PHP in shared hosting server

The first and most useful aspect of Phalcon PHP framework is the performance benefit over other php frameworks. Phalcon PHP is much faster than other php frameworks. Phalcon is available as php extension and it loads together with the php on the web server. So the classes and functions of Phalcon are readily available at any moment. This gives the performance benefit to this emerging php framework.

phalcon php in shared hosting

PHP developement with phalcon is similar to other php framework but there is difference in the way of using framework. Every framework has lot of libraries for different purposes and developers include those libraries for creating an application. But Phalcon is slightly different. It is available as PHP extension so you need to install that extension in server.

So the first step for use of Phalcon PHP in shared hosting is to install the phalcon on server. If you are using phalcon on windows server then Phalcon PHP dll files are available at Phalcon Download page. Correct phalcon dll as per your php version and windows X86 or X64 version can be downloaded.

If you want to use Phalcon PHP in shared hosting linux server then you need to compile the extension for linux server and then install it. If you are using Virtual Private Server (VPS) or dedicated server then you have root server access so you can compile the Phalcon at server and then install it.But in case of shared hosting, users don’t have root server access so its not possible to compile Phalcon at server.

How to use Phalcon in shared hosting

The alternate approach may be to compile phalcon externally in some local server and then install the compiled extension in php extension directory of shared hosting.After installation of phalcon extension, create necessary entry for this extension in php.ini file. The php.ini resides in root directory of your shared hosting.

Compile Phalcon PHP for Linux

The Phalcon download page gives sufficient information for compiling Phalcon PHP in different linux operating system. In our case, we compiled locally in one of our CentOS linux server. After compilation, one .so file is created. This is the compiled phalcon extension which need to be installed for using Phalcon PHP in shared hosting server.

Install Phalcon extension in shared hosting server

  • Copy the compiled Phalcon extension in one of the directory of shared hosting server space
  • Add this phalcon extension in PHP.

The phalcon.so or the compiled .so file need to be uploaded to your web server. The root directory of your shared hosting space has a php folder. Inside this php folder, there is another folder ext. This is the appropriate place for keeping the php extension so copy the phalcon.so file in this php/ext folder. The path of root directory is something like /home14/findurlaptop .So the path of our phalcon extension will be /home14/findurlaptop/php/ext/phalcon.so .

Add Phalcon extension in PHP

Open the php.ini file and add this line of code to include phalcon extension in php.
extension=/home14/findurlaptop/php/ext/phalcon.so

The correct path of phalcon extension is very important.It is not necessary to keep the Phalcon extension in one particular directory but wherever you place this extension its path must be correct otherwise PHP will not be able to load it.