Alex's Official Blog
Sharing is a way of Learning ...
Wednesday, May 8, 2019
Sublime Text 3 Usage
1. Download and install sublime
2. Install some essential packages:
- Seti.sublime-theme : theme beautiful
- HTML-CSS-JS Prettify (need NodeJS installed) : format, clean code
- Typescript : highlight
=> Format code : Ctrl + T + F
- Emmet
- Bootstrap
- Sidebar
Thursday, November 1, 2018
How To Save Session on Redis for PHP7, Ubuntu 18.04
Hi guys,
Asume that you have PHP7 already installed.
All steps as following :
1. Dowload PhpRedis
cd /tmp
wget https://github.com/phpredis/phpredis/archive/master.zip -O phpredis.zip
2. Unpack, compile and install PhpRedis
unzip -o /tmp/phpredis.zip && mv /tmp/phpredis-* /tmp/phpredis && cd /tmp/phpredis && phpize && ./configure && make && sudo make install
Asume that you have PHP7 already installed.
All steps as following :
1. Dowload PhpRedis
cd /tmp
wget https://github.com/phpredis/phpredis/archive/master.zip -O phpredis.zip
2. Unpack, compile and install PhpRedis
unzip -o /tmp/phpredis.zip && mv /tmp/phpredis-* /tmp/phpredis && cd /tmp/phpredis && phpize && ./configure && make && sudo make install
3. Now it is necessary to add compiled extension to php config
Add PhpRedis extension to PHP 7.
Use proper path to your php configs e.g. /etc/php/7.0/ , /etc/php/7.1/
sudo touch /etc/php/7.0/mods-available/redis.ini && echo extension=redis.so > /etc/php/7.0/mods-available/redis.ini
sudo ln -s /etc/php/7.0/mods-available/redis.ini /etc/php/7.0/apache2/conf.d/redis.ini
4. Restart PHP-FPM if you have PHP 7
sudo service php7.0-fpm restart
5. Restart Apache
sudo service apache2 restart
check status of apache2
sudo systemctl status apache2
Monday, October 29, 2018
Setup ZF3 on Ubuntu
Hi guys,
All steps need to do as following :
1. Database
Install the latest Percona MySQL
2. Install Apache2, support PHP7
3. Install PHP extension
At least, you need to install dom ext by this command.
sudo apt install php-dom
sudo apt install php-zip
sudo apt install php-bcmath
sudo apt install php-curl
// mongodb
sudo apt-get install php7.x-dev
sudo pecl install mongodb
or sudo pecl upgrade mongodb
sudo apt-get install libapache2-mod-php
sudo a2enmod rewrite
4. Config Apache for run PHP7
sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php7.0-fpm
service apache2 reload
5. Folder PermissionYou must allow the Apache user (usually
www-data) to create files in that directoryEx: sudo chown -R www-data /home2/your_source_dir/public
5. Clone project from Git Source
git clone URL
git checkout your_favorite_branch
6. Config the local.config file in folder /config/autolad/ directory
Friday, September 28, 2018
Install Doctrine ODM MongoDB for PHP7
You can use Doctrine MongoDB ODM with PHP 7, but there are a few extra steps during the installation. Since the legacy driver (referred to as
ext-mongo) is not available on PHP 7, you will need the new driver (ext-mongodb) installed and use a polyfill to provide the API of the legacy driver.
To do this, you have to require
alcaeus/mongo-php-adapter before adding a composer dependency to ODM. To do this, run the following command:
1. install adapter
composer config "platform.ext-mongo" "1.6.16" && composer require "alcaeus/mongo-php-adapter"
2. install driver
composer require doctrine/doctrine-mongo-odm-module
Wednesday, July 25, 2018
Fix error when installing SourceTree
- Turn off compatibility mode in IE. To do that, open Internet Explorer, go to the Advanced options tab and click on Reset your Internet Explorer Settings
- Check Delete personal settings
- Change your Internet Explorer Security Zone Settings:
- Open IE, click on the gear
- Select "Internet Options"
- Select the "Security" tab
- Select "Custom Level" for Internet
- Find "Access data sources across domains" and select "Enable" (make note of what the setting currently is)
- Try logging into Sourcetree again
Tuesday, December 19, 2017
Extensions for Zend\I18n
Hi, I am back!
When using Zend\I18n, you need to install a PHP extension. It is intl extension.
Otherwise, you will get this error :
When using Zend\I18n, you need to install a PHP extension. It is intl extension.
Otherwise, you will get this error :
Service with name "Zend\I18n\Validator\IsInt" could not be created. Reason: Zend\I18n\Validator component requires the intl PHP extension
Monday, December 18, 2017
Error at Session Validator on ZF3
Hi,
When I deploy a ZF3 app with these validators :
When I deploy a ZF3 app with these validators :
=> I got this error :// Session manager configuration.'session_manager' => [// Session validators (used for security).'validators' => [RemoteAddr::class,HttpUserAgent::class,]],
Subscribe to:
Comments (Atom)
Sublime Text 3 Usage
1. Download and install sublime 2. Install some essential packages: - Seti.sublime-theme : theme beautiful - HTML-CSS-JS Prettify (nee...
-
This tutorial will guide you how to use PDO in order to access Microsoft SQL Server. Step 1: Install Microsoft ODBC 11 driver for MSSQL ...
-
How to install MongoDB - Enterprise on CentOS 1. Configure repository. Create an /etc/yum.repos.d/mongodb-enterprise.repo file so t...
-
Nominatim Installation Update date: 2017/03/29 Contents 1. Các thuật ngữ . 5 2. Giới thiệu . 5 3. ...
