This object is in archive! 

Add support for PhalconPHP extension (Apache/PHP)

Nikolaos Dimopoulos shared this idea 3 years ago
Completed

PhalconPHP is the fastest PHP framwork. It is a web framework implemented as a C extension, offering high performance and lower resource consumption.

Installation of the framework requires compiling it as a PHP extension and loading it in your Apache configuration (via the php.ini or other parsed ini file).

Allowing this extension to be part of the available extensions for cPanel customers will not only increase the visibility of the project itself, but it will benefit developers, hosting companies, and subsequently end users due to the fact that less resources will be used by the framework itself to offer functionality towards the web application that is implemented with it.

Thank you for the consideration.

Best Answer
photo

You can now find the PhalconPHP EasyApache addon at our Custom Module download location (https://documentation.cpanel.net/display/EA/Custom+Modules).

Comments (28)

photo
2

1. Can you provide examples of applications that currently use this framework?

2. Is it possible to distribute pre-compiled binaries compatible with PHP 5.4, similar to the way IonCube is distributed?

3. How do hosting companies benefit from this framework?

4. Is this framework compatible with the suPHP, Fast CGI, FPM, and DSO Handlers?

5. Is this extension thread-safe?

photo
8

Kenneth Power wrote:

1. Can you provide examples of applications that currently use this framework?

2. Is it possible to distribute pre-compiled binaries compatible with PHP 5.4, similar to the way IonCube is distributed?

3. How do hosting companies benefit from this framework?

4. Is this framework compatible with the suPHP, Fast CGI, FPM, and DSO Handlers?

5. Is this extension thread-safe?

Hello KennethAnswers to your questions:

1. https://github.com/phalcon/cphalcon/wiki/Powered-by-Phalcon is the list of sites that are live and running on Phalcon. We also have a few more but did not get permission to post their URLs in our Wiki.

http://bhteck.com/ is one of the biggest portals for hospitality and restaurants in Colombia and it is using Phalcon :)

I can also say that a company that operates similarly to Google Adsense has been using Phalcon and Mongo for their platform and also the Government of Guadalajara (Mexico) is using it in an Internal/Intranet application offering statistical data and reports.

2. Currently the installation script will detect the architecture of the target machine and use libc and gcc to compile the extension. However, if we know a list of the target architectures and versions of libc, we can definitely compile binaries that can be used in the same manner as IonCube does.

The ideal scenario however is to have some sort of cPanel addon/plugin/script that would wget the package from github, unzip it, run the installation and then enable the extension in the php.ini.

3. Customers for starters. At the moment the biggest hurdle for people using Phalcon is its installation in hosting environments. Installation is not a problem in VPS machines or when the customer has access to the shell prompt. Most users will have access to a cPanel installation through their host without the ability to use the shell, and therefore install the extension.

We have run some basic benchmarks to showcase the resources needed by some of the popular PHP frameworks to output a hello world on screen. The results are here:

http://docs.phalconphp.com/en/latest/reference/benchmark/hello-world.html

Granted nothing beats great design and implementation in applications but there is always the overhead of the framework in any application that uses a PHP framework.

Using lower resources for PHP applications will allow hosting companies to make better use of their equipment and provide a better/faster service to their customers. If a hosting company has a customer that wants to deploy two applications using a PHP framework, then the following results should be expected.

Hard drive space requirements:

Laravel 3.x: 4.4 Mb

CodeIgnighter 2.x: 5 Mb

CakePHP 2.x: 12 Mb

Zend Framework 2.x: 15 Mb

Symfony 2.x: 39 Mb

If the customer is not using a shared folder to store the library files, these space requirements will be doubled (to cater for the two applications). Every new application that is uploaded will effectively either need to be symlinked to a common library folder or have the whole framework re-uploaded in its application folders. This wastes resources for the hosting company and the customer.

Phalcon does not suffer from this limitation since it is loaded in memory and is always available throughout the customer's account/environment.

Additionally, pointing back to the benchmarks (http://docs.phalconphp.com/en/latest/reference/benchmark/hello-world.html) the number of file scans (and stat) that the OS has to perform to offer the functionality of a framework is greatly reduced by using Phalcon.

The simple hello world application shows that Zend Framework for instance needs to include/scan more than 60 files vs. Phalcon's 4.

Memory-wise Phalcon uses 0.75 Mb while Zend uses double that.Lower resource usage and speed (see requests per second chart in the benchmarks) will allow hosting companies to offer better and faster services to customers who in turn will offer faster applications to their users.

4. Yes

5. Absolutely. We also compile Windows DLLs in TS and NTS flavors.Let us know if you have any more questions regarding this :)

photo
4

Kenneth Power wrote:

1. Can you provide examples of applications that currently use this framework?

2. Is it possible to distribute pre-compiled binaries compatible with PHP 5.4, similar to the way IonCube is distributed?

3. How do hosting companies benefit from this framework?

4. Is this framework compatible with the suPHP, Fast CGI, FPM, and DSO Handlers?

5. Is this extension thread-safe?

One last thing to add which might help

There is a deb repo http://debrepo.frbit.com/

and also a PKGBUILD for Arch http://aur.archlinux.org/packages.php?ID=61950

We also got word that a RPM package is in the works. I will let you know as soon as we hear more on that.

photo
1

Thank you for your responses, Nikolaos.

What are the actual requirements for building and installing PhalconPHP? Your installation document (http://docs.phalconphp.com/en/latest/reference/install.html#linux-solaris-mac) is very light on those details.

For example, based upon the installation document I could assume a very stripped down installation of PHP 5.4 is all that is required. Reading other documents, however, reveals that specific extensions/modules are required, such as openssl (e.g. http://docs.phalconphp.com/en/latest/reference/security.html).

Having easy access to the requirements simplifies the act of installing software.

photo
3

Kenneth Power wrote:

Thank you for your responses, Nikolaos.

What are the actual requirements for building and installing PhalconPHP? Your installation document (http://docs.phalconphp.com/en/latest/reference/install.html#linux-solaris-mac) is very light on those details.

For example, based upon the installation document I could assume a very stripped down installation of PHP 5.4 is all that is required. Reading other documents, however, reveals that specific extensions/modules are required, such as openssl (e.g. http://docs.phalconphp.com/en/latest/reference/security.html).

Having easy access to the requirements simplifies the act of installing software.

Hey Kenneth,

Technically Phalcon does use some extensions to offer functionality. However those extensions are not necessary for the framework to work as a whole. Yes, if you do not load the PDO extension the database connectivity will not work but the rest of the framework will.

Phalcon does not have any binary dependencies to outside extensions but does use the following:

mbstring

openssl

mcrypt

PDO

PDO/Mysql

PDO/Postgresql

PDO/Sqlite

PDO/Oracle

Mongo

Now if a user uses only MySQL they can just ignore the PDO/Postgresql, PDO/Oracle, PDO/Sqlite as well as Mongo .

Any component that uses functionality from a different extension will check if the extension is loaded and throw an exception if it is not.

I will add the dependencies in the build page as well so as people know what they need to install based on their requirements.

photo
4

Probably will became the best PHP framework in some months/years. And already is the fastest, nice work! Gogogo CPanel team, don't let us waiting for it!

photo
1

Kenneth Power wrote:

Thank you for your responses, Nikolaos.

What are the actual requirements for building and installing PhalconPHP? Your installation document (http://docs.phalconphp.com/en/latest/reference/install.html#linux-solaris-mac) is very light on those details.

For example, based upon the installation document I could assume a very stripped down installation of PHP 5.4 is all that is required. Reading other documents, however, reveals that specific extensions/modules are required, such as openssl (e.g. http://docs.phalconphp.com/en/latest/reference/security.html).

Having easy access to the requirements simplifies the act of installing software.

Kenneth, any news on this? It appears that there is good support behind this feature request :)

Thanks!

photo
2

I'm a web developer, and Phalcon was the best framework i've used in my life.

I've used alot, like Zend, COdeIgniter, Yii, and others, but Phalcon beat them all.

photo
1

Is it fair to say that the primary beneficiaries of bundling PhalconPHP with cPanel & WHM are PHP developers?

In my research I couldn't find any end-user applications, such as Drupal or WordPress, that rely upon PhalconPHP.

photo
4

Kenneth Power wrote:

Is it fair to say that the primary beneficiaries of bundling PhalconPHP with cPanel & WHM are PHP developers?

In my research I couldn't find any end-user applications, such as Drupal or WordPress, that rely upon PhalconPHP.

It will be, look at http://phalconeye.com. It's in alpha stage now, but soon, will be released with new features.

photo
1

Kenneth Power wrote:

Is it fair to say that the primary beneficiaries of bundling PhalconPHP with cPanel & WHM are PHP developers?

In my research I couldn't find any end-user applications, such as Drupal or WordPress, that rely upon PhalconPHP.

Kenneth, you are correct. The primary beneficiaries are PHP developers since Phalcon is a PHP framework.

There are a lot of end user applications already developed (Phalconeye being one of them for instance). Most of those applications tend to not be directed to the masses such as Drupal or Wordpress - they are more custom made applications that suit the needs of the project.

Some of the projects that our users have submitted to us is located here.

https://github.com/phalcon/cphalcon/wiki/Powered-by-Phalcon

The list is not exhaustive since we are aware of a lot more projects that we cannot publicize yet.

photo
3

it's not only for developer

it will help to save resources of servers . it is very important part for hosting companies +1 for phalcon

photo
3

Any one Interested to buy shared hosting if i provide cpanel with phalcon php framework

photo
1

This can be solved with the "Centralized Server Management" or "cPanel Cloud Engine", creating a independent VPS with this PHP extension that not affect other accounts.

http://features.cpanel.net/responses/as-a-hosting-provider-i-want-centralized-server-management-so-that-i-can-control-many-servers-from-one-main-server

photo
2

So far I can only read reasons that Phalcon should be added to cPanel. Is there any GOOD reason not to be added ? Please add! Regards.

photo
2

I think Phalcon is the framework of the future.

I'm currently writing tutorials for the Hispanic communities in my blog

photo
1

I was trying to install Phalcon PHP today and ran into trouble and later learned it can't be done with cPanel. This is very unfortunate and I'm considering leaving cPanel so that I can use Phalcon. I hope cPanel will add support for Phalcon soon.

photo
2

Here's a link showing how to add Phalcon support to EasyApache:

http://www.thecpaneladmin.com/php-phalcon-module-for-cpanel-easyapache/

photo
1

is sad to see that cpanel team is too busy adding new functionalities and extensions that are not even close as requested as Phalcon. Maybe these guys behind cpanel should give Phalcon a try to see how fast it is compared with other frameworks.This is truly the future of php.

photo
2

One point to mention - it's just a PHP module that is installed like any other Pecl mod. There's really no reason why you can't just create a script hook to install it after an EA compile, or use the mod presented earlier in this thread.

As a larger hosting provider, I personally would prefer to see cPanel working on more important things rather than a PHP CMS.

photo
1

Vanessa Vasile wrote:

One point to mention - it's just a PHP module that is installed like any other Pecl mod. There's really no reason why you can't just create a script hook to install it after an EA compile, or use the mod presented earlier in this thread.

As a larger hosting provider, I personally would prefer to see cPanel working on more important things rather than a PHP CMS.

It is not a content management system (cms). It is a php framework. But yes it can be installed manually as long as the hosting company gives your account the permissions to perform the required tasks. So VPS and dedicated servers should be good to go. Shared hosting could have problems.

photo
1

Jonathan Maloy wrote:

It is not a content management system (cms). It is a php framework. But yes it can be installed manually as long as the hosting company gives your account the permissions to perform the required tasks. So VPS and dedicated servers should be good to go. Shared hosting could have problems.
As a shared hosting provider representing one of the largest cPanel hosts in the industry, I would never install this on a shared server. Customers who want to use it can via local php.ini if suPHP or FastCGI is installed, or they can get a VPS.

photo
1

Vanessa Vasile wrote:

As a shared hosting provider representing one of the largest cPanel hosts in the industry, I would never install this on a shared server. Customers who want to use it can via local php.ini if suPHP or FastCGI is installed, or they can get a VPS.
Vanessa, if phalconeye becomes mature and user friendly (as opposed to just being developer friendly) and gains momentum,then it will be in your interest to support phalcon, since it is just another php module like yaf.

photo
1

We have more and more customers who are developpers. Luckely for us we now have it in phpselector. I do not understand why not having any ready to use scripts should be a reason to not implement it. Before such scripts become available phalcon needs to be implemented on most shared web hosting servers.

photo
1

I agree with the other comments, phalcon is a great framework and should be added to cpanel as soon as possible. This request has been created over a year ago, received hundreds of votes and nothing happened, why? It would be really important for people to have access to this framework. I would also suggest to read this: http://forum.phalconphp.com/discussion/488/what-happened-to-our-votes-for-including-phalcon-in-cpanel

photo
1

Definitely would like to see phalcon included with cPanel. Doing so will encourage more developers to use it which will in turn lower the CPU/memory usage of servers, instead of the hungry frameworks like Symfony, CakePHP, Zend, Laravel (not to mention Wordpress/Drupal) that are currently being used. That's a big benefit to web hosts.

I did, however, manage to get phalcon to run on my cPanel shared hosting account, without requiring root or even SSH access to do so. Posted my solution here:

http://serverfault.com/a/607105/93347

photo
2

Danny wrote:

Vanessa, if phalconeye becomes mature and user friendly (as opposed to just being developer friendly) and gains momentum,then it will be in your interest to support phalcon, since it is just another php module like yaf.

What I'm perhaps wondering then is why you're relying on cPanel to do this for you. I understand the need for convenience, but keep in mind that there are literally hundreds of PECL modules - and this is just another one of them. There are several solutions posted now as to how to install this with little to no effort, including the EA plugin I wrote that lets you integrate this easily. I personally would rather see cPanel working on more useful things that would benefit the growth of us larger fish, rather than fiddling with PECL modules in EasyApache.

photo
1

You can now find the PhalconPHP EasyApache addon at our Custom Module download location (https://documentation.cpanel.net/display/EA/Custom+Modules).