./configure --enable-curl
./configure --with-curl
1. What is the difference between enable and with parameter commands?
2. How to compile the extension into php instead of existing in the form of .so dynamic extension?
3. Which extensions are officially supported by PHP? Are the ones in the ext directory of the PHP source code package officially supported by PHP? Can it be compiled into php?
4. What command is used to compile the officially supported extensions into php?
What should I do if I need to configure memcached extension? I already know how to add modules specifically. What I want to know now is whether I can add them directly when compiling php? Will it automatically download the required third-party installation package for me?
If I need to support laravel5.5, how do I need to compile php when I install php?
Specify the php installation directory
Integrate apache. The function of apxs is to use the LoadModule instruction in mod_so to load the specified module into apache and require apache to open the SO module
Specify php.ini location
mysql installation directory, support for mysql
Mysqli extension technology can not only call MySQL stored procedures and process MySQL transactions, but also make accessing the database more stable.
Turn on safe mode
Turn on ftp support
Turn on support for zip
Turn on support for bz2 files
Turn on support for jpeg images
Parameters only used for CGI installation
Extensions to mhash and mcrypt algorithms
--with-mhash | Algorithm
After Mysql compiles the Mysql development library, you don’t need to specify the path to mysql.
PHP compilation has basic dependencies. To compile PHP, you first need to install the XML extension, because the php5 core has XML support turned on by default. Other basic libraries require the following:
GD -> zlib, Png, Jpg, if you need to support others, you still need to compile the extension library according to the actual situation. The ttf library needs the support of the freetype library.
--enable-magic-quotes is an extremely not recommended parameter. Of course, if you need PHP to do the underlying work for you, it actually does not solve the problem very thoroughly.
--with-openssl, requires openssl library.
mysqli is a MySQL driver provided by the MySQL team and has many practical functions and typical features. However, it is not the best choice for MySQL on the PHP platform. PDO has been proven to be a simple, high-concurrency, and easy-to-create and recycle standard interface. However, PDO also experienced memory overflow problems before 5.3. After 5.3, when reading Oracle's LOB resources, if the memory is not restricted, memory overflow will still occur.
If it is product mode, it is not recommended to use pear, shmop, ftp, etc. What they want to do is using C/C++, Java, or even other scripting languages. There are good and fast options, no need to be limited to Use PHP to implement it. Unfamiliar class libraries and libraries that are not commonly used are not recommended. Magic-quote, session.auto_start, PHP server information, PHP error information, etc. should be closed as soon as possible after compilation is completed to avoid exposing server information.
The Web Server mode corresponding to PHP only requires one of Module, fastcgi, and fpm. The server is not your experimental field. Fastcgi can choose Nginx and lighttpd. In fact, Nginx also uses lighttpd's spwan-fcgi for fcgi process management. fpm uses PHP itself to manage multiple processes, somewhat similar to a back-end proxy. Regardless of the mode, when releasing a product server, process and thread tuning should be done, and enough stress testing should be done to find the best combination of process numbers.
Choose a PHP OPCode cache extension. This is also very important. Under Linux 2.6 core and fcgi, xcache has good practical experience. Others will have serious performance degradation after the number of concurrency increases.
If you really want to experience it, you would rather compile several PHP versions than collect various extensions for one version of PHP to adapt to various environments. This will put yourself in a dilemma