Skip to main content

Installing phalcon in Debian Jessie (Debian 8)

apt-get update
apt-get install git-core gcc autoconf make
apt-get install php5-dev php5-mysql

Now clone the phalcon git repository

git clone git://github.com/phalcon/cphalcon.git

cd cphalcon/build

Run the install file:

./install

Once installation completed, you can see output messages


Installing shared extensions:     /usr/lib/php5/20131226/
Installing header files:           /usr/include/php5/


Now edit your php.ini file for enabling phalcon

nano /etc/php5/apache2/php.ini

Add the phalcon extension at the end of the file:

extension=phalcon.so

Restart apache to make changes effect

service apache2 restart

Create a info.php file under your document root and paste the line


<?php phpinfo(); ?>

Run the info.php in web browser. Search for the keyword 'phalcon' in the resultant page. If you are finding it phalcon has been successfully configured. Otherwise you need to enable the module.

cd /etc/php5/mods-available

touch phalcon.ini

nano phalcon.ini

Add these lines and save

[phalcon]
extension = phalcon.so

Now make a phalcon symbolic link in apache2/conf.d folder

cd /etc/php5/apache2/conf.d

Now create a symbolic link  20-phalcon.ini

ln -s /etc/php5/mods-available/phalcon.ini 20-phalcon.ini

Restart apache to take effect

service apache2 restart

Now reload the info.php file on browser, you can see the phalcon module is showing there.

Sometimes you need to enable apache mod_rewrite module. To enable mod_rewrite:

a2enmod rewrite

Reboot apache to take effect

service apache2 restart

Still your phalcon project is not loading??

You need to make sure Allow Overrides is set to All under the /var/www

For doing this follow the steps:

a2dissite 000-default.conf
service apache2 reload

nano 000-default.conf

Add these lines within

<VirtualHost *:80>

<Directory /var/www/>
   Options Indexes FollowSymLinks MultiViews
   AllowOverride All
   Order allow,deny
   allow from all
</Directory>

<VirtualHost *:80>

a2ensite 000-default.conf

service apache2 reload

Comments

Popular posts from this blog

Wowza Streaming Engine REST API - Monitoring The Status of a STREAM File

This is a small PHP-CURL script, initiates a JSON request to Wowza API to get the realtime status of a STREAM file. Note that the request is protected by Wowza 'AUTHENTICATION - DIGEST' Mechanism. ********************************************************************** $wowzaip = '192.168.166.68'; //replace with your wowza ip address $application = 'live'; //replace with your application name $streamfile = '10-20160527134707366114.stream'; //replace with your streamfile //initiate a curl session $ch = curl_init(); //set http header to json curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Accept: application/json')); //set wowza request url curl_setopt($ch, CURLOPT_URL, 'http://'.$wowzaip.':8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/'.$application.'/instances/_definst_/incomingstreams/'.$streamfile.'/monitoring/current'); //set RETURNTRANSFER true. Now return as string instead of output curl_setop...

MySql command line - Print query output containing large number of rows and columns

To print large dataset of records in user friendly way, use any of these options. Option1# (open the records in linux 'less' editor - line by line format)      mysql> pager less;      mysql> select * from table\G; Option2# (open the records in linux 'less' editor - table format)      mysql> pager less -SFX;      mysql> select * from table; Escape character of 'less' is 'q'