A senior PHP programmer interviewing 30 topics in Beijing

Source: Internet
Author: User

1. Where is the SESSION saved on the server?
2. How does the server access the client's cookie?
3, how to realize the session sharing, the principle of sharing?
4, please roughly tell the process of LVS building, the principle of file sharing is what?
5, network share server upload data is to a server upload? Or is it more than one? How do I synchronize?
6. Say what you know about the database design paradigm? What are the common modeling tools? (MySQL modeling tool)
7. If you are a project manager, how do you manage the daily affairs of your project team?
8, the master-slave database configuration, what are the basic requirements, what needs to be configured content?
9, say your common version controller, SVN need to configure which several configuration files
10, LVS in the project before the operation of the need to pay attention to what matters, or what problems will arise?
11, Ecshop Why the field redundancy violation design mode, please say why do this?
12, common MySQL optimization mode, as much as possible to say?
13. What is the principle of memcache? Can I deposit the value of 2M?
14. What is a queue? Myisam lock, how to solve the deadlock?
15. Please name MySQL common storage engine? What are the characteristics of memory storage engine?
16. How to insert more than 5,000 data in the quickest way?
17. How many open source frameworks have you used?
18. Where is the Ecshop shopping cart information stored?
19, the principle of PHP generated page cache

20. What do you know about caching technology, and do a brief introduction to it separately

------------------------------------------------------------------------------------------------

1. Where is the SESSION saved on the server?
A: Specified by php.ini, can exist in the file of the specified directory or in memory, or in the database!

2. How does the server access the client's cookie?
A: The server can fetch the cookie of the header information and set back each time the request is processed.

3, how to realize the session sharing, the principle of sharing?
A: Configure the master-slave database, the session into the main database, the common practice is to install MEMCAHCE on each server side, the session into the Memcache,

4, please roughly tell the process of LVS building, the principle of file sharing is what?
5, network share server upload data is to a server upload? Or is it more than one? How do I synchronize?

6. Say what you know about the database design paradigm? What are the common modeling tools? (MySQL modeling tool)
Answer: 1NF: Each to meet the atomic nature, can not be divided; 2NF: Each record to meet uniqueness, 3NF: field is not redundant, sometimes we also need anti-three paradigms, commonly used modeling tools: Phpmyadmin,navicat for mysql,dos command line;

7. If you are a project manager, how do you manage the daily affairs of your project team?

8, the master-slave database configuration, what are the basic requirements, what needs to be configured content?
A: Basic conditions: More than two database servers,
Configuration process: 1. Open the Bin-log of the master-slave server respectively; +relaylog from server
2. Establish the corresponding account and authorization on the main server according to the requirement;
3. Use your created account from the server to connect to the master server to read the binaries and analyze the post-sync
Configuration items: Master: log-bin=mysql-bin;server-id=num (int); binlog-format=mixd/statement/row/
From: log_bin=mysql-bin;server-id=num (int)//unique; relay_log=mysql-relay-bin;log_slave_updates=1;relay_only=1;

9, say your common version controller, SVN need to configure which several configuration files
A: Svn,git,cvs; config file: mod_authz_svn.so mod_dav_svn.so move to server module and load, configure permissions, assign users;

10, LVS in the project before the operation of the need to pay attention to what matters, or what problems will arise?

11, Ecshop Why the field redundancy violation design mode, please say why do this?
A: In some circumstances the anti-three paradigm increases efficiency, so do it!

12, common MySQL optimization mode, as much as possible to say?
Answer: SQL statement optimization; storage optimization; database configuration; server configuration

13. What is the principle of memcache? Can I deposit the value of 2M?
A: Using C/s mode, the semantic is normal text, based on libevent mechanism processing data in memory; Memcache can only be stored in 1MB of data, memcache is not for storing big data, but consider to compress or split the values into multiple keys before storing them!

14. What is a queue? Myisam lock, how to solve the deadlock?
A: MyISAM is a table-level lock by default, so multiple actions that operate a single table can only be done in a queue;
Exclusive lock and write lock, in the process of SQL execution to exclude other requests and write locks, after the completion of the implementation will be automatically released;
Deadlock resolution: Find the thread number of the deadlock first, and then kill the thread ID

15. Please name MySQL common storage engine? What are the characteristics of memory storage engine?
A: Myisam, InnoDB, Memory,memory is characterized by the storage of the table in memory, several fast, restart data loss!


16. How to insert more than 5,000 data in the quickest way?

A: Mister into a data file, in the SQL statement to import


17. How many open source frameworks have you used?
Answer: Tp/ci/zf/yii


18. Where is the Ecshop shopping cart information stored?
Answer: order_info;order_goods;order_action;

19, the principle of PHP generated page cache
A: Put the cached content in the OB cache, put it into the program cache and return after the OB cache has finished or the script has finished executing!

20. What do you know about caching technology, and do a brief introduction to it separately
A: OB cache, through the template technology to write to the file class cache; The most significant difference between Memcache;redis;redis and memcache is that the data is not only in memory but also in the disk, and even if it is restarted, the data can be loaded;

21, the principle of the HTTP protocol, what is full duplex, what is half-duplex?
A: The HTTP protocol is a stateless, straightforward is the request and response, full-duplex refers to the request and response at the same time, half-duplex refers to a single execution;

22, Ucenter communication principle?

A: It is an app login, and then the background polling sent to the sync login application callback file, callback file received the user ID, generate a cookie or session and then enter the login mode.

23, the principle of memcached

A: memcached is a daemon running on one or more servers, waiting for a connection operation from the receiving client, and the client can be written in various languages (for example, PHP). PHP and other clients after establishing a connection with the Memcached service, the next thing is to access the object, each access to the object has a unique identifier key, access operations are through this key, the object saved to memcached is actually placed in memory, is not saved in the cache file, which is why memcached can be so efficient and fast.

24. How many kinds of JS frames have you used? Illustrate advantages and disadvantages
Answer: JQuery, prototype, Dojo, ext, YUI;
JQuery: Powerful DOM node query no one can out of its left and right, animation is easy to do, the DOM package is very good! High and low version compatibility very good
Prototype: Earlier JS library, good AJAX support, based on the prototype chain object-oriented is very powerful
Dojo: more easily minamata Web pages have dynamic capabilities;
Ext: Strong UI operation topped the top;
YUI: Powerful class library, provide many methods;

25, how to measure the use of Ajax (when using AJAX)
A: Ajax is called No refresh technology, commonly seen in the use of the scene: Form validation, user ratings, clicks, as long as the need for real-time interaction with the server can be used;
26, what is the push technology, the realization principle is what?
A: Push technology is also known as Comet, that is, in the customer request when the server hangs a long connection, once the server has new data, it immediately reverse back to the client, real-time good;

27, what is the vertical search, sphinx the principle of the word?
A: Vertical search refers to the context in which a search is made within a specific scope, and the search polygons are more refined rather than more extensive; the principle of Sphinx participle: splitting text into multiple words create an index from each document of the data source and store the index table in memory!

28, Sphinx can not ha_sphinx.so is used to do what?
Answer: a Sphinx storage module;

29. How do you use PHP to merge arrays?
Answer: array_mergn;array_mergn_recursive;

30, answer PHP to read files faster, or read MySQL data fast? Why?
A: Generally read the document read the database; the speed of different situations will be reversed, such as: Database data volume is very small, and the same directory file is very many cases, read the database is larger than the read file;

A senior PHP programmer interviewing 30 topics in Beijing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.