Php fresher interview questions

Hello all,

Here is some php basic concepts that php beginner must know.

1.What is php Explain its features?
2.Why php is most popular over other web development framework?
3.What type of variable are available in php?
4.How can you typecast from one variable to other?
5.What is configuration files. How it is used?
6.What is WAMP/LAMP server?
7.What is predefined variables. What is global variables?
8.What is constants. describe magic constant?
9.Define operators?
10.What is function .how to return values?
11,What is OOPS features. Describe use of each?
12.What is class How we use it?
13.What is magic methods?
14.What is inheritance?
15.What is visibility?
16.What is final keywords?
17.What is abstract class?
18.What is interface. How we use it .Define and implement?
19.Use of Scope resolution operator.?
20.What is exceptions? Define runtime exceptions.How to throw custom exceptions?
21.What is Session and cookies? how we use this?
22.How to connect database with php?
23.Functions for string array regex?
24.How to upload files using PHP?
25.How can we encrypt the password using PHP?
26.Define urlencode() and urldecode() used in PHP?
27.Explain “GET” and “POST” methods.

Please get answers well on each .will continue posting answers on above.

Take a ref from here:http://php.net/manual/en/index.php

Find some more question here http://magentoshare.blogspot.in/2012/01/php-interview-questions-and-answers.html

Thanks.

Override router controller in magento

<?xml version=”1.0″ encoding=”UTF-8″?>
<config>
<modules>
<Namespace_Customer>
<version>0.0.1</version>
</Namespace_Customer>
</modules>
<frontend>
<routers>
<customer>
<args>
<modules>
<Namespace_Customer before=”Mage_Customer”>Namespace_Customer</Namespace_Customer>
</modules>
</args>
</customer>
</routers>
</frontend>
</config>

Where Namespace_Customer is your custom module and “customer” is router that you wish to overwrite.

Thanks

How to install fresh magento

Step 1> Go to Magento Download Site  http://www.magentocommerce.com/download  and choose format to download from select box

“Select your format ” and click download .You will be redirected to download page. If not logged in you will be promt to login.login if you have account otherwise create one(free) and repeat step 1.

Step 2>Go to sample data tab and download sample data (for eg-magento-sample-data-1.6.1.0.zip (9.92 MB).After extracting it you will get a .sql file

Step 3>Create a database from phpmyadmin and note it . import sql file in database got in step 2.(At this point you may get an error like file size exeeded) set  variable “upload_max_filesize” from php.ini

Step 4>Extract folder from step 1 and paste on root folder of your webserver and browse.

follow steps well when ask for database settings give db name created.

You are done with installing magento with sample data

Thanks