Lines Matching refs:to

22           + Introduction to PECL Installations
37 + How to change configuration settings
52 Before starting the installation, first you need to know what do you
53 want to use PHP for. There are three main fields you can use PHP, as
63 You may also rent webspace at a company. This way, you don't need to
64 set up anything on your own, only write your PHP scripts, upload it to
68 choices for the method of connecting PHP to the server. For many
74 FastCGI processor. This means you set up your server to use the CGI
75 executable of PHP to process all PHP file requests on the server.
77 If you are also interested to use PHP for command line scripting (e.g.
79 text files depending on some arguments you pass to them), you always
88 site dedicated to this extension. PHP-GTK is not included in the
97 » http://www.php.net/downloads.php. We recommend you to choose a
98 » mirror nearest to you for downloading the distributions.
117 installation of PHP on Unix systems. Be sure to investigate any
118 sections specific to your platform or web server before you begin the
126 There are several ways to install PHP for the Unix platform, either
131 configuration, but if you need to have a different set of features
133 to build PHP and/or your web server. If you are unfamiliar with
134 building and compiling your own software, it is worth checking to see
139 * Basic Unix skills (being able to operate "make" and a C compiler)
161 When PHP is configured, you are ready to build the module and/or
168 This section contains notes and hints specific to Apache installs of
172 You can select arguments to add to the configure on line 10 below from
175 have been omitted here, to ensure the instructions are not incorrect.
176 You will need to replace the 'xxx' here with the correct values from
195 path to apxs may differ from our example.
202 If you decide to change your configure options after installation,
203 you only need to repeat the last three steps. You only need to
204 restart apache for the new module to take effect. A recompile of
214 You may edit your .ini file to set PHP options. If you prefer your
218 If you instead choose php.ini-production, be certain to read the list
221 14. Edit your httpd.conf to load the PHP module. The path on the right hand
222 side of the LoadModule statement must point to the path of the PHP
224 added this for you, but be sure to check.
233 16. Tell Apache to parse certain extensions as PHP. For example,
236 each separated by a space. We'll add .phtml to demonstrate.
240 It's also common to setup the .phps extension to show highlighted PHP
246 stop and restart the server, not just cause the server to reload by
249 Alternatively, to install PHP as a static object:
268 stage. It isn't supposed to. It will be created.)
271 (you should now have an httpd binary which you can copy to your Apache bin d
273 it is your first install then you need to "make install" as well)
278 15. You can edit /usr/local/lib/php.ini file to set PHP options.
283 possible ways to stop and restart the server. Below are some typical
285 installations. You should replace /path/to/ with the path to these
293 /path/to/apachectl stop
294 /path/to/apachectl start
296 3. httpdctl and httpsdctl (Using OpenSSL), similar to apachectl:
297 /path/to/httpsdctl stop
298 /path/to/httpsdctl start
300 4. Using mod_ssl, or another SSL server, you may want to manually
302 /path/to/apachectl stop
303 /path/to/apachectl startssl
323 ./configure --with-apache=/path/to/apache_source --with-pgsql
334 ./configure --with-apache=/path/to/apache_source --with-pgsql=shared
340 When choosing to build PHP in different ways, you should consider the
342 will mean that you can compile apache separately, and don't have to
343 recompile everything as you add to, or change, PHP. Building PHP into
355 Unless you change that to "Group nogroup" or something like that
356 ("Group daemon" is also very common) PHP will not be able to open
362 --with-apxs=/path/to/apxs . You must NOT use the apxs version that
370 This section contains notes and hints specific to Apache 2.x installs
385 mentioned places. This quick guide covers only the basics to get
387 Documentation. The version numbers have been omitted here, to ensure
394 available to you. However, the instructions here will work for either
418 and stop the server to go on with the configuration for PHP:
427 some other way, you'll need to adjust the path to apxs accordingly.
428 Note that some distros may rename apxs to apxs2.
434 If you decide to change your configure options after installation,
435 you'll need to re-run the configure, make, and make install steps.
436 You only need to restart apache for the new module to take effect.
444 You may edit your .ini file to set PHP options. If you prefer
447 If you instead choose php.ini-production, be certain to read the
449 7. Edit your httpd.conf to load the PHP module. The path on the right
450 hand side of the LoadModule statement must point to the path of the
452 already added this for you, but be sure to check.
454 8. Tell Apache to parse certain extensions as PHP. For example, let's
456 Apache AddType directive, we want to avoid potentially dangerous
459 extension(s) parse as PHP by simply adding them. We'll add .php to
464 Or, if we wanted to allow .php, .php2, .php3, .php4, .php5, .php6,
465 and .phtml files to be executed as PHP, but nothing else, we'd use
470 And to allow .phps files to be handled by the php source filter,
475 mod_rewrite may be used To allow any arbitrary .php file to be
476 displayed as syntax-highlighted source code, without having to
477 rename or copy it to a .phps file:
496 adding the following option to the argument passed to ./configure, in
514 all extensions will be available. The recommended setup is to build
521 This section contains notes and hints specific to Lighttpd 1.4 installs
524 Please use the » Lighttpd trac to learn how to install Lighttpd
527 Fastcgi is the preferred SAPI to connect PHP and Lighttpd. Fastcgi is
535 To configure Lighttpd to connect to php and spawn fastcgi processes,
536 edit lighttpd.conf. Sockets are preferred to connect to fastcgi
556 The bin-path directive allows lighttpd to spawn fastcgi processes
557 dynamically. PHP will spawn children according to the PHP_FCGI_CHILDREN
564 set to something greater than 1, the total number of php responders
570 Lighttpd provides a program called spawn-fcgi to ease the process of
575 It is possible to spawn processes without spawn-fcgi, though a bit of
577 var controls how many children PHP will spawn to handle incoming
579 requests) each child will live. Here's a simple bash script to help
591 # Binding to an address
593 # Binding to a domain socket
606 Connecting to remote FCGI instances
609 to scale applications.
611 Example #3 Connecting to remote php-fastcgi instances
621 This section contains notes and hints specific to Sun Java System Web
625 From PHP 4.3.3 on you can use PHP scripts with the NSAPI module to
654 available to your system export PATH.
655 3. gunzip php-x.x.x.tar.gz (if you have a .gz dist, otherwise go to
658 5. Change to your extracted PHP directory: cd ../php-x.x.x
660 your netscape server is installed. Otherwise, change to the correct
668 file, you may need to perform some additional configuration steps.
672 Firstly you may need to add some paths to the LD_LIBRARY_PATH
673 environment for the server to find all the shared libs. This can best
675 located in: /path/to/server/https-servername/start. You may also need
676 to edit the configuration files that are located in:
677 /path/to/server/https-servername/config/.
678 1. Add the following line to mime.types (you can do that by the
688 Init fn="php4_init" LateInit="yes" errorString="Failed to initialize PHP!" [php_
689 ini="/path/to/php.ini"]
709 docroot="/path/to/docroot" specific to the context php4_execute is
713 4. This is only needed if you want to configure a directory that only
722 get executed as PHP. This is nice to hide PHP usage by renaming
723 files to .html.
727 the following line to your default object:
736 <Object ppath="d:\path\to\authenticated\dir\*">
744 recommended to raise it with the Admin Server (in the section
752 server itself) and this space has only one environment. If you want to
754 way to try this in the old PHP way with getenv() or a similar way
755 (register globals to environment, $_ENV). You would only get the
764 wanted to start, as a CGI script (a CGI script inside of the admin
771 Simply change your scripts to get CGI variables in the correct way for
781 You can use PHP to generate the error pages for "404 Not Found" or
782 similar. Add the following line to the object in obj.conf for every
783 error page you want to overwrite:
784 Error fn="php4_execute" code=XXX script="/path/to/script.php" [inikey=value inik
788 directives which could interfere with yours. If you want to place a
792 Another possibility is to generate self-made directory listings. Just
796 Service fn="php4_execute" type="magnus-internal/directory" script="/path/to/scri
806 virtual()) to make subrequests on the web server and insert the result
823 performance reasons. However, the CGI version enables users to run
827 A server deployed in CGI mode is open to several possible
828 vulnerabilities. Please read our CGI security section to learn how to
834 typing make test. It is always a good idea to test your build. This way
836 having to struggle with it later.
853 This section contains notes and hints specific to installing PHP on
871 This section contains notes and hints specific to installing PHP on
876 Using binary packages to install PHP on OpenBSD is the recommended and
882 The main package you need to install is php4-core-4.3.8.tgz, which
885 php4-imap-4.3.8.tgz. You need to use the phpxs command to activate and
913 PHP modules. If you find you do not want to create some of these
914 modules, use the no_* FLAVOR. For example, to skip building the imap
915 module, set the FLAVOR to no_imap.
920 will restrict PHP scripts to accessing files under /var/www. You
921 will therefore need to create a /var/www/tmp directory for PHP
922 session files to be stored, or use an alternative session backend.
923 In addition, database sockets need to be placed inside the jail or
926 will need to be moved into /var/www/etc. The OpenBSD PEAR package
930 * The OpenBSD 3.6 package for the » gd extension requires XFree86 to
931 be installed. If you do not wish to use some of the font features
937 Older releases of OpenBSD used the FLAVORS system to compile up a
938 statically linked PHP. Since it is hard to generate binary packages
948 This section contains notes and hints specific to installing PHP on
969 * flex (up to PHP 5.2)
976 In addition, you will need to install (and possibly compile) any
977 additional software specific to your configuration, such as Oracle or
982 You can simplify the Solaris install process by using pkgadd to install
991 This section contains notes and hints specific to installing PHP on
996 should be reported to the Debian team unless they can be reproduced
999 While the instructions for building PHP on Unix apply to Debian as
1007 libapache2-mod-php5 to integrate with Apache 2, and php-pear for PEAR.
1009 Second, before installing a package, it's wise to ensure the package
1010 list is up to date. Typically, this is done by running the command
1039 for example to install MySQL and cURL:
1044 APT will automatically add the appropriate lines to the different
1047 entries similar to extension=foo.so. However, restarting the web server
1053 likely that PHP was not added to the web server's configuration
1075 This section contains notes and hints specific to installing PHP on Mac
1076 OS X. PHP is bundled with Macs, and compiling is similar to the Unix
1084 need to have a different set of features (such as a secure server, or a
1085 different database driver), you may need to build PHP and/or your web
1090 The following resources offer easy to install packages and precompiled
1108 up a local development environment. It's highly recommended to always
1109 upgrade PHP to the newest version. Like most live software, newer
1110 versions are created to fix bugs and add features and PHP being is no
1113 beginner with details provided for getting a default setup to work. All
1114 users are encouraged to compile, or install a new packaged version.
1123 Finder or Spotlight to find this file may prove difficult as by
1126 Note: One way to open this is by using a Unix based text editor in
1128 root we'll use the sudo command to open it (as root) so for example
1134 Note: Versions of Mac OS X prior to 10.5 were bundled with older
1138 look similar to the following (these two lines are often not
1148 Due to the following statement already existing in httpd.conf (as
1156 # Since most users will want index.php to work we
1166 5's to 4's.
1172 location on Mac OS X is /usr/local/php/php.ini and a call to
1178 server so the PHP files will parse as PHP before outputting them to
1180 but this can be set to anything in httpd.conf. Alternatively, the
1197 line section of the PHP manual, and execute php -v to check the PHP
1198 version of this PHP binary. A call to phpinfo() will also reveal this
1205 Use the Unix installation guide to compile PHP on Mac OS X.
1214 * Introduction to PECL Installations
1223 Introduction to PECL Installations
1225 » PECL is a repository of PHP extensions that are made available to you
1227 to demonstrate how to obtain and install PECL extensions.
1229 These instructions assume /your/phpsrcdir/ is the path to the PHP
1233 for the pear command also applies to the pecl command.
1237 how to build and install the extensions, but they do not automatically
1241 When building PHP modules, it's important to have known-good versions
1267 Windows binaries for PECL extensions. However, to compile PHP under
1274 On Windows, you have two ways to load a PHP extension: either compile
1278 To load an extension, you need to have it available as a ".dll" file on
1282 To compile an extension into PHP, please refer to building from source
1285 To compile a standalone extension (aka a DLL file), please refer to
1287 neither with your PHP distribution nor in PECL, you may have to compile
1290 Where to find an extension?
1296 PHP ships with the extensions most useful to the majority of
1300 you may still be able to find one in PECL. The PHP Extension Community
1305 If you have developed an extension for your own uses, you might want to
1308 chance to give you feedback, (hopefully) thanks, bug reports and even
1312 Which extension to download?
1332 drive:\\path\to\php\executable\php.exe -i
1336 The most common way to load a PHP extension is to include it in your
1338 already present in your php.ini and that you only need to remove the
1339 semicolon to activate them.
1358 logs to learn where the problem comes from.
1365 documentation to locate the logs, as it does not have anything to do
1380 PECL makes it easy to create shared PHP extensions. Using the » pecl
1402 is required for the changes to be picked up.
1410 you want to install is not available as a PECL compatible package, such
1411 as unreleased extensions from SVN. If you need to build such an
1412 extension, you can use the lower-level build tools to perform the build
1415 The phpize command is used to prepare the build environment for a PHP
1426 PHP extensions directory. You'll need to and adjust php.ini and add an
1430 (like RPM's) are used, be sure to also install the appropriate devel
1432 along with the appropriate header files to build PHP and its
1435 Execute phpize --help to display additional usage information.
1445 you may specify for which installation you'd like to build by using the
1475 --php-binary Full path to php CLI or CGI binary
1477 --configure-options Configure options to recreate configuration of
1486 You might find that you need to build a PECL extension statically into
1487 your PHP binary. To do this, you'll need to place the extension source
1488 under the php-src/ext/ directory and tell the PHP build system to
1500 From here, force PHP to rebuild the configure script, and then build
1543 may be able to help you. You should check out the archive first, in
1546 » http://www.php.net/support.php. To subscribe to the PHP installation
1547 mailing list, send an empty mail to
1551 If you want to get help on the mailing list, please try to be precise
1554 CGI or a server module, safe mode, etc.), and preferably enough code to
1555 make others able to reproduce and test your problem.
1566 suitable to submit feature requests.
1568 Read the » How to report a bug document before submitting any bug
1581 * How to change configuration settings
1619 The Apache web server changes the directory to root at startup,
1620 causing PHP to attempt to read php.ini from the root filesystem if
1634 ; Boolean values can be set to either:
1646 Since PHP 5.1.0, it is possible to refer to existing .ini variables
1660 In addition to the main php.ini file, PHP scans for INI files in each
1662 working its way up to the current document root (as set in
1673 directory; if set to an empty string, PHP doesn't scan at all. The
1684 set, and each directive within the manual refers to one of these modes.
1705 How to change configuration settings
1712 Options" or "AllowOverride All" privileges to do so.
1714 There are several Apache directives that allow you to change the PHP
1724 Note: Don't use php_value to set boolean values. php_flag (see
1728 Used to set a boolean configuration directive. Can be used only
1738 Used to set a boolean configuration directive. This can not be
1755 you can not use PHP constants such as E_ALL or E_NOTICE to set the
1757 evaluate to 0. Use the associated bitmask values instead. These
1765 Values, in the sub-keys corresponding to the path names. For example,
1775 Other interfaces to PHP
1792 This section holds common questions about the way to install PHP. PHP
1807 6. Unix/Windows: I have installed PHP, but when I try to access a PHP
1809 7. Unix/Windows: I have installed PHP, but when try to access a PHP
1812 when I try to start Apache I get undefined symbol errors:
1816 9. Windows: I have installed PHP, but when I try to access a PHP
1821 PHP and IIS to work together!
1827 13. How do I add my PHP directory to the PATH on Windows?
1828 14. How do I make the php.ini file available to PHP on windows?
1829 15. Is it possible to use Apache content negotiation (MultiViews
1831 16. Is PHP limited to process GET and POST request methods only?
1835 PHP is glue. It is the glue used to build cool web applications
1838 to learn language interface. The flexibility and power of PHP
1841 working 3rd-party libraries to glue together. When any of these
1842 stop working PHP needs ways to identify the problems and fix
1846 each request to play in, further weaknesses are introduced into
1849 If you want to use a threaded MPM, look at a FastCGI
1854 <install-path>/lib. Most people will want to change this at
1861 distribution to /etc/php.ini and edit it to make any local
1878 is core-dumping. Look in your server error log to see if this is
1879 the case, and then try to reproduce the problem with a small
1880 test case. If you know how to use 'gdb', it is very helpful when
1881 you can provide a backtrace with your bug report to help the
1888 + > run -X -f /path/to/httpd.conf
1890 + > run -X -f /path/to/httpd.conf
1895 should be submitted to » http://bugs.php.net/
1906 you need to uncomment or add some or all of the following lines
1922 ... to the global properties, or to the properties of the
1923 VirtualDomain you want to have PHP support added to.
1933 Unix/Windows: I have installed PHP, but when I try to access a PHP
1937 that the web server did not send the script to PHP for
1942 Unix/Windows: I have installed PHP, but when try to access a PHP script
1944 Something went wrong when the server tried to run PHP. To get to
1945 see a sensible error message, from the command line, change to
1948 error message will be displayed which will give you a clue as to
1949 what needs to be done next. If you get a screen full of HTML
1951 working, and your problem may be related to your server
1955 try to start Apache I get undefined symbol errors:
1962 This has actually nothing to do with PHP, but with the MySQL
1966 Windows: I have installed PHP, but when I try to access a PHP script
1974 This error message means that PHP failed to output anything at
1975 all. To get to see a sensible error message, from the command
1976 line, change to the directory containing the PHP executable
1979 will give you a clue as to what needs to be done next. If you
1988 php.ini or any PHP extensions you are trying to load are such
1992 think it is relative to your web root directory). Note that
2002 and IIS to work together!
2003 Make sure any user who needs to run a PHP script has the rights
2004 to run php.exe! IIS uses an anonymous user which is added at the
2005 time IIS is installed. This user needs rights to php.exe. Also,
2006 any authenticated user will also need rights to execute php.exe.
2007 And for IIS4 you need to tell it that PHP is a script engine.
2008 Also, you will want to read this faq.
2013 You must set the cgi.force_redirect directive to 0. It defaults
2014 to 1 so be sure the directive isn't commented out (with a ;).
2023 To be sure your php.ini is being read by PHP, make a call to
2032 then be sure to restart your web server after making changes to
2037 How do I add my PHP directory to the PATH on Windows?
2040 + Go to Control Panel and open the System icon (Start ->
2043 + Go to the Advanced tab
2046 + Find the Path entry (you may need to scroll to find it)
2052 On Windows 98/Me you need to edit the autoexec.bat file:
2057 and add: ;C:\php to the end of the line
2060 Note: Be sure to reboot after following the steps above to ensure
2063 The PHP manual used to promote the copying of files into the
2069 How do I make the php.ini file available to PHP on windows?
2076 + Go to Control Panel and open the System icon (Start ->
2079 + Go to the Advanced tab
2087 On Windows 98/Me you need to edit the autoexec.bat file:
2091 + Add a new line to the end of the file: set PHPRC=C:\php
2098 Is it possible to use Apache content negotiation (MultiViews option)
2100 If links to PHP files include extension, everything works
2101 perfect. This FAQ is only for the case when links to PHP files
2102 don't include extension and you want to use content negotiation
2103 to choose PHP files from URL with no extension. In this case,
2112 Is PHP limited to process GET and POST request methods only?
2113 No, it is possible to handle any request method, e.g. CONNECT.