In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you the "PHP commonly used compilation parameters are", the content is easy to understand, clear, hope to help you solve the doubt, the following let the editor lead you to study and learn "what are the common compilation parameters of PHP" this article.
Interpretation of parameters commonly used in compiling PHP
-- prefix=/usr/local/php # specify the php installation directory
-- with-apxs2=/usr/local/apache/bin/apxs # Integration apache,apxs function uses the LoadModule instruction in mod_so to load the specified module into apache, and requires apache to open the SO module.
-- with-config-file-path=/usr/local/php/etc # is used to specify the path to php3.ini or php4.ini
-- with-MySQL=/usr/local/mysql # mysql installation directory, support for mysql
With-mysqli=/usr/local/mysql/bin/mysql_config # mysqli extension technology can not only call MySQL stored procedures and handle MySQL transactions, but also make database access more stable.
-- with-mysql-sock=/tmp/mysql.sock # specify the mysql socket file location
-- enable-safe-mode # turns on safe mode. The default is on.
-- disable-short-tags # after configuring this option, PHP programs cannot use short tags, but must use long tags
-- with-exec-dir=DIR # PHP execution path (sometimes specify the directory in which PHP programs must be executed for the sake of system security)
-- enable-ftp # Open ftp support
-- enable-zip # turns on support for zip
-- with-bz2 # opens support for bz2 files
-- with-jpeg-dir # turns on support for jpeg images
-- with-png-dir # turns on support for png images
-- with-freetype-dir # turns on support for freetype font library
-- without-iconv # disables the iconv function and converts between various character sets
-- with-libXML-dir # Open support for libxml2 libraries
-- with-XMLrpc # Open the c language of xml-rpc
-- with-zlib-dir # Open support for zlib libraries
-- with-gd # Open support for gd libraries
-- enable-gd-native-ttf # supports TrueType string function library
-- with-curl # Open support for curl browsing tool
-- with-curlwrappers # Open the url stream using the curl tool
-- with-ttf # turn on the support of freetype1.*. You can cancel it.
-- with-xsl # opens XSLT file support, extends the libXML2 library, and requires libxslt software
-- with-gettext # opens the gettext support of gnu, which is used in the coding library
-- with-pear # opens support for pear commands, which are used by PHP extensions
-- enable-calendar # Open Calendar extension
-- enable-mbstring # multi-byte string support
-- enable-sqlite-utf8 # enables sqllite to support utf-8
-- enable-bcmath # opens image resizing and uses this module when using zabbix monitoring
-- enable-sockets # turn on sockets support
-- metadata support for enable-exif # images
-- support for enable-magic-quotes # Magic references
-- disable-rpath # closes additional runtime files
-- disable-debug # turns off debug mode
-- enable-debug # this option is generally not used unless it is useful when developing PHP programs. It can display additional error messages.
-- with-ldap=DIR # this option must be turned on if you want to use directory protocols (Lightweight Directory Access Protocol, LDAP). For details of LDAP, please refer to the RFC1777 and RFC1778 of the RFC file.
-- with-mime-magic=/usr/share/file/magic.mime # Magic header File location
-- with-apache=DIR # this option allows PHP to be used as an apache module, and the string of DIR can be / usr/local/apache or other directory where apache is installed
-- with-custom-odbc=DIR # uses a custom ODBC library. Of course, the CUSTOM_ODBC_LIBS and CFLAGS variables should be specified when using this method. For example, when using Sybase SQL Anywhere on a QNX machine, you may need to configure the system environment variables CFLAGS=-DODBC_QNX, LDFLAGS=-lunix and CUSTOM_ODBC_LIBS= "- ldblib-lodbc", and add-- with-custom-odbc=/usr/lib/sqlany50 to the PHP configuration.
-- with-oracle=DIR # uses the Oracle database The version of Oracle should be above 7. 3. You can also use the environment variable ORACLE_HOME in the PHP program to specify the path to the Oracle. For more information about Oracle, please refer to Oracle's website http://www.oracle.com.
-- with-sybase=DIR # uses the Sybase database For more information about Sybase, please refer to Sybase's website http://www.sybase.com.
-- with-sybase-ct=DIR # using Sybase-CT database
Parameters commonly used in CGI installation:
The copy code is as follows:
This parameter is not available until enable-fpm # is patched with PHP-fpm. The launcher installed in CGI mode
-- enable-fastCGI # supports launching PHP in fastcgi mode
-- enable-force-CGI-redirect # start PHP in redirect mode
-- with-ncurses # A dynamic library that supports ncurses screen rendering and graphic interaction based on text terminals
-- enable-pcntl # freeTDS needs to be used. It may only be used by linking mssql.
-- extension of with-mcrypt # mcrypt algorithm
-- extension of with-mhash # mhash algorithm
The above function libraries need to be installed
-- with-gmp # should support a specification
-- enable-inline-optimization # optimize thread
-- with-openssl # openssl support for encrypted transmissions
-- enable-dbase # set up DBA as a sharing module
-- regular library file installation location of with-pcre-dir=/usr/local/bin/pcre-config # perl
-- disable-dmalloc
-- gdbm support for with-gdbm # dba
-- enable-sigchild
-- enable-sysvsem
-- enable-sysvshm
-- enable-zend-multibyte # supports zend multibyte
-- enable-mbregex
-- enable-wddx
-- enable-shmop
-- enable-soap
Note: extensions that need to be installed separately
1. Gd library.
2. The extension of ming.
3. Extension of mhash and mcrypt
1 > once-- with-apxs2=/usr/local/apache/bin/apxs is specified, do not activate-- enable-fpm and-- enable-fastCGI,apxs load PHP in php module mode.
2 > Mysql after compiling the Mysql development library, you don't have to specify the path to the mysql.
3 > there is a basic dependency in PHP compilation. To compile PHP, you need to install the XML extension first, because the php5 core turns on XML support by default. Other basic libraries are needed accordingly:
4 > GD-> zlib, Png, Jpg. If you need to support other libraries, you still need to compile the extended library according to the actual situation. The ttf library needs the support of the freetype library.
5 >-- enable-magic-quotes is a highly deprecated parameter, and of course, if you need PHP to do the following work for you, it doesn't really solve the problem completely.
6 >-with-openssl, openssl library is required.
Mysqli is a MySQL driver provided by the MySQL team, with many practical functions and typical features. However, it is not the best choice for MySQL on the PHP platform, and PDO has proven to be a standard interface that is simple, highly concurrency, and easy to create and recycle. However, PDO also experienced the problem of memory overflow before 5.3. after 5.3.When reading Oracle's LOB resources, there will still be memory overflow if memory is not limited.
If it is a product model, such as pear, shmop, ftp, etc., it is not recommended to use it. They have a good and quick choice for what they need to do, such as using Cmax Cure codes, Java, and even other scripting languages, without being limited to using PHP to implement. Unfamiliar class libraries and uncommonly used libraries are not recommended. Magic-quote, session.auto_start, PHP server information, PHP error messages, etc., should be turned off immediately after compilation to avoid exposing server information.
For the Web Server mode corresponding to PHP, Module, fastcgi and fpm only need one, and the server is not your testing ground. Fastcgi can choose between 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 like a back-end agent. No matter what mode, in the release product server, you should do process and thread tuning, do enough performance and stress tests to find the best combination of process numbers.
It is also important to choose an extension of PHP OPCode cache. Under the core of linux 2.6 and under fcgi, xcache has good practical experience, while others have serious performance degradation after the increase in the number of concurrency. If you really want to experience it, you'd rather compile a few more PHP versions than adapt to a variety of extensions for one version of PHP, which will put you in an awkward position.
The above is all the contents of the article "what are the common compilation parameters of PHP?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.