Preporing Fedora 22 to use with Yii php Framework

You will need to add the following to your php.ini script:

/etc/php.ini

extension=apcu.so
extension=intl.so
extension=memcache.so
extension=imagick.so

then change expose_php = Off (default is On) then Save your php.ini (This is not finish yet)

1. Get all you need to development machine. This is probably more than you need but it will save you time with finding out what is missing on your system.

yum install php-devel httpd-devel
yum groupinstall ‘Development Tools’
yum groupinstall ‘Development Libraries’

yum install postgresql
yum install postgresql-devel
yum install php-gd
yum install ImageMagick
yum install ImageMagick-devel

yum install re2c
pecl channel-update pecl.php.net
pecl install apcu-beta

pecl install intl
pecl install memcache
pecl install postgresql
pecl install pdo_pgsql
pecl install imagick

service httpd restart

2. Install Yii and get composer first

curl -sS https://getcomposer.org/installer | php

composer global require “fxp/composer-asset-plugin:1.0.0”

composer create-project –prefer-dist yiisoft/yii2-app-basic yourAppName

3. Move your app to httpd documentRoot directory /etc/httpd/conf/httpd.conf and look for
DocumentRoot “/var/www/html/” or create your own confing and put into /etc/httpd/conf.d

example below
# This first-listed virtual host is also the default for *:80
ServerName http://www.jawuk.dev
ServerAlias jawuk.dev
DocumentRoot “/var/www/html/basic/web”
DirectoryIndex index.php index.html

4. Make sure you have added your siteName to /etc/hosts

127.0.0.1     jawuk.dev

5. Move requirement.php to web folder inside yii project then run http:/yourSiteName/requirements.php

amend path in requirements.php to $frameworkPath = ‘../vendor/yiisoft/yii2’; (this is to point where vender folder is)

if you don’t move it web folder then you don’t need amend the path as it will work.

5. service httpd restart

6. check http://yourSite/requirements.php
then when you check requirements.php it should be a lot happier altought it seems I am missing something with pgsql

if you end up having mkdir permission issue make sure you issue this command

[root@ami basic]# chmod 0750 -R /var/www/html/
[root@ami basic]# chcon -R -t httpd_sys_content_t /var/www/html/
[root@ami basic]# chcon -R -t httpd_sys_content_rw_t /var/www/

PHP version Passed Yii Framework PHP 5.4.0 or higher is required.
Reflection extension Passed Yii Framework
PCRE extension Passed Yii Framework
SPL extension Passed Yii Framework
MBString extension Passed Multibyte string processing Required for multibyte encoding string processing.
OpenSSL extension Passed Security Component Required by encrypt and decrypt methods.
Intl extension Passed Internationalization support PHP Intl extension 1.0.2 or higher is required when you want to use advanced parameters formatting in Yii::t(), non-latin languages with Inflector::slug(), IDN-feature of EmailValidator or UrlValidator or the yii\i18n\Formatter class.
ICU version Passed Internationalization support ICU 49.0 or higher is required when you want to use # placeholder in plural rules (for example, plural in Formatter::asRelativeTime()) in the yii\i18n\Formatter class. Your current ICU version is 52.1.
Fileinfo extension Passed File Information Required for files upload to detect correct file mime-types.
DOM extension Passed Document Object Model Required for REST API to send XML responses via yii\web\XmlResponseFormatter.
PDO extension Passed All DB-related classes
PDO SQLite extension Passed All DB-related classes Required for SQLite database.
PDO MySQL extension Passed All DB-related classes Required for MySQL database.
PDO PostgreSQL extension Warning All DB-related classes Required for PostgreSQL database.
Memcache extension Passed MemCache
APC extension Passed ApcCache
GD PHP extension with FreeType support Passed Captcha Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.
ImageMagick PHP extension with PNG support Passed Captcha Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.
Expose PHP Passed Security reasons “expose_php” should be disabled at php.ini
PHP allow url include Passed Security reasons “allow_url_include” should be disabled at php.ini
PHP mail SMTP Passed Email sending PHP mail SMTP server required
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s