<?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>Linux Servers cPanel webhosting blog &#187; PHP</title>
	<atom:link href="http://www.theperfectarts.com/category/php-issue/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theperfectarts.com</link>
	<description>Basics cPanel tutorials / issue,mysql,php errors etc</description>
	<lastBuildDate>Wed, 08 Feb 2012 05:58:30 +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>Server wide permission issue after enabling suphp</title>
		<link>http://www.theperfectarts.com/2012/01/server-wide-permission-issue-after-enabling-suphp/</link>
		<comments>http://www.theperfectarts.com/2012/01/server-wide-permission-issue-after-enabling-suphp/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 09:24:01 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Basic Linux]]></category>
		<category><![CDATA[cPanel + cPanel scripts]]></category>
		<category><![CDATA[Dedicated Server Issue]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Linux Permissions]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[resolve 500 Internal Server Error]]></category>
		<category><![CDATA[scrip to correct ownership]]></category>
		<category><![CDATA[script to correct permission]]></category>
		<category><![CDATA[script to correct server wide permission]]></category>
		<category><![CDATA[script to correct user ownership]]></category>
		<category><![CDATA[script to resolve 500 internal server error]]></category>
		<category><![CDATA[script to resolve suphp issue]]></category>
		<category><![CDATA[Server wide .htacces php value issue]]></category>
		<category><![CDATA[Server wide ownership issue]]></category>
		<category><![CDATA[Server wide permission issue]]></category>
		<category><![CDATA[Server wide solution script]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1877</guid>
		<description><![CDATA[After enabling the suphp on the server,many time 500 Internal Server Error occur due to the incorrect permission,ownership and incorrect php module defined in the .htaccess file and we can&#8217;t make the changes manually therefore we can use the following script to make the all the changes server. Login into the server as a root user [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-1685490665026631";
/* Big images */
google_ad_slot = "0185136902";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-1685490665026631";
/* Big images */
google_ad_slot = "0185136902";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript">// <![CDATA[
            var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   </p>
<p>(function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = </p>
<p>('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = </p>
<p>document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script><br />
After enabling the suphp on the server,many time 500 Internal Server Error occur due to the incorrect permission,ownership and incorrect php module defined in the .htaccess file and we can&#8217;t make the changes manually therefore we can use the following script to make the all the changes server.</p>
<p>Login into the server as a root user and follow the followings steps.</p>
<blockquote><p>
<strong>linux7802@server[~]#cat /root/suphppermission.sh</strong></p>
<p><strong>#!/bin/bash</strong></p>
<p><strong># Reset the directory permissions.</strong><br />
<strong>chmod 755 /opt/suphp</strong><br />
<strong>find /opt/suphp -type d -exec chmod 755 {} \;</strong></p>
<p><strong># Reset permission,ownership for cPanel user</strong><br />
<strong>for user in `/bin/ls /var/cpanel/users`; do</strong></p>
<p><strong>chown -R ${user}:${user} /home/${user}/public_html</strong><br />
<strong> chmod 755 /home/${user}/public_html</strong><br />
<strong> find /home/${user}/public_html -type f -exec chmod 644 {} \;</strong><br />
<strong> find /home/${user}/public_html -type d -exec chmod 755 {} \;</strong></p>
<p><strong># Remove <strong>php_values in the .htaccess file</strong>.</strong><br />
<strong> find /home/${user}/public_html -name &#8216;.htaccess&#8217; -exec sed -ie &#8216;s/php_value/#php_value/&#8217; {} \;</strong><br />
<strong> find /home/${user}/public_html -name &#8216;.htaccess&#8217; -exec sed -ie &#8216;s/php_flag/#php_flag/&#8217; {} \;</strong><br />
<strong>done</strong></p></blockquote>
<p>If you have any issue to copy the above content the download the script from following URL<br />
<a title="scr" href="http://theperfectarts.com/permission.txt" target="_blank">scr</a></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/01/server-wide-permission-issue-after-enabling-suphp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disable php for single hosting account.</title>
		<link>http://www.theperfectarts.com/2010/05/disable-php-for-single-hosting-account/</link>
		<comments>http://www.theperfectarts.com/2010/05/disable-php-for-single-hosting-account/#comments</comments>
		<pubDate>Wed, 05 May 2010 12:46:31 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Enable private PHP]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Disable php]]></category>
		<category><![CDATA[php_value]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1010</guid>
		<description><![CDATA[We can disable the php for single hosting account by using following code in .htaccess file. php_value engine off &#169;2012 Linux Servers cPanel webhosting blog. All Rights Reserved..]]></description>
			<content:encoded><![CDATA[<p>We can disable the php for single hosting account by using following code in .htaccess file.</p>
<p><strong><code>php_value engine off</code></strong></p>
<input type="hidden" name="IL_RELATED_TAGS" value="1" />
<script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script></p>
<p><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2010/05/disable-php-for-single-hosting-account/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Parse error: syntax error, unexpected T_STRING?</title>
		<link>http://www.theperfectarts.com/2009/12/php-parse-error-syntax-error-unexpected-t_string/</link>
		<comments>http://www.theperfectarts.com/2009/12/php-parse-error-syntax-error-unexpected-t_string/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 05:26:24 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Basic Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Parse error]]></category>
		<category><![CDATA[PHP Parse error: syntax error]]></category>
		<category><![CDATA[php_flag short_open_tag X]]></category>
		<category><![CDATA[short_open_tag]]></category>
		<category><![CDATA[suexec]]></category>
		<category><![CDATA[unexpected T_STRING]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=795</guid>
		<description><![CDATA[If you receive following error in the error logs &#8221; PHP Parse error: syntax error, unexpected T_STRING&#8221; Then you can add following line in the .htaccess file php_flag short_open_tag X Or If your server is SuExec enabled then you can use following code in php.ini file short_open_tag = X &#169;2012 Linux Servers cPanel webhosting blog. [...]]]></description>
			<content:encoded><![CDATA[<p>If you receive following error in the error logs</p>
<p><span style="color: #800000;">&#8221; PHP Parse error: syntax error, unexpected T_STRING&#8221;</span><br />
Then you can add following line in the .htaccess file</p>
<p><span style="color: #800000;">php_flag short_open_tag X </span></p>
<p>Or</p>
<p>If your server is <a href="http://www.theperfectarts.com/2009/08/simply-check-server-is-suexec-or-not/" target="_blank">SuExec enabled </a>then you can use following code in php.ini file<br />
<span style="color: #800000;">short_open_tag = X</span><br />
<script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script></p>
<p><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2009/12/php-parse-error-syntax-error-unexpected-t_string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to access Awstats From Outside the control panel</title>
		<link>http://www.theperfectarts.com/2009/10/how-to-access-awstats-from-outside-the-control-panel/</link>
		<comments>http://www.theperfectarts.com/2009/10/how-to-access-awstats-from-outside-the-control-panel/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 04:30:42 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Third party script issue]]></category>
		<category><![CDATA[access awstats outside from cpanel]]></category>
		<category><![CDATA[configure awstat to browse from outside cPanel]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=294</guid>
		<description><![CDATA[How to access Awstats From Outside the control panel Accessing Awstats from outside the control panel is easy. Step 1. Download awstats from http://awstats.sourceforge.net Step 2. Uncompress awstats-5.6.tgz Step 3. Copy the contents of the uncompressed cgi-bin folder from your hard drive to the user cgi-bin directory (this includes awstats.pl, awstats.model.conf, and the lang, lib [...]]]></description>
			<content:encoded><![CDATA[<p>How to access Awstats From Outside the control panel</p>
<p>Accessing Awstats from outside the control panel is easy.</p>
<p>Step 1.<br />
Download awstats from http://awstats.sourceforge.net</p>
<p>Step 2.<br />
Uncompress awstats-5.6.tgz</p>
<p>Step 3.<br />
Copy the contents of the uncompressed cgi-bin folder from your hard drive to the user cgi-bin directory (this includes awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories).</p>
<p>Step 4.<br />
If necessary (should not be needed with most setups), edit the first (top-most) line of awstats.pl file that is<br />
#!/usr/bin/perl<br />
to reflect the path were your Perl interpreter is installed. Default value works for most of Unix OS, but it also might be #!/usr/local/bin/perl</p>
<p>Step 5.<br />
Move AWStats icon sub-directories and its content into a directory readable by your web server, for example /home/users/public_html/icons</p>
<p>Step 6.<br />
Copy awstats.model.conf file into a new file named awstats.myvirtualhostname.conf. This new file must be stored in /home/user/public_html/cgi-bin.</p>
<p>Step 7.<br />
Edit this new config file with your own setup :<br />
- Change LogFile value with full path of your web server log file (The path is: LogFile=&#8221;/usr/local/apache/domlogs/domain.com&#8221;).<br />
- Check if LogFormat has the value &#8220;1&#8243; (it means &#8220;NCSA apache combined/ELF/XLF log format&#8221;).<br />
- Change DirIcons parameter to reflect relative path of icon directory. (DirIcons=&#8221;/icons&#8221;)<br />
- Edit SiteDomain parameter with the main domain name or the intranet web server name used to reach the web site to analyze (Example: www.mydomain.com).</p>
<p>IMPORTANT!<br />
- Change DirData to use the same Statics file than Cpanel Awstats and do not loose any entry.<br />
(DirData=&#8221;/home/user/tmp/awstats/&#8221;)</p>
<p>Step 8.<br />
Access AwStats by the URL:<br />
www.yourdomain.com/</p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script></p>
<p><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2009/10/how-to-access-awstats-from-outside-the-control-panel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send mail by using phpmail function.</title>
		<link>http://www.theperfectarts.com/2009/09/send-mail-by-using-phpmail-function/</link>
		<comments>http://www.theperfectarts.com/2009/09/send-mail-by-using-phpmail-function/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 04:28:58 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[E-mails issue]]></category>
		<category><![CDATA[Enable private PHP]]></category>
		<category><![CDATA[Few good queries and suggestions]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[check phpmail() function]]></category>
		<category><![CDATA[enable or disable the phpmail() function]]></category>
		<category><![CDATA[not sure phpmail]]></category>
		<category><![CDATA[php form]]></category>
		<category><![CDATA[phpmail function]]></category>
		<category><![CDATA[PHPMAIL function solution]]></category>
		<category><![CDATA[phpmail() form]]></category>
		<category><![CDATA[phpmail() function issue]]></category>
		<category><![CDATA[phpmail() function problem]]></category>
		<category><![CDATA[phpmail() test script]]></category>
		<category><![CDATA[resolve phpmail() function issue]]></category>
		<category><![CDATA[simple php form]]></category>
		<category><![CDATA[simple phpmail function form]]></category>
		<category><![CDATA[simple phpmail() form]]></category>
		<category><![CDATA[test contact for phpmail() function]]></category>
		<category><![CDATA[what is phpmail]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=246</guid>
		<description><![CDATA[You can create a simple php mail form by using following code.. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#60;? $to      = &#8216;supp0rt@xyz.com&#8217;; $subject = &#8216;The test for mail function&#8217;; $message = &#8216;Hello&#8217;; $headers = &#8216;From: test@abc123.com&#8217; . &#8220;\r\n&#8221; . &#8216;Reply-To: test@testforever123.com&#8217; . &#8220;\r\n&#8221; . &#8216;X-Mailer: PHP/&#8217; . phpversion(); mail($to, $subject, $message, $headers); ?&#62; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; If you are not able to [...]]]></description>
			<content:encoded><![CDATA[<p>You can create a simple php mail form by using following code..</p>
<blockquote><p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong><span style="color: #800000;">&lt;?<br />
$to      = &#8216;supp0rt@xyz.com&#8217;;<br />
$subject = &#8216;The test for mail function&#8217;;<br />
$message = &#8216;Hello&#8217;;<br />
$headers = &#8216;From: test@abc123.com&#8217; . &#8220;\r\n&#8221; .<br />
&#8216;Reply-To: test@testforever123.com&#8217; . &#8220;\r\n&#8221; .<br />
&#8216;X-Mailer: PHP/&#8217; . phpversion();<br />
mail($to, $subject, $message, $headers);<br />
?&gt;</span></strong></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p></blockquote>
<p>If you are not able to receive the E-mail then you need to check whether your server is allowing to send an E-mail by using phpmail() or not?&#8217; if you are having root login then check the servers main php.ini file.</p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script></p>
<p><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<blockquote><p><strong><span style="color: #800000;">root@Gunjan []# php -i | grep php.ini<br />
Configuration File (php.ini) Path =&gt; /usr/local/lib<br />
Loaded Configuration File =&gt; /usr/local/lib/php.ini</span></strong></p>
<p><strong><span style="color: #800000;">root@Gunjan []# cat /usr/local/lib/php.ini | grep disable_function<br />
disable_functions=&#8221;system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,highlight_file,phpmail&#8221;</span></strong></p></blockquote>
<p>and remove the phpmail() from server mail php.ini file and restart the Apache web server.</p>
<p>Or</p>
<p>If you are not having root login details then contact your hosting provider and ask them to enable the phpmail() for your hosting account.</p>
<p>You can also send me an E-mail at nsk.gunjan@gmail.com if you have any queries&#8230;</p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2009/09/send-mail-by-using-phpmail-function/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP values you can change from .htaccess</title>
		<link>http://www.theperfectarts.com/2009/08/php-values-you-can-change-from-htaccess/</link>
		<comments>http://www.theperfectarts.com/2009/08/php-values-you-can-change-from-htaccess/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 01:04:51 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[change php value]]></category>
		<category><![CDATA[disaply_error]]></category>
		<category><![CDATA[htaccess for php value]]></category>
		<category><![CDATA[magic_quotes_gpc]]></category>
		<category><![CDATA[PHP values change by .htaccess.define PHP values from htaccess]]></category>
		<category><![CDATA[php_admin_flag safe_mode]]></category>
		<category><![CDATA[php_flag]]></category>
		<category><![CDATA[post_max_size]]></category>
		<category><![CDATA[register_globals]]></category>
		<category><![CDATA[session.bug_compat]]></category>
		<category><![CDATA[session.use_cookies]]></category>
		<category><![CDATA[session.use_only_cookies]]></category>
		<category><![CDATA[session.use_trans_sid]]></category>
		<category><![CDATA[upload_max_filesiz]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/2008/11/php-values-you-can-change-from-htaccess/</guid>
		<description><![CDATA[There are few good values which should be change for specific script. Use following code in .htaccess to changes the values as per your requirement. php_flag session.use_trans_sid off php_flag session.use_only_cookies on php_flag register_globals On php_value magic_quotes_runtime Off php_flag magic_quotes_gpc off php_admin_flag safe_mode Off php_value post_max_size 20971520 php_value upload_max_filesize 12M php_value max_execution_time 600 php_value magic_quotes_gpc off [...]]]></description>
			<content:encoded><![CDATA[<p>There are few good values which should be change for specific script. Use following code in .htaccess to changes the values as per your requirement.</p>
<p><strong><span style="color: #800000;">php_flag session.use_trans_sid off</span></strong><br />
<strong><span style="color: #800000;"> php_flag session.use_only_cookies on</span></strong><br />
<strong><span style="color: #800000;"> php_flag register_globals On</span></strong><br />
<strong><span style="color: #800000;"> php_value magic_quotes_runtime Off</span></strong><br />
<strong><span style="color: #800000;"> php_flag magic_quotes_gpc off</span></strong><br />
<strong><span style="color: #800000;"> php_admin_flag safe_mode Off</span></strong></p>
<p><strong><span style="color: #800000;">php_value post_max_size 20971520</span></strong><br />
<strong><span style="color: #800000;"> php_value upload_max_filesize 12M</span></strong><br />
<strong><span style="color: #800000;"> php_value max_execution_time 600</span></strong><br />
<strong><span style="color: #800000;"> php_value magic_quotes_gpc off</span></strong><br />
<strong><span style="color: #800000;"> php_flag session.bug_compat_warn off</span></strong><br />
<strong><span style="color: #800000;"> php_value session.use_cookies 1</span></strong><br />
<strong><span style="color: #800000;"> php_flag session.use_only_cookies 1</span></strong><br />
<script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script></p>
<p><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2009/08/php-values-you-can-change-from-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable private PHP Error Logging via .htaccess\disable PHP Error Logging for visitor</title>
		<link>http://www.theperfectarts.com/2009/08/enable-private-php-error-logging-via-htaccessdisable-php-error-logging-for-visitor/</link>
		<comments>http://www.theperfectarts.com/2009/08/enable-private-php-error-logging-via-htaccessdisable-php-error-logging-for-visitor/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 00:00:51 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[disable PHP Error Logging for visitor]]></category>
		<category><![CDATA[Enable private PHP Error Logging via .htaccess]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/2008/08/enable-private-php-error-logging-via-htaccessdisable-php-error-logging-for-visitor/</guid>
		<description><![CDATA[To hide PHP errors from visitors insert the following code in .htaccess # supress php errors php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off Once disable the error logs for visitors enable the private PHP error logging by using following code in .htaccess # enable PHP error logging php_flag log_errors on php_value error_log /home/path/public_html/domain/PHP_errors.log [...]]]></description>
			<content:encoded><![CDATA[<p>To hide PHP errors from visitors insert the following code in .htaccess</p>
<p><strong><span style="color: #800000;"># supress php errors</span></strong><br />
<strong><span style="color: #800000;"> php_flag display_startup_errors off</span></strong><br />
<strong><span style="color: #800000;"> php_flag display_errors off</span></strong><br />
<strong><span style="color: #800000;"> php_flag html_errors off</span></strong></p>
<p>Once disable the error logs for visitors enable the private PHP error logging by using following code in .htaccess</p>
<p><strong><span style="color: #800000;"># enable PHP error logging</span></strong><br />
<strong><span style="color: #800000;"> php_flag log_errors on</span></strong><br />
<strong><span style="color: #800000;"> php_value error_log /home/path/public_html/domain/PHP_errors.log</span></strong></p>
<p>The PHP_errors.log file needs to be permission 755 or 777.</p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script></p>
<p><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2009/08/enable-private-php-error-logging-via-htaccessdisable-php-error-logging-for-visitor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

