Priti's Technical Corner

January 30, 2009

PHP Interview Questions

Filed under: PHP — Tags: , , , , , — pritisolanki @ 2:47 pm

Question 1: CLI command to find the version of php.
Answer 1: php -v

Question 2: CLI command to show the configuration information for the given extension
Answer 2: php -ri date //date is the extension

Question 3:what is argv,argc  variable?
Answer 3: argv and argc are command line variable. argv is array of command line parameter where as argc is the total count of variable.

Question 4:  Can we run exec() function when PHP run in safe mode?
Answer 4: No

Question 5: what is safe_mode in php?
Answer 5:  safe_mode in PHP is used to solve problem related to shared server security issues.

Question 6: If PHP is running as cgi module can you use HTTP Authentication?
Answer  6: No, The HTTP Authentication hooks in PHP are only available when it is running as an Apache module.


January 20, 2009

Mysql Questions

Question 1:Which SQL modes are composite modes (have more than one value)?
Answer 1:ANSI

Question 2:How to connect to mysql via command line.
Answer 2:
mysql -uroot -ppassword  Or
mysql –user=root –password=password

Question 3: How to connect to database on different computer
Answer 3:
mysql -u<account> -p<password> -h<computer> Or
mysql –user=root –password=secret –host=comp_name

Question 4:What is SQL mode?
Answer 4:The SQL mode affects behaviors such as identifier quoting and handling of invalid values during data entry.
Question 5:How to find version of mysql?
Answer 5:select VERSION();

Question 6:List all database in mysql

Question 7:what is mysqld?
Answer 7:mysqld is MYSQL server deamon.

Question 8: what is difference between BLOB and TEXT datatype?
Answer 8:
BLOB is Binary large object and column assigned as BLOB will be treated as binary strings.
BLOB columns have no character set and sorting/comparison are based on the numeric values
of the bytes in column values.

TEXT columns are treated as non-binary strings.Text columns have character set and values are sorted/compared based on the collation of
the character set.

Older Posts »

Blog at

%d bloggers like this: