* [gentoo-commits] proj/php:master commit in: docs/
@ 2011-02-13 15:21 Ole Markus With
0 siblings, 0 replies; 8+ messages in thread
From: Ole Markus With @ 2011-02-13 15:21 UTC (permalink / raw
To: gentoo-commits
commit: 2cf4294ab4daffe1d8c394bd2d280835eeedfaa3
Author: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
AuthorDate: Sun Feb 13 14:55:23 2011 +0000
Commit: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
CommitDate: Sun Feb 13 15:18:57 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commit;h=2cf4294a
Updated index page
---
docs/index.xml | 49 ++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 40 insertions(+), 9 deletions(-)
diff --git a/docs/index.xml b/docs/index.xml
index 764424a..2eb3752 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -6,7 +6,11 @@
<project>
<name>PHP</name>
<longname>Gentoo PHP Team</longname>
-<date>2007-12-02</date>
+<date>2011-02-13</date>
+
+<author title="Author">
+<mail link="olemarkus@gentoo.org">Ole Markus With</mail>
+</author>
<description>
The Gentoo PHP Team is responsible for delivering high-quality support for
@@ -16,10 +20,6 @@ the PHP programming language for Gentoo Linux.
<longdescription>
<p>
-<b>What we do, and who we are</b>
-</p>
-
-<p>
The Gentoo PHP Team looks after the packages for the PHP programming language.
PHP is by far the most important and popular programming language for
web-based applications, and is the 'P' in the LAMP stack.
@@ -39,17 +39,47 @@ developing and running software written in PHP.
<!-- Developer Roles -->
<dev role="Member">mabi</dev>
+<dev role="Member">olemarkus</dev>
+
+<!-- Available jobs -->
+<recruitment>
+ <job>
+ <summary>Maintainer of PEAR/PECL packages</summary>
+ <details>
+ Maintainer of packages extending PHP. Includes basic revision bumping,
+ adding new packages and maintain related eclasses.
+ </details>
+ <requirements>
+ Experience with PHP on Gentoo.
+ </requirements>
+ <contact>php-bugs@gentoo.org</contact>
+ </job>
+ <job>
+ <summary>Maintainer of dev-lang/php</summary>
+ <details>
+ The maintainers of dev-lang/php help out with releasing and patching the
+ core package of PHP: dev-lang/php.
+ </details>
+ <requirements>
+ Experience with PHP.
+ Experience with patching software.
+ Bonus points if you have knowledge about the internals of PHP.
+ </requirements>
+ <contact>php-bugs@gentoo.org</contact>
+ </job>
+</recruitment>
<!-- Project Specific Pages/Documentation -->
+<resource link="php-installing.xml">Documentation: How to install PHP on various servers using the most common SAPIs</resource>
+<resource link="php-upgrade.xml">Documentation: Upgrading PHP</resource>
<resource link="http://overlays.gentoo.org/proj/php/">The Gentoo PHP Overlay & Wiki</resource>
<resource link="http://git.overlays.gentoo.org/gitweb/?p=proj/php.git">The Gentoo PHP Git Overlay</resource>
-<resource link="php-installing.xml">Takes you through how to install PHP on various servers using the most common SAPIs</resource>
-<resource link="php-upgrade.xml">Takes you through upgrading PHP</resource>
<!-- herds -->
<herd name="php" />
<!-- Status updates -->
+<!--
<extrachapter>
<title>Status Updates</title>
<section>
@@ -72,16 +102,17 @@ the team leaders and contains a quick overview of recent progress.
<p>
The following status updates are available:
</p>
-
+-->
<!--
<ul>
<li><uri link="status/status_2010Q1.xml>March, 2010</uri></li>
</ul>
-->
-
+<!--
</body>
</section>
</extrachapter>
+-->
<!-- Chapter regarding mailing list & participation -->
<extrachapter>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/php:master commit in: docs/
@ 2011-02-13 15:21 Ole Markus With
0 siblings, 0 replies; 8+ messages in thread
From: Ole Markus With @ 2011-02-13 15:21 UTC (permalink / raw
To: gentoo-commits
commit: d28cb85e4bf51ec3dbda67c6ccf42e94719e2a94
Author: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
AuthorDate: Sun Feb 13 15:14:06 2011 +0000
Commit: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
CommitDate: Sun Feb 13 15:18:57 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commit;h=d28cb85e
Updated install documentation
---
docs/php-installing.xml | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/docs/php-installing.xml b/docs/php-installing.xml
index 7ae0146..97e1be6 100644
--- a/docs/php-installing.xml
+++ b/docs/php-installing.xml
@@ -17,8 +17,8 @@ This document will guide you through installing PHP on Gentoo
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.0</version>
-<date>2011-01-23</date>
+<version>1.1</version>
+<date>2011-02-13</date>
<chapter>
<title>Installing PHP FastCGI </title>
@@ -224,6 +224,24 @@ all you need to do now is to start the services:</p>
<section>
<title>Nginx</title>
<body>
+
+<p>
+To install Nginx is as easy as emerging it:
+</p>
+
+<pre caption="Installing nginx">
+<i>emerge -av nginx</i>
+</pre>
+
+<warn>
+If you have configured a custom <c>NGINX_MODULES_HTTP</c>, make sure that the <c>fastcgi</c> module is enabled.
+</warn>
+
+<p>
+Once Nginx has been installed, modify the server section of <path>/etc/nginx/nginx.conf</path> to look something
+like this:
+</p>
+
<pre caption="/etc/nginx/nginx.conf">
<snip>
server {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/php:master commit in: docs/
@ 2011-02-13 15:21 Ole Markus With
0 siblings, 0 replies; 8+ messages in thread
From: Ole Markus With @ 2011-02-13 15:21 UTC (permalink / raw
To: gentoo-commits
commit: 734f6bcc66eec2964a1a9ede25a280e60699e264
Author: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
AuthorDate: Sat Jan 29 12:41:23 2011 +0000
Commit: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
CommitDate: Sun Feb 13 15:18:57 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commit;h=734f6bcc
Added a new install guide
---
docs/index.xml | 1 +
docs/php-installing.xml | 618 ++++++++++++++---------------------------------
2 files changed, 185 insertions(+), 434 deletions(-)
diff --git a/docs/index.xml b/docs/index.xml
index ab51552..764424a 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -43,6 +43,7 @@ developing and running software written in PHP.
<!-- Project Specific Pages/Documentation -->
<resource link="http://overlays.gentoo.org/proj/php/">The Gentoo PHP Overlay & Wiki</resource>
<resource link="http://git.overlays.gentoo.org/gitweb/?p=proj/php.git">The Gentoo PHP Git Overlay</resource>
+<resource link="php-installing.xml">Takes you through how to install PHP on various servers using the most common SAPIs</resource>
<resource link="php-upgrade.xml">Takes you through upgrading PHP</resource>
<!-- herds -->
diff --git a/docs/php-installing.xml b/docs/php-installing.xml
index 2d2908b..7ae0146 100644
--- a/docs/php-installing.xml
+++ b/docs/php-installing.xml
@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE guide SYSTEM "dtd/guide.dtd">
-<!-- $Header: $ -->
+<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/php/php-guide.xml,v 1.1 2010/04/23 23:42:19 mabi Exp $ -->
-<guide link="php-installing.xml" lang="en">
+<guide link="php-install.xml" lang="en">
<title>Installing PHP</title>
<author title="Author">
- <mail link="akorthaus@web.de">Andreas Korthaus</mail>
-</author>
+ <mail link="olemarkus@gentoo.org">Ole Markus With</mail>
+ </author>
<abstract>
-This document describes the procedure end-users should follow to install PHP
-packages and extensions.
+This document will guide you through installing PHP on Gentoo
</abstract>
<!-- The content of this document is licensed under the CC-BY-SA license -->
@@ -19,539 +18,290 @@ packages and extensions.
<license/>
<version>1.0</version>
-<date>2006-01-24</date>
+<date>2011-01-23</date>
<chapter>
-<title>Introduction</title>
-<section>
-<body>
-
-<p>
-This guide describes, how to install the new style PHP packages
-(<c>dev-lang/php</c>) and it's extensions. You should not intstall old style
-PHP packages (<c>dev-php/php</c>, <c>dev-php/php-cgi</c> or
-<c>dev-php/mod_php</c>), since those packages are not supported by the
-PHP herd anymore. The old ebuilds have been merged into one new ebuild:
-<c>dev-lang/php</c>, which contains all SAPIs now.
-</p>
-
-<warn>
-If you still have old PHP packages installed, you should upgrade as soon as
-possible using our <uri link="php-upgrading.xml">Upgrading Guide</uri>, because
-the old packages will be <uri
-link="http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/RetiringTheOldPackages#WhatHappensToTheOldPackages">
-removed from portage</uri> soon!
-</warn>
-
-<note>
-The new PHP packages require the new Apache layout, so have a look at <uri
-link="http://www.gentoo.org/doc/en/apache-upgrading.xml">Upgrading Apache</uri>
-if you haven't upgraded yet.
-</note>
+<title>Installing PHP FastCGI </title>
+<body>
+<warn>Discouraged for PHP 5.3.3 and newer</warn>
</body>
-</section>
-</chapter>
-<chapter>
-<title>The new PHP Packages</title>
<section>
-<title>Decide which SAPI to install</title>
-<body>
+<title>Emerging PHP</title>
+<body>
<p>
-To choose the SAPI (Server API) you want, use these USE flags:
+PHP has a huge number of USE flags available. Luckily, the USE flags that the
+PHP ebuilds set by default are fairly sane so the only one we need to add is
+the cgi USE flag, which gives us the FastCGI server API. I find that enabling
+cgi as a global USE flag in <path>/etc/make.conf</path> is a bad idea as I do not
+care about enabling cgi support for every single package in the tree that
+support such a thing. If you are like me, adding it to
+<path>/etc/portage/package.use</path> is what you want. Just drop the following line
+in there:
</p>
-<ul>
- <li><c>cgi</c> - builds & installs <path>/usr/bin/php-cgi</path></li>
- <li><c>cli</c> - builds & installs <path>/usr/bin/php</path></li>
- <li><c>apache</c> - builds & installs <c>mod_php</c> for Apache 1.3 (new
-layout)</li>
- <li><c>apache2</c> - builds & installs <c>mod_php</c> for Apache 2.0
-(new layout)</li>
-</ul>
-
-<p>
-You can mix and match any of these USE flags; except you can't have both
-<c>apache</c> and <c>apache2</c> switched on.
-</p>
+<pre caption="/etc/portage/package.use">
+dev-lang/php cgi
+</pre>
<p>
-The whole point of these ebuilds is that you can have both PHP4 and PHP5
-installed at the same time:
-</p>
+That is about all the configuration you need for PHP. Now, emerge!</p>
-<pre caption="Install PHP">
-<comment>(install latest version of PHP with CLI and Apache2 module)</comment>
-<i>USE="cli apache2" emerge 'dev-lang/php'</i>
-
-<comment>(install PHP4 only)</comment>
-<i>USE="cli apache2" emerge '=dev-lang/php-4*'</i>
-
-<comment>(install both, PHP4 and PHP5)</comment>
-<i>USE="cli apache2" emerge '=dev-lang/php-4*' '=dev-lang/php-5*'</i>
+<pre>
+<i>emerge -av php</i>
</pre>
-<note>
-USE flags shouldn't be set this way, please use
-<path>/etc/portage/package.use</path> as described later (this way you can also
-select different USE flags for PHP4 and PHP5).
-</note>
-
</body>
</section>
-
<section>
+<title>configuring Apache2</title>
-<title>New Portage Categories for PHP4 and PHP5</title>
<body>
-
-<p>
-The new PHP ebuilds have been moved from <c>dev-php</c> to <c>dev-lang/php</c>.
-To make it possible to install packages independently for PHP4 and PHP5, two
-new portage categories have been introduced: <c>dev-php4</c> and
-<c>dev-php5</c>. These categories are mainly used by PECL packages like
-<c>pecl-pdo</c>, <c>pecl-apc</c>, <c>php-java-bridge</c> or <c>xdebug</c>.
-Packages, working with both, PHP4 and PHP5, will stay in <c>dev-php</c>.
-</p>
-
<p>
-E.g., to install <c>pecl-apc</c>:
+Apache is a trusted member of the LAMP stack and probably the webserver that
+the most people are familiar with. In addition to www-servers/apache, we need
+to install another package to get fastcgi working: <c>www-apache/mod_fastcgi</c>.
</p>
-<pre caption="Install PHP extension like PECL::APC (example)">
-<comment>(install APC for PHP4 only)</comment>
-<i>emerge dev-php4/pecl-apc</i>
+<pre caption="Install what we need">
+<i>emerge -av apache mod_fastcgi</i>
+</pre>
-<comment>(install APC for PHP5 only)</comment>
-<i>emerge dev-php5/pecl-apc</i>
-<comment>(install APC for both, PHP4 and PHP5)</comment>
-<i>emerge dev-php4/pecl-apc dev-php5/pecl-apc</i>
+<p>After all has been installed, simply enable it in:</p>
+<pre caption="/etc/conf.d/apache">
+<var>APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D USERDIR -D FASTCGI"</var>
</pre>
-</body>
-</section>
+<p>Once that is done, drop the following into <path>/etc/apache2/vhosts.d/00_default_vhost.conf</path></p>
-<section>
-<title>PHP Directories</title>
-<body>
+<pre caption="/etc/apache2/vhosts.d/00_default_vhost.conf">
-<ul>
- <li>These new ebuilds install their contents into <path>/usr/lib/php4</path>
-and/or <path>/usr/lib/php5</path> (the Apache modules go into the right place
-for Apache).</li>
- <li>The PEAR packages and other PHP libraries go into
-<path>/usr/share/php</path>.</li>
- <li>PHP extensions (e.g. PECL packages) add a <path>[PACKAGE].ini</path> file
-to the <path>/etc/php/[SAPI]/ext</path> directory.</li>
-</ul>
+Listen 80
-</body>
-</section>
+NameVirtualHost *:80
-<section>
-<title>Installing multiple PHP versions</title>
-<body>
-<p>
-If you install more than one version of PHP, e.g.:
-</p>
+<VirtualHost *:80>
+ ServerName localhost
+
+ DocumentRoot /var/www/localhost/htdocs/
+
+ <IfModule mpm_peruser_module>
+ ServerEnvironment apache apache
+ </IfModule>
+ AddHandler php5-fastcgi .php
+ FastCgiServer /usr/lib/php5.2/bin/php-cgi
+
+ <Directory /var/www/localhost/htdocs/>
+ Order deny,allow
+ Allow from all
+
+ </Directory>
+
+</VirtualHost>
-<pre caption="Emerge PHP4 and PHP5">
-<i>USE="cgi cli apache2" emerge '=dev-lang/php-4*' '=dev-lang/php-5*'</i>
</pre>
-<p>
-The ebuilds will create symlinks in <path>/usr/bin</path> for the last version
-of PHP you installed, in this case PHP5 since it was installed after PHP4. If
-you want <path>/usr/bin/php</path> or <path>/usr/bin/php-cgi</path> to point
-to PHP4 or one to PHP4, the other to PHP5 etc., you can <uri
-link="#doc_chap3_sect3">use the php-select tool</uri> from
-<c>app-admin/php-toolkit</c>. <c>php-select</c> makes it very easy to symlink
-the appropriate binaries.
-</p>
-
-</body>
-</section>
-</chapter>
-
-<chapter>
-<title>Installation Instructions</title>
-<section>
-<title>Set the USE flags</title>
-<body>
+<p>That is it. Now start apache</p>
-<p>
-The new PHP ebuild provides USE flags for nearly every PHP extension, so you
-can customize your PHP installation almost as good as building PHP by yourself,
-simply by adding appropriate USE flags to
-<path>/etc/portage/package.use</path> (has to be created if it doesn't exists).
-This way you can easily combine the flexibility with the advantages of a
-mature package management (Portage). The new ebuild even allows a parallel
-installation of PHP4 and PHP5.
-</p>
-
-<note>
-<path>/etc/portage/package.use</path> will set the USE flags for your PHP
-installation and remember them without mass editing through
-<path>make.conf</path>.
-</note>
-
-<p>
-Please set the USE flags accordingly to what you want your PHP installation to
-support (it is recommended to at least set the <c>cli</c> USE flag):
-</p>
-
-<pre caption="USE flags for dev-lang/php (example)">
-dev-lang/php -* cli apache2 ctype gd jpeg mysql pcre png session truetype xml xsl zlib
+<pre caption="Start apache">
+<i>/etc/init.d/apache2 start</i>
</pre>
-<note>
-<c>-*</c> will disable all USE flags (this will disable even basic PHP
-features like Session-, PCRE-, gd- and MySQL-support!), so you have to specify
-every USE flag for any extension/feature you would like to use. See <uri
-link="http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/ManagingExtensions">
-Managing Extensions</uri> for details. You have to set USE flags for
-upstream's defaults such as <c>pcre</c> if you want to use <uri
-link="http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/PhpRefPcre">preg_*
-Functions</uri> or <c>session</c> if you want to use <uri
-link="http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/PhpRefSession">Session
-Handling Functions</uri>.
-</note>
-
-<p>
-If you want to install PHP4 and PHP5 in parallel, you can put in different USE
-flags for each version:
-</p>
+<p>Put something like the following into <path>/var/www/localhost/htdocs/index.php</path></p>
-<pre caption="Different USE flags for PHP4 and PHP5 (example)">
-=dev-lang/php-4* -* cgi cli ctype gd jpeg mysql pcre pear png session truetype xml xsl zlib
-=dev-lang/php-5* -* cli apache2 ctype gd jpeg mysql pcre pdo-external pear png session simplexml soap sqlite truetype xml xsl zlib
+<pre caption="PHP test code">
+<?php
+phpinfo();
</pre>
-<note>
-For a list of recommended USE flags look at <uri
-link="http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/CommonQuestions#DoYouRecommendAnyUSEFlags">
-Recommend USE flags</uri>. For a list of USE flags
-available for PHP have a look at the <uri
-link="http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/NewUseFlags">USE
-flags table</uri> from overlay wiki.
-</note>
+
+<p>That is it. Now you should be able to enter <uri link="http://localhost/index.php">http://localhost/index.php</uri> to test your setup.</p>
</body>
</section>
-
<section>
-<title>Emerge PHP</title>
-<body>
-
-<p>
-Now you have the choice to install PHP4 only, PHP5 only or both in parallel. To
-install PHP4 only you have to emerge <c>=dev-lang/php-4*</c>, to install PHP5
-(latest) you can use <c>dev-lang/php</c>, and to install both in parallel you
-have to emerge <c>=dev-lang/php-4*</c> and <c>=dev-lang/php-5*</c>.
-
-</p>
-
-<p>
-Check available USE flags and current USE flag settings:
-</p>
+<title>Configuring lighttpd</title>
-<pre caption="Check USE flags (example)">
-<comment>(check PHP4 package)</comment>
-<i>emerge --pretend --verbose '=dev-lang/php-4*'</i>
-
-<comment>(check PHP5 package)</comment>
-<i>emerge --pretend --verbose '=dev-lang/php-5*'</i>
-
-<comment>(check PHP extensions for PHP4)</comment>
-<i>emerge --pretend --verbose dev-php4/pecl-apc dev-php4/pecl-imagick dev-php4/xdebug</i>
-
-<comment>(check PHP extensions for PHP5)</comment>
-<i>emerge --pretend --verbose dev-php5/pecl-apc dev-php5/pecl-imagick</i>
+<body>
-<comment>(check PHP libraries/applications)</comment>
-<i>emerge --pretend --verbose PEAR-PEAR PEAR-Mail PEAR-MDB smarty</i>
+<p>First, make sure that you have the php USE flag enabled in your system. Revisit your /etc/portage/package.use is what and append the following:</p>
+<pre caption="/etc/portage/package.use">
+www-server/lighttpd php
</pre>
-<p>
-Emerge PHP if everything is fine:
-</p>
-
-<pre caption="Emerge new packages (example)">
-<comment>(emerge PHP4 package)</comment>
-<i>emerge '=dev-lang/php-4*'</i>
-
-<comment>(emerge PHP5 package)</comment>
-<i>emerge '=dev-lang/php-5*'</i>
-
-<comment>(emerge PHP extensions for PHP4)</comment>
-<i>emerge dev-php4/pecl-apc dev-php4/pecl-imagick dev-php4/xdebug</i>
-
-<comment>(emerge PHP extensions for PHP5)</comment>
-<i>emerge dev-php5/pecl-apc dev-php5/pecl-imagick</i>
-
-<comment>(emerge PHP libraries/applications)</comment>
-<i>emerge PEAR-PEAR PEAR-Mail PEAR-MDB smarty</i>
+Then emerge lighttpd
+<pre>
+<i>emerge -av lighttpd</i>
</pre>
+
+<p>That is basically it. The configuration files that comes with lighttpd should work out of the box, and you should be able to see your site at
+<uri link="http://localhost/index.php">http://localhost/index.php</uri></p>
</body>
</section>
+</chapter>
+<chapter>
+<title>Installing PHP FPM </title>
+<body>
+<impo>This is only available for PHP 5.3.3 and newer. The PHP herds consider FPM as the recommended setup for PHP</impo>
+In PHP 5.3.3, PHP is shipped with support for the FPM SAPI. The FPM SAPI is an
+improved fcgi SAPI that allows for more advanced configuration than the
+original fcgi SAPI. One of the most useful features is process management, which
+makes it very useful for lightweight webservers, such as <c>www-servers/nginx</c>,
+that does not handle process management of fcgi themselves.
+</body>
<section>
-<title>PHP4 and PHP5 parallel: select which cli/cgi binary to use</title>
+<title>Installing PHP</title>
<body>
-<p>
-After emerging you will have binaries for <c>cli</c> and/or <c>cgi</c> in
-<path>/usr/lib/php4/bin</path> and/or <path>/usr/lib/php5/bin</path>. If you
-have installed both, PHP4 and PHP5, portage cannot decide for you which one
-should be used by default and always symlinks the last PHP version you
-installed in <path>/usr/bin</path>. So if you installed PHP5 as last, you'll
-see <path>/usr/bin/php</path> symlinked to <path>/usr/lib/php5/bin/php</path>.
-So one <c>cli</c> and/or <c>cgi</c> binary as well as <c>php-devel</c>
-(responsable for building PHP extensions using <c>phpize</c> and
-<c>php-config</c>) has to be symlinked (in <path>/usr/bin</path>), which could
-easily be done using <c>php-select</c>, which is part of
-<c>app-admin/php-toolkit</c>.
-</p>
-
-<note>
-The <c>dev-lang/php</c> packages depend on <c>app-admin/php-toolkit</c> so
-<c>php-select</c> should be available automatically after emerging the new
-style php packages.
-</note>
+<p>Make sure the fpm USE flag is enabled</p>
-<p>
-Assuming you have emerged <c>=dev-lang/php-4*</c> as well as
-<c>=dev-lang/php-5*</c>, enter the following <c>php-select</c> commands to show
-the currently selected PHP versions:
-</p>
-
-<pre caption="Show currently selected PHP versions">
-<comment>(for cli)</comment>
-<i>php-select php</i>
-
-<comment>(for cgi)</comment>
-<i>php-select php-cgi</i>
-
-<comment>(for phpize, php-config)</comment>
-<i>php-select php-devel</i>
-</pre>
+<pre caption="/etc/package.use">
+dev-lang/php fpm
+</pre>
-<p>
-You should see something like that:
-</p>
-
-<pre caption="Example output of php-select">
-# <i>php-select php</i>
-/usr/bin/php is set to /usr/lib/php5/bin/php
-</pre>
-<p>
-Which means that the default path to the PHP cli binary
-<path>/usr/bin/php</path> is symlinked to the PHP5 binary
-<path>/usr/lib/php5/bin/php</path>. So PHP scripts using
-<path>/usr/bin/php</path> will be executed by PHP5.
-</p>
</body>
</section>
<section>
-<title>Use php-select to change default PHP versions</title>
-<body>
+<title>Setting up FPM with lighttpd</title>
-<p>
-If you are not happy with the default version settings you found out in the
-last chapter, you can use <c>php-select</c> again to select the desired
-version:
-</p>
+<body>
+<warn>Interestingly enough, you do NOT want the <c>php</c> USE flag
+for <c>www-servers/lighttpd</c>. It could actually break the build.</warn>
-<pre caption="Select desired versions">
-<comment>(for cli)</comment>
-<i>php-select php php4</i>
+<p>Make sure that lighttpd is build with support for fastcgi and that the php USE flag is disabled</p>
-<comment>(for cgi)</comment>
-<i>php-select php-cgi php5</i>
-<comment>(for phpize, php-config)</comment>
-<i>php-select php-devel php5</i>
+<pre caption="/etc/package.use">
+www-servers/lighttpd fastcgi -php
</pre>
-<note>
-Please type <c>php-select -h</c> to get more details on what <c>php-select</c>
-can do.
-</note>
-
<p>
-Check linking:
-</p>
+Lighttpd ships with a default FastCGI config file, but unfortunately, it is
+written to work with the old PHP FCGI SAPI only, instead of a general
+FCGI setup. Since we disabled the php USE flag, it won’t be included, and rightly so.
+However it does provide a good foundation for a configuration file that can be used with FPM.</p>
-<pre caption="Check symlinks">
+<p>Edit <path>/etc/lighttpd/mod_fastcgi.conf</path> so that it looks something like this:
+</p>
- # <i>stat /usr/bin/php /usr/bin/php-cgi /usr/bin/phpize /usr/bin/php-config | grep File</i>
- File: `/usr/bin/php' -> `/usr/lib/php4/bin/php'
- File: `/usr/bin/php-cgi' -> `/usr/lib/php5/bin/php-cgi'
- File: `/usr/bin/phpize' -> `/usr/lib/php5/bin/phpize'
- File: `/usr/bin/php-config' -> `/usr/lib/php5/bin/php-config'
+<pre>
+server.modules += ("mod_fastcgi")
+fastcgi.server = ( ".php" =>
+ ( "localhost" =>
+ (
+ "host" => "127.0.0.1",
+ "port" => "9000"
+ )
+ )
+)
</pre>
-<note>
-Please note that <c>php-select</c> only changes the default versions. If you
-have installed both, PHP4 and PHP5 cgi/cli you can allways use the direct paths
-like <path>/usr/lib/php4/bin/php</path> and <path>/usr/lib/php5/bin/php</path>
-to run a PHP script with a specific version. You can use PHP4 and PHP5 cgi
-in the same Apache instance, but you cannot use two different PHP Apache
-modules in one Apache instance, see <uri link="php4-php5-configuration.xml">
-PHP4 and PHP5 Configuration Guide</uri> for details.
-</note>
-
-</body>
-</section>
-</chapter>
-
-<chapter>
-<title>PHP Configuration</title>
-<section>
-<body>
+<p>Note the <c>host</c> and <c>port</c> parts.</p>
-<p>
-The Gentoo PHP Package stores configuration in <path>/etc/php</path>, which
-contains one subdirectory for each SAPI for each PHP version:
-</p>
+<p>Since Gentoo ships with a perfectly working copy of a <c>php-fpm.ini</c> file,
+located in <path>/etc/php/fpm-php5/php-fpm.ini</path>, and init-script,
+all you need to do now is to start the services:</p>
-<pre caption="List PHP config directories">
-$ <i>ls -1 /etc/php</i>
-apache2-php4
-apache2-php5
-cli-php4
-cli-php5
+<pre caption="Starting PHP">
+<i>/etc/init.d/php-fpm start</i>
+<i>/etc/init.d/lighttpd start</i>
</pre>
-<p>
-Every subdirectory contains an own <path>php.ini</path>, one php.ini for each
-SAPI.
-</p>
+
</body>
</section>
<section>
-<title>Configuration of PHP Extensions</title>
+<title>Nginx</title>
<body>
+<pre caption="/etc/nginx/nginx.conf">
+<snip>
+ server {
+ listen 127.0.0.1;
+ server_name localhost;
+
+ access_log /var/log/nginx/localhost.access_log main;
+ error_log /var/log/nginx/localhost.error_log info;
+
+ root /var/www/localhost/htdocs;
+
+ location ~ .php$ {
+ fastcgi_pass 127.0.0.1:9000;
+ include fastcgi.conf;
+ }
+ }
+<snip>
+</pre>
-<p>
-The new PHP package does not store configuration directives from external
-(shared) PHP extensions in <path>php.ini</path>. These directives will
-be stored in own extension-specific configuration files in the
-<path>/etc/php/[SAPI]/ext</path> directories. To enable/disable shared
-extensions, symlinks from <path>/etc/php/[SAPI]/ext-active</path> are used. If
-you want to enable an extension, create a symlink in
-<path>/etc/php/[SAPI]/ext-active</path> to the corresponding
-<path>[EXTENSION].ini</path> file in <path>/etc/php/[SAPI]/ext/</path>. If you
-want to disable an extension, remove the symlink.
-</p>
-
-<p>
-E.g., if you emerge the <c>dev-php5/pecl-apc</c> package, the default
-configuration of APC will be written to
-<path>/etc/php/[SAPI]5/ext/apc.ini</path>. A symlink from
-<path>/etc/php/[SAPI]5/ext-active/apc.ini</path> to
-<path>/etc/php/[SAPI]5/ext/apc.ini</path> will be created, so the extension is
-enabled by default. To disable APC, you have to remove the
-<path>/etc/php/[SAPI]5/ext-active/apc.ini</path> symlink for every SAPI. To
-enable APC again, create new symlinks in
-<path>/etc/php/[SAPI]5/ext-active/</path> to <path>../ext/apc.ini</path>.
-</p>
-
-<note>
-If you install PHP as an Apache module, make sure to restart Apache after
-installation and configuration.
-</note>
+<p>Now just start the related services and you should have a working site</p>
+<pre>
+<i>/etc/init.d/nginx start</i>
+<i>/etc/init.d/php-fpm start</i>
+</pre>
</body>
+
</section>
+
</chapter>
<chapter>
-<title>Configure Apache to work with PHP4 and/or PHP5</title>
+<title>Nice to know</title>
<section>
+<title>Development vs Production php.ini files</title>
<body>
-
-<p>
-To configure Apache to load the PHP4 or PHP5 module (mod_php), you have to add
-<c>-D PHP4</c> respectively <c>-D PHP5</c> to <c>APACHE2_OPTS</c> variable in
-<path>/etc/conf.d/apache2</path>.
-</p>
-
-<pre caption="Configure Apache to load mod_php">
-<comment>(settings for PHP4)</comment>
-<i>APACHE2_OPTS="-D PHP4"</i>
-
-<comment>(or settings for PHP5)</comment>
-<i>APACHE2_OPTS="-D PHP5"</i>
+<p>PHP distributes two versions of their <path>php.ini</path>,
+one for production environments and one for development.
+In Gentoo, you can now chose which of these two files you want
+installed on your system by default. This is particularly handy
+when you update PHP and do not want your chosen environment settings
+in <path>php.ini</path> to appear when you merge your coniguration files.</p>
+
+<p>To tell portage which version of <path>php.ini</path> you want, add one
+of the following lines to <path>/etc/make.conf</path>:</p>
+
+<pre caption="Choosing between development and production php.ini">
+<comment># Set default php.ini version to the development version</comment>
+<var>PHP_INI_VERSION="development"</var>
+<comment># Set default php.ini version to the production version</comment>
+<var>PHP_INI_VERSION="production"</var>
</pre>
-<p>
-There are many ways to make Apache work with two PHP versions in parallel. The
-easiest way is to use PHP4 and PHP5 as a cgi binary, or a PHP4 cgi and PHP5
-module (or the other way around). It's not possible to use the PHP4 module and
-PHP5 module in one Apache instance.
-</p>
+<impo>Note that the PHP herd also does additional patching of the php.ini file
+regardless of the version you set above.</impo>
-<p>
-We have created a <uri link="php4-php5-configuration.xml">PHP4 and PHP5
-Configuration Guide</uri> which explains some of the possible solutions.
-</p>
+<warn>Always check and double-check your php.ini file after upgrade</warn>
+<p>If you want to change your <path>php.ini</path> after installation, you
+can find both versions located in <path>/usr/share/doc/php-<version>/php.ini-development.bz2</path>
+</p>
+</body>
+</section><section>
+<title>FPMm user/group</title>
+<body>
+<p>However, you might want to change the user and group parameters to something else
+than nobody. Personally, I changed it to nginx, but you might want to consider
+creating a new user for your web application. </p>
</body>
</section>
</chapter>
-
<chapter>
-<title>Support / Getting Help</title>
-<section>
+<title>Further reading</title>
<body>
-
-<p>
-If you run into problems with the new Gentoo PHP packages, here's where you can
-get help:
-</p>
-
<ul>
- <li><uri
-link="http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/CommonQuestions">
-Common Questions</uri> about PHP on Gentoo</li>
- <li><uri
-link="http://svn.gnqs.org/projects/gentoo-php-overlay">Development-Page of the
-PHP Overlay</uri></li>
- <li>#gentoo-php on irc.freenode.net; this is the chatroom where the overlay's
-regular authors hang out. We'd love to see you there!</li>
- <li><uri link="http://forums.gentoo.org/">Gentoo Forums</uri> are a popular
-place to ask for help. There are plenty of other Gentoo users reading the
-Forums round the clock, making it a great place to get help in a hurry.</li>
+<li><uri link="http://www.gentoo.org/proj/en/php/php-guide.xml">PHP Upgrade guide</uri> - Offers more information about how to deal with multiple instals of PHP and how to install extensions.</li>
+<li><uri link="http://olemarkus.org/2011/01/concurrently-running-multiple-versions-of-php/">Concurrently running multiple versions of PHP</uri> - A guide describing how to set up webservers to work with parallel installs of PHP</li>
</ul>
-
-<p>
-For details about implementation of the new packages have a look at <uri
-link="http://article.gmane.org/gmane.linux.gentoo.devel/30050">Stuarts Posting
-on gentoo-dev</uri> and Stuarts Blog entries starting from <uri
-link="http://stu.gnqs.org/diary/gentoo.php/2005/07/11/radical_changes_for_php5_support">
-'Radical Changes for PHP5 Support'</uri>.
-</p>
-
-<p>
-On the <uri
-link="http://svn.gnqs.org/projects/gentoo-php-overlay">Development-Page</uri>
-you'll find a lot of documentation and more recent ebuilds, which will be
-moved to the official portage tree later.
-</p>
-
</body>
-</section>
</chapter>
-
</guide>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/php:master commit in: docs/
@ 2011-02-13 15:45 Ole Markus With
0 siblings, 0 replies; 8+ messages in thread
From: Ole Markus With @ 2011-02-13 15:45 UTC (permalink / raw
To: gentoo-commits
commit: b6e8aa09c8e2386bda0b1ac15888e71c4f01f871
Author: Ole Markus With <o.with <AT> sportradar <DOT> com>
AuthorDate: Sun Feb 13 15:45:33 2011 +0000
Commit: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
CommitDate: Sun Feb 13 15:45:33 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commit;h=b6e8aa09
Various lint fixes
---
docs/index.xml | 8 ++++----
docs/php-installing.xml | 21 +++++++++++++++------
docs/php-upgrading.xml | 2 +-
3 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/docs/index.xml b/docs/index.xml
index 2eb3752..9537e92 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -37,10 +37,6 @@ Our goal is to ensure that Gentoo provides the best environment possible for
developing and running software written in PHP.
</p></goals>
-<!-- Developer Roles -->
-<dev role="Member">mabi</dev>
-<dev role="Member">olemarkus</dev>
-
<!-- Available jobs -->
<recruitment>
<job>
@@ -69,6 +65,10 @@ developing and running software written in PHP.
</job>
</recruitment>
+<!-- Developer Roles -->
+<dev role="Member">mabi</dev>
+<dev role="Member">olemarkus</dev>
+
<!-- Project Specific Pages/Documentation -->
<resource link="php-installing.xml">Documentation: How to install PHP on various servers using the most common SAPIs</resource>
<resource link="php-upgrade.xml">Documentation: Upgrading PHP</resource>
diff --git a/docs/php-installing.xml b/docs/php-installing.xml
index 97e1be6..539207e 100644
--- a/docs/php-installing.xml
+++ b/docs/php-installing.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/php/php-guide.xml,v 1.1 2010/04/23 23:42:19 mabi Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/php/php-installing.xml,v 1.1 2011/02/13 15:43:41 olemarkus Exp $ -->
<guide link="php-install.xml" lang="en">
<title>Installing PHP</title>
@@ -23,9 +23,11 @@ This document will guide you through installing PHP on Gentoo
<chapter>
<title>Installing PHP FastCGI </title>
+<section>
<body>
<warn>Discouraged for PHP 5.3.3 and newer</warn>
</body>
+</section>
<section>
<title>Emerging PHP</title>
@@ -49,7 +51,7 @@ dev-lang/php cgi
<p>
That is about all the configuration you need for PHP. Now, emerge!</p>
-<pre>
+<pre caption="Installing PHP">
<i>emerge -av php</i>
</pre>
@@ -133,8 +135,9 @@ phpinfo();
www-server/lighttpd php
</pre>
-Then emerge lighttpd
-<pre>
+<p>Then emerge lighttpd</p>
+
+<pre caption="Install lighttpd">
<i>emerge -av lighttpd</i>
</pre>
@@ -147,14 +150,18 @@ Then emerge lighttpd
<chapter>
<title>Installing PHP FPM </title>
+<section>
<body>
<impo>This is only available for PHP 5.3.3 and newer. The PHP herds consider FPM as the recommended setup for PHP</impo>
+<p>
In PHP 5.3.3, PHP is shipped with support for the FPM SAPI. The FPM SAPI is an
improved fcgi SAPI that allows for more advanced configuration than the
original fcgi SAPI. One of the most useful features is process management, which
makes it very useful for lightweight webservers, such as <c>www-servers/nginx</c>,
that does not handle process management of fcgi themselves.
+</p>
</body>
+</section>
<section>
<title>Installing PHP</title>
<body>
@@ -193,7 +200,7 @@ However it does provide a good foundation for a configuration file that can be u
<p>Edit <path>/etc/lighttpd/mod_fastcgi.conf</path> so that it looks something like this:
</p>
-<pre>
+<pre caption="/etc/lighttpd/mod_fastcgi.conf">
server.modules += ("mod_fastcgi")
fastcgi.server = ( ".php" =>
( "localhost" =>
@@ -263,7 +270,7 @@ like this:
<p>Now just start the related services and you should have a working site</p>
-<pre>
+<pre caption="Starting nginx and php-fpm">
<i>/etc/init.d/nginx start</i>
<i>/etc/init.d/php-fpm start</i>
</pre>
@@ -315,11 +322,13 @@ creating a new user for your web application. </p>
</chapter>
<chapter>
<title>Further reading</title>
+<section>
<body>
<ul>
<li><uri link="http://www.gentoo.org/proj/en/php/php-guide.xml">PHP Upgrade guide</uri> - Offers more information about how to deal with multiple instals of PHP and how to install extensions.</li>
<li><uri link="http://olemarkus.org/2011/01/concurrently-running-multiple-versions-of-php/">Concurrently running multiple versions of PHP</uri> - A guide describing how to set up webservers to work with parallel installs of PHP</li>
</ul>
</body>
+</section>
</chapter>
</guide>
diff --git a/docs/php-upgrading.xml b/docs/php-upgrading.xml
index 20db4cc..a514f2b 100644
--- a/docs/php-upgrading.xml
+++ b/docs/php-upgrading.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/php/php-guide.xml,v 1.4 2011/01/05 12:15:50 mabi Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/php/Attic/php-upgrading.xml,v 1.7 2011/02/13 15:43:41 olemarkus Exp $ -->
<guide link="php-guide.xml" lang="en">
<title>Upgrading PHP</title>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/php:master commit in: docs/
@ 2011-02-15 17:39 Ole Markus With
0 siblings, 0 replies; 8+ messages in thread
From: Ole Markus With @ 2011-02-15 17:39 UTC (permalink / raw
To: gentoo-commits
commit: 5018b69bfd77e8de2249f03d441140234a77831c
Author: Ole Markus With <o.with <AT> sportradar <DOT> com>
AuthorDate: Tue Feb 15 17:39:43 2011 +0000
Commit: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
CommitDate: Tue Feb 15 17:39:43 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commit;h=5018b69b
Fixed a typo in resource link
---
docs/index.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/docs/index.xml b/docs/index.xml
index 9537e92..691e09a 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -71,7 +71,7 @@ developing and running software written in PHP.
<!-- Project Specific Pages/Documentation -->
<resource link="php-installing.xml">Documentation: How to install PHP on various servers using the most common SAPIs</resource>
-<resource link="php-upgrade.xml">Documentation: Upgrading PHP</resource>
+<resource link="php-upgrading.xml">Documentation: Upgrading PHP</resource>
<resource link="http://overlays.gentoo.org/proj/php/">The Gentoo PHP Overlay & Wiki</resource>
<resource link="http://git.overlays.gentoo.org/gitweb/?p=proj/php.git">The Gentoo PHP Git Overlay</resource>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/php:master commit in: docs/
@ 2011-06-05 12:29 Ole Markus With
0 siblings, 0 replies; 8+ messages in thread
From: Ole Markus With @ 2011-06-05 12:29 UTC (permalink / raw
To: gentoo-commits
commit: 5b6d655f90f71add58510e7c289c72b7c1424c29
Author: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
AuthorDate: Sun Jun 5 12:25:10 2011 +0000
Commit: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
CommitDate: Sun Jun 5 12:29:22 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commit;h=5b6d655f
Removed documentation on old fcgi setup. No longer want users to use that one.
---
docs/php-installing.xml | 128 -----------------------------------------------
1 files changed, 0 insertions(+), 128 deletions(-)
diff --git a/docs/php-installing.xml b/docs/php-installing.xml
index 539207e..a1fad09 100644
--- a/docs/php-installing.xml
+++ b/docs/php-installing.xml
@@ -21,134 +21,6 @@ This document will guide you through installing PHP on Gentoo
<date>2011-02-13</date>
<chapter>
-<title>Installing PHP FastCGI </title>
-
-<section>
-<body>
-<warn>Discouraged for PHP 5.3.3 and newer</warn>
-</body>
-</section>
-
-<section>
-<title>Emerging PHP</title>
-
-<body>
-<p>
-PHP has a huge number of USE flags available. Luckily, the USE flags that the
-PHP ebuilds set by default are fairly sane so the only one we need to add is
-the cgi USE flag, which gives us the FastCGI server API. I find that enabling
-cgi as a global USE flag in <path>/etc/make.conf</path> is a bad idea as I do not
-care about enabling cgi support for every single package in the tree that
-support such a thing. If you are like me, adding it to
-<path>/etc/portage/package.use</path> is what you want. Just drop the following line
-in there:
-</p>
-
-<pre caption="/etc/portage/package.use">
-dev-lang/php cgi
-</pre>
-
-<p>
-That is about all the configuration you need for PHP. Now, emerge!</p>
-
-<pre caption="Installing PHP">
-<i>emerge -av php</i>
-</pre>
-
-</body>
-</section>
-<section>
-<title>configuring Apache2</title>
-
-<body>
-<p>
-Apache is a trusted member of the LAMP stack and probably the webserver that
-the most people are familiar with. In addition to www-servers/apache, we need
-to install another package to get fastcgi working: <c>www-apache/mod_fastcgi</c>.
-</p>
-
-<pre caption="Install what we need">
-<i>emerge -av apache mod_fastcgi</i>
-</pre>
-
-
-<p>After all has been installed, simply enable it in:</p>
-<pre caption="/etc/conf.d/apache">
-<var>APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D USERDIR -D FASTCGI"</var>
-</pre>
-
-<p>Once that is done, drop the following into <path>/etc/apache2/vhosts.d/00_default_vhost.conf</path></p>
-
-<pre caption="/etc/apache2/vhosts.d/00_default_vhost.conf">
-
-Listen 80
-
-NameVirtualHost *:80
-
-
-<VirtualHost *:80>
- ServerName localhost
-
- DocumentRoot /var/www/localhost/htdocs/
-
- <IfModule mpm_peruser_module>
- ServerEnvironment apache apache
- </IfModule>
- AddHandler php5-fastcgi .php
- FastCgiServer /usr/lib/php5.2/bin/php-cgi
-
- <Directory /var/www/localhost/htdocs/>
- Order deny,allow
- Allow from all
-
- </Directory>
-
-</VirtualHost>
-
-</pre>
-
-<p>That is it. Now start apache</p>
-
-<pre caption="Start apache">
-<i>/etc/init.d/apache2 start</i>
-</pre>
-
-<p>Put something like the following into <path>/var/www/localhost/htdocs/index.php</path></p>
-
-<pre caption="PHP test code">
-<?php
-phpinfo();
-</pre>
-
-
-<p>That is it. Now you should be able to enter <uri link="http://localhost/index.php">http://localhost/index.php</uri> to test your setup.</p>
-
-</body>
-</section>
-<section>
-<title>Configuring lighttpd</title>
-
-<body>
-
-<p>First, make sure that you have the php USE flag enabled in your system. Revisit your /etc/portage/package.use is what and append the following:</p>
-<pre caption="/etc/portage/package.use">
-www-server/lighttpd php
-</pre>
-
-<p>Then emerge lighttpd</p>
-
-<pre caption="Install lighttpd">
-<i>emerge -av lighttpd</i>
-</pre>
-
-
-<p>That is basically it. The configuration files that comes with lighttpd should work out of the box, and you should be able to see your site at
-<uri link="http://localhost/index.php">http://localhost/index.php</uri></p>
-</body>
-</section>
-</chapter>
-
-<chapter>
<title>Installing PHP FPM </title>
<section>
<body>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/php:master commit in: docs/
@ 2011-06-05 12:29 Ole Markus With
0 siblings, 0 replies; 8+ messages in thread
From: Ole Markus With @ 2011-06-05 12:29 UTC (permalink / raw
To: gentoo-commits
commit: 2e928a54861889ce378b9dbadfbd4d284807d7a5
Author: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
AuthorDate: Sun Jun 5 12:25:39 2011 +0000
Commit: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
CommitDate: Sun Jun 5 12:29:22 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commit;h=2e928a54
Added apache2 mod_php install instructions
---
docs/php-installing.xml | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/docs/php-installing.xml b/docs/php-installing.xml
index a1fad09..ad19baa 100644
--- a/docs/php-installing.xml
+++ b/docs/php-installing.xml
@@ -153,6 +153,33 @@ like this:
</chapter>
<chapter>
+<title>Apache and mod_php</title>
+<section>
+<body>
+
+<p>Apache is the trusted server part of the LAMP stack. Using mod_php, setting up PHP with Apache is rather trivial. The PHP Herd recommends that if you want to use PHP with Apache, you should use mod_php over any FastCGI/FPM setup. If you want FPM, we recommend that you use nginx as server.</p>
+
+<p>Installing mod_php is as easy as enabling the apache2 USE flag for dev-lang/php</p>
+
+
+<pre caption="/etc/package.use">
+dev-lang/php apache2
+</pre>
+
+<p>This will also pull in www-servers/apache. After the install finish, make sure you add "-D PHP5" to <path>/etc/conf.d/apache2</path></p>
+
+<pre caption="/etc/conf.d/apache2">
+<var>APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D USERDIR -D PHP5"</var>
+</pre>
+
+<warn>If you do not complete this step, your php source code will be outputted instead of interpreted</warn>
+
+</body>
+</section>
+</chapter>
+
+
+<chapter>
<title>Nice to know</title>
<section>
<title>Development vs Production php.ini files</title>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/php:master commit in: docs/
@ 2011-06-05 12:29 Ole Markus With
0 siblings, 0 replies; 8+ messages in thread
From: Ole Markus With @ 2011-06-05 12:29 UTC (permalink / raw
To: gentoo-commits
commit: 3c12a03e9bd820a63e401e2b3190594f019ccab5
Author: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
AuthorDate: Sun Jun 5 12:29:04 2011 +0000
Commit: Ole Markus With <olemarkus <AT> olemarkus <DOT> org>
CommitDate: Sun Jun 5 12:29:22 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commit;h=3c12a03e
Added a troubleshooting part with an entry on source code showing
---
docs/php-installing.xml | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/docs/php-installing.xml b/docs/php-installing.xml
index ad19baa..0d5c92b 100644
--- a/docs/php-installing.xml
+++ b/docs/php-installing.xml
@@ -219,6 +219,28 @@ creating a new user for your web application. </p>
</body>
</section>
</chapter>
+
+<chapter>
+<title>Troubleshooting</title>
+<section>
+<title>My source code is showing</title>
+<body>
+<p>We do not really get that many support issues except for this one.</p>
+
+<p>The most common reason is that short_open_tags is disabled by default. If you code make use of short tags, i.e <? instead of <?php, you have to either fix your code or make change your php.ini to enable short open tags.</p>
+
+<pre caption="php.ini">
+<var>short_open_tag = On</var>
+</pre>
+
+<p>Make sure you restart the relvant servers/fpm after changing php.ini</p>
+
+<p>The other common reason for source code to be displayed is that you forgot to add "-D PHP5" to <path>/etc/conf.d/apache2</path> as described above.</p>
+
+</body>
+</section>
+</chapter>
+
<chapter>
<title>Further reading</title>
<section>
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-06-05 12:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-13 15:21 [gentoo-commits] proj/php:master commit in: docs/ Ole Markus With
-- strict thread matches above, loose matches on Subject: below --
2011-02-13 15:21 Ole Markus With
2011-02-13 15:21 Ole Markus With
2011-02-13 15:45 Ole Markus With
2011-02-15 17:39 Ole Markus With
2011-06-05 12:29 Ole Markus With
2011-06-05 12:29 Ole Markus With
2011-06-05 12:29 Ole Markus With
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox