Monthly Archives: August 2012

How to install LAMP server in Fedora 17

I have recently move on Fedora from Ubunutu . Here I share how to install LAMP (Linux, Apache, MySQL and PHP) server in fedora 17.

– Install Mysql Server

yum install mysql mysql-server

Now start and Enable Mysql service. Run this command

systemctl start mysqld.service
systemctl enable mysqld.service

Now create MySQL pasword –

mysqladmin -u root password [your_password_here]

Now check mySQL . Run

mysql -h localhost -u root -p

Continue reading How to install LAMP server in Fedora 17

Advertisements

Error on MongoDB: couldn’t connect to server 127.0.0.1 shell/mongo.js

I have faced some problem after installing MongoDB on my Ubunutu 12.04.  Here is the error .

Error: couldn't connect to server 127.0.0.1 shell/mongo.js:84
exception: connect failed

I found some solution on google. Here it is.

sudo rm /var/lib/mongodb/mongod.lock
sudo -u mongodb mongod -f /etc/mongodb.conf --repair
sudo service mongodb start

Please read this  for more detail. Continue reading Error on MongoDB: couldn’t connect to server 127.0.0.1 shell/mongo.js

Creating custom routes in your zend framework application

One of my zend framework project need to define custom routs . I have google a lot then found a solution.

Here I share my solution.

You can define custom routes in zend framework in many ways. I create a ini file to do this.

First add those line to your Bootstrap file.

protected function _initRoutes() {
$this->bootstrap('frontcontroller');
$front = Zend_Controller_Front::getInstance();
$router = $front->getRouter();
$myRoutes = new Zend_Config_Ini(APPLICATION_PATH . '/configs/routes.ini', 'production');
$router->addConfig($myRoutes, 'routes');
}

This will tell the system routing information from “routes.ini” file from application/configs.

Then you need a routes.ini file in application/configs. Now create a new file named routes.ini there.

Now say for example your domain is http://yourdomain.com and you want the http://yourdomain.com/index to be http://yourdomain.com/live Continue reading Creating custom routes in your zend framework application

Install Zend framework on WAMP server

Few day’s ago we deployed one of our web application to windows machine. Then I have learn how to set up zend framework on windows machine.

Zend install on wamp is very easy.

FIrst download the latest zend framework from the official site of zend . Here is the link . http://framework.zend.com/download/latest

Upload the folder to your local server.

1. Edit php.ini

php,ini file is located under
c:wampbinapacheapache2.2.11bin

folder..

if you want to find where php.ini file

go to following link and

http://localhost/?phpinfo=1

 ;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"

; Windows: "path1;path2"
include_path = ".;c:phpincludes;c:wamplibraryzendframeworklibrary"

after changing php.ini you need to restart wamp server.

Now create virtual host. Here is step by step instruction for configure virtual host on WAMP for local development.

Firstly you will need to download and install WAMP. Continue reading Install Zend framework on WAMP server