LAMP MCQs

LAMP MCQs

These LAMP multiple-choice questions and their answers will help you strengthen your grip on the subject of LAMP. You can prepare for an upcoming exam or job interview with these LAMP MCQs.
So scroll down and start answering.

1: Why LAMP?

A.   all servers work under Linux

B.   it's flexible, productive, widespread and low cost (all components can be downloaded for free from Internet)

C.   there are no alternative

D.   only professionals can work with other alternatives

2: Which of the following file is a MySQL configuration file?

A.   /etc/conf/my.cnf

B.   /etc/mysql.cnf

C.   /etc/conf/mysql.cnf

D.   /etc/my.cnf

3: What does the following error "Access denied for user 'root'@'localhost' (using password: YES)" mean?

A.   wrong password

B.   wrong database name

C.   wrong password and username

D.   wrong username

4: What port does squid listen, by default?

A.   4322

B.   2314

C.   3128

D.   7334

5: Which of the following Linux command outputs the available free space in local hard-disk partitions?

A.   free

B.   fdisk

C.   df

D.   du

6: To quote a string within a string, which of the following can you use?

A.   'This is the "quoted" message'

B.   'This is the quoted" message"'

C.   This is the "quoted" message

7: Which of the following apache directory has all server configuration files?

A.   htdocs

B.   conf

C.   logs

D.   cgi-bin

8: What will be the output of this command : ls list* ?

A.   This will list all files in the current directory ending with list

B.   This will list all files in the root directory starting with list

C.   This will list all files in the current directory starting with list

D.   This will list all files in the root directory ending with list

9: Which of the following is not a valid directive of Apache Control Command (apachectl)?

A.   start

B.   kill

C.   stop

D.   status

10: How to see information about PHP configuration from a script?

A.   phpinfo()

B.   phpconfig()

C.   php_info()

D.   php_config()

11: What does "." (DOT) signify in Unix?

A.   Parent Directory

B.   Root Directory

C.   It is not supported

D.   Current directory

12: Which of the following is the main Apache configuration file?

A.   /etc/apache.conf

B.   /etc/srm.conf

C.   /etc/httpd/conf/httpd.conf

D.   /etc/httpd/config.ini

13: Which of the following are VALID SELinux (Security Enhanced Linux) security policies?

A.   httpd_enable_cgi

B.   httpd_enable_homedirs

C.   httpd_ssi_exec

D.   All of the options are valid

14: Which of the following Linux command can be used to change file owner and group ?

A.   chgowner

B.   chown

C.   chggrp

D.   chwn

15: Which of the following represents root directory?

A.   "\*"

B.   "/"

C.   "\"

D.   "*/"

16: Where hosts file (on *nix systems) is usually located?

A.   /usr/etc/hosts

B.   /etc/hosts

C.   /root/hosts

D.   /var/www/hosts

17: How can you start a session in PHP script?

A.   sessionstart()

B.   session_begin()

C.   start_ session()

D.   session_start()

18: What will be the output of command mysqladmin -u root -p drop TEST?

A.   Invalid Command

B.   It will drop TEST database

C.   It will drop TEST table

D.   It will drop TEST user

19: Which of the following Linux command can be used to change the group ownership of files ?

A.   chgrp

B.   changegrp

C.   chggrp

D.   chggroup

20: What is a superuser in mysql usually called ?

A.   admin

B.   user

C.   mysql

D.   root

21: What will this command cp file1 file2 do?

A.   Will make a copy of file1 in the root directory and call it file2

B.   Will make a copy of file1 in the current working directory and call it file2 and will delete file1

C.   Will make a copy of file1 in the root directory and call it file2 and will delete file1

D.   Will make a copy of file1 in the current working directory and call it file2

22: You do not have to specify a length with which of the following MySQL datatypes?

A.   TINYTEXT

B.   MEDIUMBLOB

C.   TINYBLOB

D.   All of the options are valid

23: What is MySQL?

A.   it's a variation of a structured query language

B.   it's a PHP interpreter

C.   it's a database server

D.   it's a programming language

24: How can you block users by IP address or by domain?

A.   using a php.ini file

B.   using a .htaccess file

C.   .htpasswd

D.   this is impossible

