PHP

PHP custom session handler changes in PHP7

If you are using a custom session handler probably you noticed this kind of issue when you upgraded to PHP7, else keep this information in mind since in the PHP documentation it is not really clear at the moment of writing this article. Since PHP 5 this changes affected custom session handler implementation: The read method […]

Install PHP 7 and xdebug for development environement

PHP 7 was released Compile PHP 7 from source for development environement git clone git@github.com:php/php-src.git && cd php-src ./buildconf ./configure \ –with-freetype=/usr/local \ –with-config-file-path=/opt/php7/config.d \ –with-config-file-scan-dir=/opt/php7/conf.d \ –prefix=/opt/php7 \ –with-zlib-dir \ –with-freetype-dir \ –enable-mbstring \ –with-libxml-dir=/usr \ –enable-soap \ –enable-calendar \ –with-curl \ –with-mcrypt \ –with-zlib \ –with-gd \ –disable-rpath \ –enable-inline-optimization \ –with-bz2 \ […]

E-commerce platforms battle, benchmark and quality report

This article is focused on open-source online commerce platforms, most of them form PHP world. Famous e-commerce platform vs new technologies If you are here probably you want to start an online store and you are not 100% decided what will be the best platform you can use.  We are talking here just about open-source […]

Configure Zend Opcache extension for PHP

Zend Opcache extension installation If you want to speedup your PHP application maybe you are looking for a PHP accelerator such APC cache. Since PHP 5.5 there is another option for caching Opcodes (details): Zend OpCache extension If you are using PHP 5.5.0 and later Zend Opcache extension may be compiled with PHP, you have […]

Install PHP APC extension from sources

How to compile the PHP APC extension for your php version Used operating system: Ubuntu 14.04 There are few steps to follow until you will have your APC extension up and running for your particular PHP version: Download the latest version of APC wget http://pecl.php.net/get/APC Extract files and identify the default values for following parameters […]

Find in files – translations texts

Use case Follow this article if you want to locate multiple occurrences of a string in a folder using a regular expression pattern.  Find all occurrence of pattern Using following code in linux command line you will copy all occurrence of the given pattern in a temporary file find ./ -name ‘*.*’ -exec grep -o -E “language->get(.*?)” […]

Use more then one PHP version in Nginx

In many cases probably you need to have different PHP version on the same machine and using it on different domains. Install PHP You can install PHP versions by downloading already compiled package or you can compile your own (with personalized configuration – quick php compile & install guide). Personally, I prefer for development machines to […]

Install PHP 5.x from repository on Ubuntu

Install build tool Here are detailed steps for installing compile tool for ubuntu. Install dependencies In most cases quite a lot of dependencies will be missing. You can install most of them using next command sudo apt-get install libxml2-dev libpcre3-dev libbz2-dev libcurl4-openssl-dev libdb4.8-dev libjpeg-dev libpng12-dev libxpm-dev libfreetype6-dev libmysqlclient-dev postgresql-server-dev-9.1 libt1-dev libgd2-xpm-dev libgmp-dev libsasl2-dev libmhash-dev unixodbc-dev […]

X-debug installation and configuration

Find few installation references Few steps for having  x-debug working on your local environment or development: Download the proper xdebug extension http://xdebug.org/download.php, or you can use xdebug wizard http://xdebug.org/wizard.php for more information about environement. An alternative is to install using pecl: pecl install xdebug Copy binary file to PHP’s extensions folder Link this binary file in php.ini using […]