PHP Improvements in 1.9.3 Jelastic Release

By | February 27, 2014
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

php improvementsRecently, we announced the release of a new version of Jelastic’s Platform-as-Infrastructure. This version delivers key features for enterprises and hosting service providers, focusing on application scalability, security and performance. Today we’d like to pay more attention to the main PHP improvements that were implemented in the 1.9.3 release of Jelastic. These are:

  • Automatic change of workers according to the stated resource limits
  • Adding Zend OPcache extension
  • Enabling mod_security module for Apache

And now, let’s examine each point in depth.

Change the Number of Workers Automatically

The latest Apache versions implement hybrid multi-threaded and multi-process models to serve requests. The number of processes and threads per process are governed by Apache configurations. Each request processing thread is called a worker. Apache automatically self-regulates the number of workers for processing PHP requests, depending on the cloudlet amount stated for the server.

To check the process of Apache workers automatic change, navigate to the Conf option of your server and perform the following steps:


1. Open conf > httpd.conf file and remember the MaxClients value (in our case we have MaxClients 51).


2. After that, Change environment topology by increasing or decreasing the cloudlet limit for your server. As an example, we increased the number of cloudlets for Apache.

change topology

3. Return to the conf > httpd.conf file. As you can see, the number of MaxClients has increased (MaxClients 102). If you set less cloudlets the MaxClients will be decreased.

changed maxclient

Note that this function will be disabled if you remove the following string from the httpd.conf file:
# Jelastic autoconfiguration mark

Zend OPcache

Zend OPcache improves PHP performance by storing a pre-compiled script bytecode in shared memory. As a result, this removes the need for PHP to load and parse scripts on each request.

Zend OPcache is enabled in Jelastic PHP app servers by default. Apache and Nginx (php: 5.3, 5.4, 5.5) include OPcache extension enabled via etc > php.ini:


opcache extension

The default size and other OPcache settings can be configured via the php.ini file by changing the following parameters:

  • opcache.enable=1
    enable/disable OPcache extension

  • opcache.memory_consumption=64
    set the amount of memory to use (in megabytes)

  • opcache.interned_strings_buffer=8
    set the amount of memory to be used for storing internal strings (e.g. classnames)

  • opcache.max_accelerated_files=4000
    the maximum number of files to be cached

  • opcache.revalidate_freq=60
    the frequency of checking file timestamps for changes to the shared memory storage allocation

  • opcache.fast_shutdown=1
    enable/disable a fast shutdown sequence for accelerated code

  • opcache.enable_cli=1
    enable/disable the OPcache for the CLI version of PHP

opcache settings

Using opcode caching and optimization OPcache extension, speeds up PHP execution. This results in a performance improvement of up to 40%.

Configuring mod_security Module

mod_security is a super handy Apache module, which provides such abilities as simple filtering, URL and Unicode encoding validation, auditing, null byte attack prevention, upload memory limits, server identity masking, built in chroot support and many more.

This module is available in Jelastic by default and can be configured via conf.d > mod_security.conf file.


Here you can edit the default configurations or add your own custom ones.

For example, you can add some extra ModSecurity Rules by uploading them to the modsecurity.d folder (e.g. modsecurity_crs_11_brute_force.conf).

 modsecurity rules

The rules uploaded to modsecurity.d or to activated_rules folders will be automatically activated without any extra settings.

This is set with the following default parameters in the conf.d > mod_security.conf file:

Include modsecurity.d/*.conf
Include modsecurity.d/activated_rules/*.conf

modsecurity settings

In such a way, you can set up additional security configurations for your PHP application hosted with an Apache application server.


Step-by-step Jelastic enhances its functionality in all directions and this release was not an exception. The implemented PHP improvements increases the level of security and scalability of the hosted PHP applications. In our plans there are much more PHP features that will be implemented in the further releases. Did you experience any technical problems while hosting your PHP application? Let us know in the comments below and we’ll try to address any issues by improving Jelastic’s platform.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Subscribe to get the latest updates

  • WooDzu

    Is there a roadmap for what the Team is working on at the moment? Personally Im waiting for MySQL5.6 but it would be nice to generally see what is on the table to plan for changes upfront

    • Tetiana Fydorenchyk

      Jelastic roadmap is private and we do not share our plans until release. Right after updates Release Notes with all changes will be published.
      As for MySQL5.6, we didn’t upgrade to this version as after its inspection found out some bugs critical for our system performance. We are planning to upgrade to this version as soon as we get more stable patch of MySQL5.6.

  • Dirk

    Its a big pitty how the fantastic Jelastic is distributed to companys with very well known worse support, why do you hnd out such great technique to companies with bad Reputations?????

    • Tetiana Fydorenchyk

      Thank you for your feedback! Can you specify which hosting companies do you mean? This will be a great contribution in order to improve their support of Jelastic service.