<?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>x83.net &#187; suphp</title>
	<atom:link href="http://www.x83.net/tag/suphp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 13:53:33 +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>Installing mod_suphp</title>
		<link>http://www.x83.net/installing-mod_suphp/</link>
		<comments>http://www.x83.net/installing-mod_suphp/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 22:32:21 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[chown]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[mod_suphp]]></category>
		<category><![CDATA[suphp]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=715</guid>
		<description><![CDATA[Usually if you add a simple VirtualHost and set the DocumentRoot into on /home/ then its possible for some files not to be owned by that (e.g: uploaded images via web interface, php sessions..etc). A solution for this problem is to install mod_suphp which will make Apache to write in /home/ with permissions. To install [...]]]></description>
			<content:encoded><![CDATA[<p>Usually if you add a simple VirtualHost and set the <strong>DocumentRoot </strong>into on /home/<user> then its possible for some files not to be owned by that <user> (e.g: uploaded images via web interface, php sessions..etc).</p>
<p>A solution for this problem is to install mod_suphp which will make Apache to write in /home/<user> with <user> permissions. To install mod_suphp :</p>
<p><code> Download http://www.suphp.org/download/suphp-0.7.1.tar.gz<br />
tar zxvf suphp-0.7.1.tar.gz<br />
cd suphp-0.7.1<br />
yum install httpd-devel<br />
./configure --with-apxs=/usr/sbin/apxs --with-apache-user=httpd --with-logfile=/var/log/httpd/suphp.log --with-setid-mode=paranoid --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-php=/usr/bin/php-cgi --enable-SUPHP_USE_USERGROUP=yes<br />
make<br />
make install<br />
cd /etc/httpd/conf.d/<br />
mv php.conf php.conf.bk<br />
</code></p>
<p>Then create <strong>suphp.conf </strong>and put in it:<br />
<code><br />
LoadModule suphp_module modules/mod_suphp.so<br />
suPHP_Engine on<br />
AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml<br />
<Directory /><br />
    suPHP_AddHandler application/x-httpd-php5<br />
</Directory></code></p>
<p>Then create <strong>/etc/suphp.conf</strong> and put in it:</p>
<p><code>; This file is parse anew by suPHP for each request<br />
; rather than being loaded once.</p>
<p>[global]<br />
;Path to logfile<br />
logfile=/var/log/httpd/suphp.log</p>
<p>;Loglevel<br />
loglevel=info</p>
<p>;User Apache is running as<br />
; MANDATORY<br />
webserver_user=apache</p>
<p>; Path all scripts have to be in<br />
; This works as a prefix when a trailing slash is not specified.<br />
; e.g. /home will match /home /home2 /home3 etc While /home/ will only match /home/<br />
;<br />
; Changing this to a more specific path will improve security<br />
docroot=/</p>
<p>;Path to chroot() to before executing script<br />
;chroot=/home</p>
<p>; Security options<br />
allow_file_group_writeable=true<br />
allow_file_others_writeable=true<br />
allow_directory_group_writeable=true<br />
allow_directory_others_writeable=true</p>
<p>; Check whether script is within DOCUMENT_ROOT<br />
; Does NOT perform this check on included scripts.<br />
; i.e. include_once("/test3.php"); works even though it's in the root directory<br />
;<br />
; Changing this to true will improve security but make all php userdir requests fail<br />
check_vhost_docroot=false</p>
<p>; Allow the user and group specified by a ~userdir request to override the<br />
; suPHP_UserGroup directive inside the source virtualhost<br />
;<br />
; Changing this to false will improve security but make some types of php userdir<br />
; requests fail<br />
;userdir_overrides_usergroup=true</p>
<p>; suPHP Paranoid mode checks that the target script UID and GID match<br />
; the UID and GID of the user running the script.  To disable these<br />
; checks change the following values to false.  Without these checks, mod_suphp<br />
; is effectively running in "Force" mode.<br />
;paranoid_uid_check=true<br />
;paranoid_gid_check=true</p>
<p>;Send minor error messages to browser<br />
errors_to_browser=false</p>
<p>;PATH environment variable<br />
env_path="/bin:/usr/bin"</p>
<p>;Umask to set, specify in octal notation<br />
umask=0022</p>
<p>; Minimum UID<br />
;min_uid=100</p>
<p>; Minimum GID<br />
;min_gid=100</p>
<p>; Normally suPHP only displays the PHP binary in process lists (ps aux).<br />
; Setting this option to 'true' will cause suPHP to display both the<br />
; PHP binary and the script filename.<br />
;full_php_process_display=true</p>
<p>[handlers]<br />
;Handler for php-scripts<br />
application/x-httpd-php="php:/usr/bin/php-cgi"<br />
application/x-httpd-php4="php:/usr/php4/bin/php-cgi"<br />
application/x-httpd-php5="php:/usr/bin/php-cgi"</p>
<p>;Handler for CGI-scripts<br />
;x-suphp-cgi="execute:!self"</p>
<p>[phprc_paths]<br />
;Uncommenting these will force all requests to that handler to use the php.ini<br />
;in the specified directory regardless of suPHP_ConfigPath settings.<br />
;application/x-httpd-php=/usr/local/lib/<br />
;application/x-httpd-php4=/usr/local/php4/lib/<br />
;application/x-httpd-php5=/usr/local/lib/</code></p>
<p>After this make sure that the VirtualHost contains :</p>
<p><code><br />
<IfModule mod_suphp.c><br />
                 suPHP_UserGroup user user<br />
    </IfModule></p>
<p>    <IfModule !mod_disable_suexec.c><br />
                SuexecUserGroup user user<br />
</IfModule></code></p>
<p>Also /etc/httpd/conf/httpd.conf should contain:</p>
<p><code>DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html<br />
</code></p>
<p>Finally do a <strong>service httpd restart</strong></p>
<p>Check /var/log/httpd/suphp.log and error_log for possible errors. In my case I noticed this:</p>
<blockquote><p>&#8220;[Fri Apr 22 14:36:55 2011] [warn] Mismatch between target UID (501) and UID (48) of file &#8220;/home/arpart/public_html/index.php&#8221;</p></blockquote>
<p>Which means that some files were not owned by <user>. Use <strong>chown -R user.user /home/user</strong> to fix the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/installing-mod_suphp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joomla with suPHP: Premature end of script headers: index.php</title>
		<link>http://www.x83.net/joomla-with-suphp-premature-end-of-script-headers-index-php/</link>
		<comments>http://www.x83.net/joomla-with-suphp-premature-end-of-script-headers-index-php/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 04:55:58 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[premature]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[script headers]]></category>
		<category><![CDATA[suphp]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=355</guid>
		<description><![CDATA[Got this error while I was trying to configure Joomla to work with suPHP. This is the config I`m using to make it work: ServerAdmin aa@aa.com ServerName www.site.org ServerAlias site.org DocumentRoot /home/virtuals/www.site.org/public_html/ ErrorLog /home/virtuals/www.site.org/logs/error.log CustomLog /home/virtuals/www.site.org/logs/access.log combined ServerSignature On php_admin_flag safe_mode Off php_admin_flag register_globals On php_admin_value open_basedir /home/virtuals/www.site.org/public_html:/tmp AllowOverride All Allow from All Options Indexes [...]]]></description>
			<content:encoded><![CDATA[<p>Got this error while I was trying to configure Joomla to work with suPHP. This is the config I`m using to make it work:</p>
<p><VirtualHost *:80><br />
        ServerAdmin aa@aa.com<br />
        ServerName www.site.org<br />
        ServerAlias site.org<br />
        DocumentRoot /home/virtuals/www.site.org/public_html/<br />
        ErrorLog /home/virtuals/www.site.org/logs/error.log<br />
        CustomLog /home/virtuals/www.site.org/logs/access.log combined<br />
        ServerSignature On<br />
        php_admin_flag safe_mode Off<br />
        php_admin_flag register_globals On<br />
        php_admin_value open_basedir /home/virtuals/www.site.org/public_html:/tmp</p>
<p></VirtualHost><br />
<Directory /home/virtuals/www.site.org/public_html ><br />
    AllowOverride All<br />
    Allow from  All<br />
    Options Indexes FollowSymLinks<br />
</Directory><br />
<Directory "/home/virtuals/www.site.org/public_html"><br />
        <IfModule mod_suphp.c><br />
               php_admin_flag engine on<br />
               suPHP_Engine on<br />
               AddHandler php5-script .php<br />
               php_admin_flag engine on<br />
        </IfModule><br />
</Directory></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/joomla-with-suphp-premature-end-of-script-headers-index-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error : Database Error: Unable to connect to the database:The MySQL adapter &#8220;mysql&#8221; is not available.</title>
		<link>http://www.x83.net/error-database-error-unable-to-connect-to-the-databasethe-mysql-adapter-mysql-is-not-available/</link>
		<comments>http://www.x83.net/error-database-error-unable-to-connect-to-the-databasethe-mysql-adapter-mysql-is-not-available/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 04:31:09 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[suphp]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=353</guid>
		<description><![CDATA[Got this error : Database Error: Unable to connect to the database:The MySQL adapter &#8220;mysql&#8221; is not available. There are some reasons why this occurs: - php-mysql not installed - php admin flags wrong set - wrong suphp configuration, handlers should be: [handlers] ;Handler for php-scripts x-httpd-php=&#8221;php:/usr/bin/php&#8221; ;Handler for CGI-scripts x-suphp-cgi=&#8221;execute:!self&#8221;]]></description>
			<content:encoded><![CDATA[<p>Got this error :</p>
<p>Database Error: Unable to connect to the database:The MySQL adapter &#8220;mysql&#8221; is not available.</p>
<p>There are some reasons why this occurs:</p>
<p>- php-mysql not installed<br />
- php admin flags wrong set<br />
- wrong suphp configuration, handlers should be:</p>
<blockquote><p>[handlers]<br />
;Handler for php-scripts<br />
x-httpd-php=&#8221;php:/usr/bin/php&#8221;</p>
<p>;Handler for CGI-scripts<br />
x-suphp-cgi=&#8221;execute:!self&#8221;
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/error-database-error-unable-to-connect-to-the-databasethe-mysql-adapter-mysql-is-not-available/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Error: not within configured docroot</title>
		<link>http://www.x83.net/error-not-within-configured-docroot/</link>
		<comments>http://www.x83.net/error-not-within-configured-docroot/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 04:03:13 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[docroot]]></category>
		<category><![CDATA[suphp]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=350</guid>
		<description><![CDATA[Got this error these days : [Thu Jul 30 06:58:16 2009] [warn] Script &#8220;/home/virtuals/www.site.org/public_html/index.php&#8221; resolving to &#8220;/home/virtuals/www.site.org/public_html/index.php&#8221; not within configured docroot add docroot into your suphp.conf file and restart apache]]></description>
			<content:encoded><![CDATA[<p>Got this error these days :</p>
<p>[Thu Jul 30 06:58:16 2009] [warn] Script &#8220;/home/virtuals/www.site.org/public_html/index.php&#8221; resolving to &#8220;/home/virtuals/www.site.org/public_html/index.php&#8221; not within configured docroot</p>
<p>add docroot into your suphp.conf file and restart apache</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/error-not-within-configured-docroot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

