556Part IIIAdvanced Features and TechniquesIn fact, the truth (Top ten web hosting)

556Part IIIAdvanced Features and TechniquesIn fact, the truth is that the PHP build for Windows (the so-called manual installation, not theinstaller version) now offers almost all the functionality of Unix builds with much less effort. Windows users only need to worry about the variables that can be set with the php.inifile not all of which are applicable to Windows versions of PHP anyway. If you only use PHPon Windows, feel free to skip down to the The php.ini file section of this chapter, with aglance at the Apache configuration files section if you run on Apache. Unix users have a more specific palette of options. To take full advantage of this power, youneed to clearly understand the various means by which you can analyze and control yourPHP installation. The three most important on the Unix side are: .Compile-time options .Web-server configuration files .The php.inifileA few things can also be controlled with runtime options, system settings, or the presence/ absence/configuration of other software packages. Compile-time optionsDuring the configure/make process, PHP allows you to specify a number of specific flags. Thiscauses the appropriate extensions to be built into your custom version of the PHP module orbinary. None of the information in this section is relevant if you are running a precompiledbinary (for example, Windows, Mac OS X, or rpm build). It s important to understand that most compile-time options are merely necessary precondi- tions for using a particular function set but that this capability can still be turned on or off, or important configuration options set, in the php.inifile. The compilation step and the con- figuration file work together. Think of it this way: You must compile with the flag to use thefunctionality, but you needn t use the functionality just because you compiled with the flag. If you fail to employ the appropriate compile-time option, you get an undefined-functionfatal error. This error is almost never seen outside of user-defined functions for any other rea- son, so it should be considered a red flashing light that you need to check your compilationoptions. Thankfully, you can retrieve your previous options with phpinfo()and then simplyadd the new features you want, should a recompile ever be necessary. Most compile-time options are pretty self-explanatory. You merely install the required libraries, build PHP with the –with-[library][=DIR]flag and, in some cases, set a configurationoption in php.ini. In the following sections, we will mention only common cases that requirespecial treatment of some kind. Remember that all third-party servers and libraries that you plan to use with PHP must bedownloaded and installed beforeyou attempt to build PHP. This means the Web server, adatabase server, mail and LDAP servers, XML, encryption, graphics, and bcmathlibrariesmust all be in place before PHP. –with-apache[=DIR] or –with-apache2=[DIR] This flag causes PHP to be built as a static Apache module. You must use –with-apache2if you ve ventured into the newest Apache series. Even though the Apache module version isnow by far the most popular build, the PHP developers have chosen to leave the CGI build asTipTip34
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision servlet hosting services

Leave a Reply