25: Which directive is used to determine a virtual host?

A.   <VirtHost>...</VirtHost>

B.   <VHost>...</VHost>

C.   <VirtualHost>...</VirtualHost>

D.   <NewSite>...</NewSite>

26: What is GNU Linux?

A.   programming language

B.   the nickname of Linus Torvalds

C.   operating system

D.   the name of penguin

27: What language should you use for writing a queries for database?

A.   Java

B.   PHP

C.   Python

D.   SQL

28: Are there any variations of LAMP for other platforms?

A.   yes [WAMP, WIMP (for Windows), MAMP (Mac OS), BAMP (BSD)]

B.   no

29: Which PHP extension is required for work with MySQL?

A.   php_msql

B.   php_my_sql

C.   php_db

D.   php_mysql

30: What's the name of Apache configuration file?

A.   config.ini

B.   httpd.conf

C.   https.conf

D.   config.conf

31: An alternate name for a host is…

A.   SecondServer

B.   AnotherServer

C.   AlternatePath

D.   ServerAlias

32: What is the name of a superuser in Linux?

A.   linus

B.   administrator

C.   admin

D.   root

33: The name of a web-based interface for work with databases is called…

A.   myadmin

B.   webDBadmin

C.   phpmyadmin

D.   mysqladmin

34: What is HTTP?

A.   HyperThreading Transfer Protocol

B.   nothing

C.   Home Television Transfer Protocol

D.   Hypertext Transfer Protocol

35: What's LAMP (in the most cases)?

A.   Linux + Apache+MySQL +Python

B.   Linux + ASP+MySQL +Python

C.   Linux + Apache+MySQL +PHP

D.   Linux + Apache+MySQL +Perl

36: What domain name will have the following address - 127.0.0.1?

A.   there is no name for this address

B.   localhost

C.   test

D.   home

37: Which of the following is NOT a main apache directory?

A.   conf

B.   logs

C.   htdocs

D.   apps

38: What has a higher priority: a record from the hosts file or a record from the DNS-server?

A.   a record from the hosts file

B.   nothing

C.   a record from the DNS-server

D.   both

39: What's the name of file, where user's information can be stored?

A.   config

B.   biscuit

C.   php.ini

D.   cookie

40: Directive for definition a hostname is called…

A.   ServerName

B.   Hostel

C.   NameOfTheHost

D.   Host

41: Which of the following statement tells the server to reload the grant tables?

A.   RELOAD PRIVILEGES

B.   UPDATE PRIVILEGES

C.   REFRESH PRIVILEGES

D.   FLUSH PRIVILEGES

E.   RESET PRIVILEGES

42: Which of the following is a way to restart Apache on *nix system?

A.   apache restart

B.   apache reboot

C.   httpd reboot

D.   httpd restart

43: What will be the ouput of this command: head -5 test.txt

A.   It will write the first 5 lines of test.txt to the screen

B.   It will create a new file with first 5 lines from test.txt

C.   It will create a new file with last 5 lines from test.txt

D.   It will write the last 5 lines of test.txt to the screen

44: You need to use SSL Certificates on your Apache server. Which of the directives you need to assign inside <VirtualHost> section of Apache configuration file?

A.   SSLEngine

B.   SSLCertificateFile

C.   SSLCertificateKeyFile

D.   All of these

45: What's the name of a time-based job scheduler in *nix systems?

A.   chronos

B.   crontab

C.   shell

D.   cron

46: When will a PHP session be closed?

A.   after a span of user inactivity

B.   every 15 minutes

C.   when the browser is closed

D.   when the browser is closed or after a span of user inactivity

47: What is the size limit for strings in php?

A.   100Mbytes

B.   256Kbytes

C.   There is no limit (hardware limit)

D.   1024bytes

48: Which ID always has a *nix superuser ?

A.   100

B.   10

C.   1

D.   0

49: What is SESSION in PHP?

A.   a file in the cloud

B.   a record in config file

C.   a text file

50: How to use other/additional extensions/file types for PHP scripts, instead of using just .php?

A.   edit the 'extension' directive in php.ini

B.   None of the above

C.   edit the extensions in php.ini

D.   use AddType directive in httpd.conf