Elance LAMP Test Answers 2015



Why LAMP?
only professionals can work with other alternatives
there are no alternative
it's flexible, productive, widespread and low cost (all components can be downloaded for free from Internet)
all servers work under Linux


What is SESSION in PHP?
a record in config file
a file in the cloud
a text file


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


Which of the following are VALID SELinux (Security Enhanced Linux) security policies?
httpd_enable_cgi
httpd_enable_homedirs
httpd_ssi_exec
All of the options are valid


Which of the following is NOT a main apache directory?
logs
conf
htdocs
apps


Which of the following represents root directory?
"\"
"/"
"\*"
"*/"


Which directive is used to determine a virtual host?
<VirtHost>...</VirtHost>
<VHost>...</VHost>
<NewSite>...</NewSite>
<VirtualHost>...</VirtualHost>


Which PHP extension is required for work with MySQL?
php_msql
php_my_sql
php_db
php_mysql


An alternate name for a host is…
AlternatePath
AnotherServer
ServerAlias
SecondServer


What is HTTP?
nothing
Home Television Transfer Protocol
HyperThreading Transfer Protocol
Hypertext Transfer Protocol


What is the name of a superuser in Linux?
admin
administrator
linus
root


The name of a web-based interface for work with databases is called…
webDBadmin
myadmin
mysqladmin
phpmyadmin


What's LAMP (in the most cases)?
Linux + ASP+MySQL +Python
Linux + Apache+MySQL +Python
Linux + Apache+MySQL +PHP
Linux + Apache+MySQL +Perl


What domain name will have the following address - 127.0.0.1?
localhost
test
there is no name for this address
home


What's the name of Apache configuration file?
config.ini
httpd.conf
https.conf
config.conf


Are there any variations of LAMP for other platforms?
yes [WAMP, WIMP (for Windows), MAMP (Mac OS), BAMP (BSD)]
no


How can you block users by IP address or by domain?
this is impossible
using a .htaccess file
using a php.ini file
.htpasswd


What language should you use for writing a queries for database?
Python
Java
PHP
SQL


What is GNU Linux?
the name of penguin
programming language
operating system
the nickname of Linus Torvalds


You do not have to specify a length with which of the following MySQL datatypes?
MEDIUMBLOB
TINYTEXT
All of the options are valid
TINYBLOB


What is a superuser in mysql usually called ?
root
admin
mysql
user


Which of the following Linux command can be used to change file owner and group ?
chggrp
chown
chwn
chgowner


What will this command cp file1 file2 do?
Will make a copy of file1 in the current working directory and call it file2 and will delete file1
Will make a copy of file1 in the root directory and call it file2 and will delete file1
Will make a copy of file1 in the root directory and call it file2
Will make a copy of file1 in the current working directory and call it file2


What is MySQL?
it's a database server
it's a variation of a structured query language
it's a programming language
it's a PHP interpreter


Where hosts file (on *nix systems) is usually located?
/usr/etc/hosts
/etc/hosts
/var/www/hosts
/root/hosts


Which of the following apache directory has all server configuration files?
htdocs
logs
conf
cgi-bin


How can you start a session in PHP script?
session_begin()
sessionstart()
session_start()
start_ session()


Which of the following is not a valid directive of Apache Control Command (apachectl)?
status
kill
stop
start


What will be the output of command mysqladmin -u root -p drop TEST?
It will drop TEST user
It will drop TEST table
Invalid Command
It will drop TEST database


Which of the following is the main Apache configuration file?
/etc/srm.conf
/etc/apache.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/config.ini


How to see information about PHP configuration from a script?
phpinfo()
phpconfig()
php_info()
php_config()


What will be the output of this command : ls list* ?
This will list all files in the current directory ending with list
This will list all files in the current directory starting with list
This will list all files in the root directory ending with list
This will list all files in the root directory starting with list


What does "." (DOT) signify in Unix?
Root Directory
Current directory
Parent Directory
It is not supported


Which of the following Linux command can be used to change the group ownership of files ?
chgrp
chggroup
changegrp
chggrp


What's the name of file, where user's information can be stored?
config
cookie
biscuit
php.ini


To quote a string within a string, which of the following can you use?
'This is the quoted" message"'
'This is the "quoted" message'
This is the "quoted" message


What does the following error "Access denied for user 'root'@'localhost' (using password: YES)" mean?
wrong password
wrong database name
wrong username
wrong password and username


Which of the following is a way to restart Apache on *nix system?
apache reboot
apache restart
httpd restart
httpd reboot


What's the name of a time-based job scheduler in *nix systems?
shell
chronos
cron
crontab


Directive for definition a hostname is called…
Host
Hostel
NameOfTheHost
ServerName


What will be the ouput of this command: head -5 test.txt
It will create a new file with first 5 lines from test.txt
It will write the last 5 lines of test.txt to the screen
It will create a new file with last 5 lines from test.txt
It will write the first 5 lines of test.txt to the screen


