Wednesday, December 30, 2009

Ubuntu Edit apache and php.ini settings

Recently, I started using Linux OS(UBUNTU 9.x) for development. I just want to share the knowledge what I have learned from the web. Today I need to enable the mod_rewrite module in the apache, since my project is implemented with smart urls using htaccess.

In this post, I am going to give instructions, how to edit apache settings and php.ini file in the ubuntu 9.4.

Enable Mod_rewrite in the apache in the ubuntu
----------------------------------------------------------
1)copy a file named 'rewrite.load', from the folder /etc/apache2/mods-available into /etc/apache2/mods-enabled
(There is a terminal command which can be used to move/copy the file 'rewrite.load' from the mods-available folder to mods-enabled folder. Type the following command in terminal: sudo a2enmod rewrite )

2)open the terminal and restart the apache using the command
sudo /etc/init.d/apache2 restart

Now you can check the loaded modules in apache, by echoing phpinfo() method in a php file. The rewrite module will be listed in the apache loaded modules.

Then Edit the file /etc/apache2/sites-available/000-default as admin. To edit this file as super admin type the following command in terminal:
sudo gedit /etc/apache2/sites-available/000-default

Replace the 'AllowOverride None' with 'AllowOverride all' in 2 places. inside < directory > tag and < directory > tag.

Now open the terminal and restart the apache using the command
sudo /etc/init.d/apache2 restart


Apache rewrite is done now. ;)

Edit php.ini file in the ubuntu
---------------------------------
1)To edit the php.ini file as super admin type the following command in terminal
sudo gedit /etc/php5/apache2/php.ini

Edit and save.

2)then open the terminal and restart the apache using the command sudo /etc/init.d/apache2 restart

Wednesday, December 23, 2009

install / setup zend framework

Hi,

This is my first post in the PHP zend framework. I will keep posting my learnings in the future.

version: ZendFramework-1.9.6
PHP5 , Mysql5 (wamp setup)
OS: Windows XP

The first day Excercise in the Zend Framework: Setup the Zend Framework

1) First download the ZendFramework from the website. Extract the zip in the htdocs OR www folder

2) Edit the php.ini and give the library folder path value (say D:\wamp\www\Zend\library) in the include_path settings variable.

3) Edit the Environment variable from the MyComputer and give the php.exe file folder path

4)In Command prompt, type the below to create the test project folder:
D:\wamp\www>D:\wamp\www\Zend\bin\zf.bat create project testproject

This command will create a folder in the www folder with many subfolders and some php, phtml files.


Reference Links:
----------------
http://www.survivethedeepend.com/zendframeworkbook/en/1.0/
http://framework.zend.com/docs/quickstart/create-your-project

Please feel free to post if any questions /alternative approaches.

Monday, February 16, 2009

top 5 add-ons for firefox

fire-fox is well known for its useful and smart add-ons

Here I have listed my favourite add-ons

1) Firebug : Javascript debugger tool and can monitor ajax requests.
2) Web Developer: Very usefull tool if you are a web developer.
3) View source chart: very usefull to analyze the dynaically generated div areas
4) FoxMarks: useful tool for storing bookmarks in a server
5) FirePHP: Firebug extension for ajax

Please post your comments.