<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Takahisa's Weblog &#187; php</title>
	<atom:link href="http://takahisa.info/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://takahisa.info</link>
	<description>weblog of lifetips?</description>
	<lastBuildDate>Fri, 02 Sep 2011 18:27:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>mod_php and suphp at same time</title>
		<link>http://takahisa.info/2010/03/11/mod_php-and-suphp-at-same-time/</link>
		<comments>http://takahisa.info/2010/03/11/mod_php-and-suphp-at-same-time/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 05:21:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[suphp]]></category>

		<guid isPermaLink="false">http://takahisa.info/?p=245</guid>
		<description><![CDATA[/etc/suphp.conf [global] logfile=/var/log/httpd/suphp_log loglevel=warn webserver_user=apache docroot=/home env_path=/bin:/usr/bin umask=0077 min_uid=500 min_gid=500 ; Security options allow_file_group_writeable=false allow_file_others_writeable=false allow_directory_group_writeable=false allow_directory_others_writeable=false ;Check wheter script is within DOCUMENT_ROOT check_vhost_docroot=false ;Send minor error messages to browser errors_to_browser=true [handlers] ;Handler for php-scripts ;x-httpd-php=php:/usr/bin/php x-httpd-php=&#34;php:/usr/bin/php-cgi&#34; ;Handler for CGI-scripts x-suphp-cgi=execute:!self /etc/httpd/conf.d/su.php # This is the Apache server configuration file providing suPHP support. # It [...]]]></description>
			<content:encoded><![CDATA[<p>/etc/suphp.conf</p>
<p class="code">  [global]<br />
  logfile=/var/log/httpd/suphp_log<br />
  loglevel=warn<br />
  webserver_user=apache<br />
  docroot=/home<br />
  env_path=/bin:/usr/bin<br />
  umask=0077<br />
  min_uid=500<br />
  min_gid=500<br />
  ; Security options<br />
  allow_file_group_writeable=false<br />
  allow_file_others_writeable=false<br />
  allow_directory_group_writeable=false<br />
  allow_directory_others_writeable=false<br />
  ;Check wheter script is within DOCUMENT_ROOT<br />
  check_vhost_docroot=false<br />
  ;Send minor error messages to browser<br />
  errors_to_browser=true<br />
  [handlers]<br />
  ;Handler for php-scripts<br />
  ;x-httpd-php=php:/usr/bin/php<br />
  x-httpd-php=&quot;php:/usr/bin/php-cgi&quot;<br />
  ;Handler for CGI-scripts<br />
x-suphp-cgi=execute:!self</p>
<p>/etc/httpd/conf.d/su.php</p>
<p class="code"># This is the Apache server configuration file providing suPHP support.<br />
  # It contains the configuration directives to instruct the server how to<br />
  # serve php pages while switching to the user context before rendering.<br />
  LoadModule suphp_module modules/mod_suphp.so<br />
  # This option tells mod_suphp if a PHP-script requested on this server (or<br />
  # VirtualHost) should be run with the PHP-interpreter or returned to the<br />
  # browser &quot;as it is&quot;.<br />
  #suPHP_Engine on<br />
  # Disable php when suphp is used, to avoid having both.<br />
  #&lt;IfModule mod_php5.c&gt;<br />
  #php_admin_flag engine off<br />
  #&lt;/IfModule&gt;<br />
  #&lt;IfModule mod_php4.c&gt;<br />
  #php_admin_flag engine off<br />
  #&lt;/IfModule&gt;<br />
  # To use suPHP to parse PHP-Files<br />
  #AddHandler x-httpd-php .php<br />
  #AddHandler x-httpd-php .php .php4 .php3 .phtml<br />
  # This option tells mod_suphp which path to pass on to the PHP-interpreter<br />
  # (by setting the PHPRC environment variable).<br />
  # Do *NOT* refer to a file but to the directory the file resides in.<br />
  #<br />
  # E.g.: If you want to use &quot;/path/to/server/config/php.ini&quot;, use &quot;suPHP_Config<br />
  # /path/to/server/config&quot;.<br />
  #<br />
  # If you don&#8217;t use this option, PHP will use its compiled in default path.<br />
  # suPHP_ConfigPath /etc<br />
  # If you compiled suphp with setid-mode &quot;force&quot; or &quot;paranoid&quot;, you can<br />
  # specify the user- and groupname to run PHP-scripts with.<br />
  # Example: suPHP_UserGroup foouser bargroup<br />
  # suPHP_UserGroup apache apache<br />
  # This option tells mod_suphp to handle requests with the type &lt;mime-type&gt;.<br />
  # Please note this only works, if an action for the handler is specified<br />
  # in the suPHP configuration file.<br />
  #suPHP_AddHandler x-httpd-php<br />
  # This option tells mod_suphp to NOT handle requests with the type &lt;mime-type&gt;.<br />
# suPHP_RemoveHandler &lt;mime-type&gt;</p>
<p>Usege example</p>
<p class="code">&lt;VirtualHost 192.168.1.10:80&gt;<br />
  SuexecUserGroup &quot;#500&quot; &quot;#500&quot;<br />
  ServerName example.com<br />
  ServerAlias www.example.com<br />
  DocumentRoot /home/example.com/public_html<br />
  suPHP_Engine on<br />
  AddHandler x-httpd-php .php<br />
  AddHandler x-httpd-php .php .php4 .php3 .phtml<br />
  suPHP_AddHandler x-httpd-php<br />
  suPHP_UserGroup example.com example.com<br />
  &lt;Directory /home/example.com/public_html&gt;<br />
  allow from all<br />
  &lt;/Directory&gt;<br />
  DirectoryIndex index.htm index.html index.php<br />
  &lt;/VirtualHost&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://takahisa.info/2010/03/11/mod_php-and-suphp-at-same-time/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>suPHP parents directory is not own by defined user or root</title>
		<link>http://takahisa.info/2010/03/11/suphp-parents-directory-is-not-own-by-defined-user-or-root/</link>
		<comments>http://takahisa.info/2010/03/11/suphp-parents-directory-is-not-own-by-defined-user-or-root/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 05:11:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[suphp]]></category>

		<guid isPermaLink="false">http://takahisa.info/?p=242</guid>
		<description><![CDATA[root at server1:/root/suPHP/suphp-0.6.3/src# diff -u ./Application.cpp ./Application.cpp-dist &#8212; ./Application.cpp 2008-04-24 15:21:20.000000000 -0700 +++ ./Application.cpp-dist 2008-03-30 04:43:38.000000000 -0700 @@ -492,14 +492,12 @@ directory = directory.getParentDirectory(); UserInfo directoryOwner = directory.getUser(); -#ifndef OPT_USERGROUP_OWNER if (directoryOwner != owner &#038;&#038; !directoryOwner.isSuperUser()) { std::string error = &#8220;Directory &#8221; + directory.getPath() + &#8221; is not owned by &#8221; + owner.getUsername(); logger.logWarning(error); throw [...]]]></description>
			<content:encoded><![CDATA[<p>root at server1:/root/suPHP/suphp-0.6.3/src# diff -u ./Application.cpp<br />
./Application.cpp-dist<br />
&#8212; ./Application.cpp   2008-04-24 15:21:20.000000000 -0700<br />
+++ ./Application.cpp-dist      2008-03-30 04:43:38.000000000 -0700<br />
@@ -492,14 +492,12 @@<br />
         directory = directory.getParentDirectory();</p>
<p>         UserInfo directoryOwner = directory.getUser();<br />
-#ifndef OPT_USERGROUP_OWNER<br />
         if (directoryOwner != owner &#038;&#038; !directoryOwner.isSuperUser()) {<br />
             std::string error = &#8220;Directory &#8221; + directory.getPath()<br />
                 + &#8221; is not owned by &#8221; + owner.getUsername();<br />
             logger.logWarning(error);<br />
             throw SoftException(error, __FILE__, __LINE__);<br />
         }<br />
-#endif</p>
<p>         if (!directory.isSymlink()<br />
             &#038;&#038; !config.getAllowDirectoryGroupWriteable()</p>
<p>Originally found at https://lists.marsching.com/pipermail/suphp/2008-April/001831.html</p>
]]></content:encoded>
			<wfw:commentRss>http://takahisa.info/2010/03/11/suphp-parents-directory-is-not-own-by-defined-user-or-root/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install/upgrade to php 5.2.5 on Centos4</title>
		<link>http://takahisa.info/2009/01/18/installupgrade-to-php-525-on-centos4/</link>
		<comments>http://takahisa.info/2009/01/18/installupgrade-to-php-525-on-centos4/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 12:21:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos4]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://takahisa.info/?p=187</guid>
		<description><![CDATA[1, Get FedoraCore php src rpm   -&#62; http://ftp.riken.jp/Linux/fedora/releases/9/Fedora/source/SRPMS/ 2, Install php 5.2.5.src.rpm, and modify spec root@ns99 ~# rpm -ivh php-5.2.5-7.fc9.src.rpm root@ns99 SPECS#cd /usr/src/redhat/SPECS replace php.spec as provide here. &#8221; it for avoid error on php test step&#8221; Download php.spec here 3, build rpm and install If any package need for dependency, install before build rpm.   root@ns99 SPECS#rpmbuild &#8211;bb [...]]]></description>
			<content:encoded><![CDATA[<p>1, Get FedoraCore php src rpm<br />
  -&gt;<a title="download rpm" href=" http://ftp.riken.jp/Linux/fedora/releases/9/Fedora/source/SRPMS/" target="_blank"> http://ftp.riken.jp/Linux/fedora/releases/9/Fedora/source/SRPMS/</a><br />
2, Install php 5.2.5.src.rpm, and modify spec</p>
<p class="code"><span style="color: #ff0000;">root@</span><span style="color: #ff0000;">ns99 </span><span style="color: #3366ff;">~</span><span style="color: #3366ff;"># </span>rpm -ivh php-5.2.5-7.fc9.src.rpm<br />
<span style="color: #ff0000;">root@</span><span style="color: #ff0000;">ns99</span> <span style="color: #3366ff;">SPECS</span><span style="color: #3366ff;">#</span>cd /usr/src/redhat/SPECS</p>
<p>replace php.spec as provide here. &#8221; it for avoid error on php test step&#8221;<br />
<a title="download php.spec" href="http://takahisa.info/download/php.spec" target="_blank"> Download php.spec here</a></p>
<p>3, build rpm and install<br />
If any package need for dependency, install before build rpm. </p>
<p class="code"><span style="color: #ff0000;"> </span><span style="color: #ff0000;">root@ns99</span> <span style="color: #3366ff;">SPECS</span>#rpmbuild &#8211;bb php.spec<br />
 <span style="color: #ff0000;">root@ns99</span> <span style="color: #3366ff;">SPECS</span><span style="color: #3366ff;">#</span>cd ../RPMS/i386/<br />
 <span style="color: #ff0000;">root@ns99</span> <span style="color: #3366ff;">i38<span style="color: #3366ff;">6</span></span><span style="color: #3366ff;">#</span> rpm -Uvh php-common-5.2.5-7.i386.rpm php-mysql-5.2.5-7.i386.rpm php-debuginfo-5.2.5-7.i386.rpm  php-ncurses-5.2.5-7.i386.rpm php-devel-5.2.5-7.i386.rpm php-odbc-5.2.5-7.i386.rpm php-pdo-5.2.5-7.i386.rpm php-gd-5.2.5-7.i386.rpm php-pgsql-5.2.5-7.i386.rpm php-imap-5.2.5-7.i386.rpm php-snmp-5.2.5-7.i386.rpm php-ldap-5.2.5-7.i386.rpm php-5.2.5-7.i386.rpm php-mbstring-5.2.5-7.i386.rpm php-bcmath-5.2.5-7.i386.rpm php-mcrypt-5.2.5-7.i386.rpm php-xml-5.2.5-7.i386.rpm php-cli-5.2.5-7.i386.rpm php-mhash-5.2.5-7.i386.rpm php-xmlrpc-5.2.5-7.i386.rpm</p>
]]></content:encoded>
			<wfw:commentRss>http://takahisa.info/2009/01/18/installupgrade-to-php-525-on-centos4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>install Apache2 + php5 + mysql on gentoo</title>
		<link>http://takahisa.info/2008/12/29/install-apache2-php5-mysql-on-gentoo/</link>
		<comments>http://takahisa.info/2008/12/29/install-apache2-php5-mysql-on-gentoo/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 16:04:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://takahisa.info/?p=167</guid>
		<description><![CDATA[Install apache2 with php, mysql and ssl 1, Modify /etc/make.conf add those use flag : apache2 ssl pam xml xml2 pcre session unicode php mysql innodb berkdb ns2 ~ # emerge apache mysql php &#8230;&#8230;&#8230; when it done ns2 ~ # /usr/bin/mysql_install_db ns2 ~ # /etc/init.d/apache restart &#38;&#38; rc-update add apache default]]></description>
			<content:encoded><![CDATA[<p>Install apache2 with php, mysql and ssl</p>
<p><em>1, Modify /etc/make.conf</em><br />
add those use flag : apache2 ssl pam xml xml2 pcre session unicode php mysql innodb berkdb</p>
<p class="code"><span style="color: #ff0000;">ns2</span> <span style="color: #3366ff;">~ #</span> emerge apache mysql php<br />
&#8230;&#8230;&#8230; when it done<br />
<span style="color: #ff0000;">ns2</span> <span style="color: #3366ff;">~ # <span style="color: #000000;">/usr/bin/mysql_install_db<br />
<span style="color: #ff0000;">ns2</span> <span style="color: #3366ff;">~ # </span><span style="color: #000000;">/etc/init.d/apache restart &amp;&amp; rc-update add apache default</span></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://takahisa.info/2008/12/29/install-apache2-php5-mysql-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