Which of the following Linux command outputs the available free space in local hard-disk partitions?
free
df
fdisk
du


Which of the following statement tells the server to reload the grant tables?
RELOAD PRIVILEGES
FLUSH PRIVILEGES
UPDATE PRIVILEGES
REFRESH PRIVILEGES
RESET PRIVILEGES


What port does squid listen, by default?
4322
7334
3128
2314


What is the size limit for strings in php?
There is no limit (hardware limit)
100Mbytes
256Kbytes
1024bytes


When will a PHP session be closed?
when the browser is closed
after a span of user inactivity
every 15 minutes
when the browser is closed or after a span of user inactivity


What will be the output of command mysqladmin -u root -p create TEST?
It will create a new user TEST
It will create a new database TEST
It will create a new table TEST
Invalid Command


Which ID always has a *nix superuser ?
0
10
1
100


How to use other/additional extensions/file types for PHP scripts, instead of using just .php?
use AddType directive in httpd.conf
edit the extensions in php.ini
None of the above
edit the 'extension' directive in php.ini


Which of the following is an INVALID column in user table in mysql database?
Truncate_priv
Select_priv
Delete_priv
Insert_priv


What will be the output of the following code? <? echo false; ?>
None of the above
Nothing
1
Syntax error


Which of the following Apache Control Command: apachectl directive restarts the Apache httpd daemon?
start
Both graceful and restart
restart
graceful


Which of the following command can be used to get the value of env variables?
echo
env
Both env and printenv
printenv


Are the IOT (Index Organized Tables) supported by MySQL?
the support will be added in the next (6) version
yes
no [it's the Oracle's type]


Where can you set up a server's name?
httpd.conf
php.ini
/etc/hosts


Which of the following file is a MySQL configuration file?
/etc/conf/mysql.cnf
/etc/my.cnf
/etc/mysql.cnf
/etc/conf/my.cnf


What is the year range for MySQL datatype YEAR (2)?
1970 to 2069
1099 to 2099
1900 to 2099
1969 to 2070


Which of the following is TRUE about Inetd?
UNIX handles many of its services through the internet daemon (inetd), as opposed to a constantly running daemon
Inetd is a super server that listens to the various ports and handles connection requests as it receives them
(neither is correct)
(both are correct)


One advantage of hard links over symbolic links is:
A hard link can span different filesystems
You can determine the inode used by a hard link, but not for a symbolic link
A hard link allows you to change the permissions on the underlying file
A hard link does not become disconnected from the underlying file if the file is moved


In which tcp_wrappers file can you specify all connections from all hosts?
/etc/hosts.deny
/etc/tcp.conf
/etc/hosts
/etc/hosts.allow


The command "service httpd ______" allows users to check the syntax of Apache's configuration files.
configchk
chkconfig
configtest
testconfig


Which of the following is not a VALID MySQL datatype?
DATE
DOUBLE
STRING
DATETIME


The SELinux (Security Enhanced Linux) security policies are enabled/disabled through which file?
/etc/selinux/conf.d
/etc/selinux/conf/httpd.conf
/etc/selinux/httpd.conf
/etc/selinux/config


What will happen if AUTO INCREMENT field reaches its maximum value?
error message will appear
None of the above
everything will start again from 1
everything will start again from 0


Who clears a session files on server?
garbage cleaner daemon
Apache
no one
PHP [Garbage Collector]


What is the output of the command "service httpd configtest" if no errors are found in Apache's configuration file?
Syntax OK
*.conf files OK
configtest OK
Config OK


Which of the following command can be used to shutdown an already running MySQL server?
./mysqladmin -u root -p kill
./mysqld -u root -p shutdown
./mysqladmin -u root -p shutdown
./safe_mysqld -u root -p shutdown


Which of the following Linux command outputs the processor architecture ?
procarch
info
arch
proc


Which of the following Linux command can be used to output the shared library dependencies ?
ldd
libdd
ld
libd


Which of the following is NOT a valid unix env variable?
ARCH
HOME
USR
HOST


What output will be If you try to perform an arithmetic operation on a column containing NULL values?
None of the above
0
Cannot be determined
An error will be generated


Which of the following commands can be used for setting attributes on files/folders?
setattr
attr
chmod
chattr


The default PHP session lifetime is…
30 min
24 min
there is no lifetime
60 min


Which of the following commands will match commands with keyword(s) on their main pages?
head
whatis
man
apropos


At login which of the following is first read by C shell?
.profile
.cshrc
Both .cshrc and .login
.login


Which of the following commands can be used to set stick bit on a file?
chmod 2644 file
chmod 1645 file
chmod 1455 file
set 466 file


Which of the following holds environment variables used when starting Apache?
/etc/httpd/conf/httpd.conf
/etc/sysconfig/httpd
/etc/httpd/conf.d
/etc/httpd/conf.d/application.conf


What is the maximum allowable length of MySQL datatype VARCHAR?
There is no limit
256
1000
2000


What is the precision limit for MySQL datatype DOUBLE?
62
53
54
59