<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1043616" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1043616</link>
    <description></description>
    <language>en</language>
          <item>
    <title>What is PHP? Sorry I am</title>
    <link>https://www.webmaster-forums.net/server-management/php-error-logs#comment-1270511</link>
    <description> &lt;p&gt;What is PHP? Sorry I am really trying to learn about all this stuff with no success.&lt;/p&gt;
 </description>
     <pubDate>Thu, 17 Nov 2011 17:33:17 +0000</pubDate>
 <dc:creator>Michelle.Janson7</dc:creator>
 <guid isPermaLink="false">comment 1270511 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Hi, newbie here with a</title>
    <link>https://www.webmaster-forums.net/server-management/php-error-logs#comment-1267688</link>
    <description> &lt;p&gt;Hi, newbie here with a question about the location of the PHP error log. &lt;/p&gt;
&lt;p&gt;In my php.ini file, the &quot;error_log&quot; value was blank, but the error log which became (according to some other forum) means that the errors that have occurred in the system log file. However, I can not find where you are. I looked in var / logs, but have not found anything related to PHP-info. &lt;/p&gt;
&lt;p&gt;Does anyone know where PHP errors are logged when no log file to set the location of PHP? Any help would be greatly appreciated. Thanks! &lt;/p&gt;
&lt;p&gt;* EDIT: Gah, it seems I was wrong - errors are saved in the system log if you set &quot;error_log = syslog&quot; in php.ini. I guess this means that PHP errors are not recorded anywhere. Can anyone confirm this?&lt;/p&gt;
 </description>
     <pubDate>Mon, 01 Aug 2011 08:28:01 +0000</pubDate>
 <dc:creator>SEO Company</dc:creator>
 <guid isPermaLink="false">comment 1267688 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Very rarely do you see</title>
    <link>https://www.webmaster-forums.net/server-management/php-error-logs#comment-1267338</link>
    <description> &lt;p&gt;Very rarely do you see errors, warnings and notices anyway. On the rare occasions they tend to stop PHP with a fatal mistake for something stupid like miss a brace end a lot of if / elses, or the last parenthesis of a function within an IS. So a quick look at the error log is easier to log into Plesk / Cpanel and searching the error log section IMO.&lt;/p&gt;
 </description>
     <pubDate>Sat, 23 Jul 2011 03:59:00 +0000</pubDate>
 <dc:creator>BruceWilliO</dc:creator>
 <guid isPermaLink="false">comment 1267338 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I dont know php. will learn.</title>
    <link>https://www.webmaster-forums.net/server-management/php-error-logs#comment-1266816</link>
    <description> &lt;p&gt;I dont know php. will learn. hope the notes posted above will help in future.&lt;br /&gt;
Thanks in advance who all have posted&lt;/p&gt;
 </description>
     <pubDate>Sat, 09 Jul 2011 10:33:05 +0000</pubDate>
 <dc:creator>ytntr</dc:creator>
 <guid isPermaLink="false">comment 1266816 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I don&#039;t know php error logs</title>
    <link>https://www.webmaster-forums.net/server-management/php-error-logs#comment-1264938</link>
    <description> &lt;p&gt;I don&#039;t know php error logs so,Thanks for sharing the information.&lt;/p&gt;
 </description>
     <pubDate>Thu, 12 May 2011 10:26:04 +0000</pubDate>
 <dc:creator>shrikant47</dc:creator>
 <guid isPermaLink="false">comment 1264938 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I think the error based on</title>
    <link>https://www.webmaster-forums.net/server-management/php-error-logs#comment-1263012</link>
    <description> &lt;p&gt;I think the error based on phone records are easier for development. When coding, the FTP client is generally open in the directory for the files you are working, allowing rapid access to the error log for errors specific to the files you are currently working.&lt;/p&gt;
 </description>
     <pubDate>Fri, 18 Mar 2011 10:40:45 +0000</pubDate>
 <dc:creator>andrewmartin9</dc:creator>
 <guid isPermaLink="false">comment 1263012 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Step-By-Step: How to enable</title>
    <link>https://www.webmaster-forums.net/server-management/php-error-logs#comment-1240586</link>
    <description> &lt;p&gt;&lt;strong&gt;Step-By-Step:&lt;/strong&gt; How to enable PHP error logging to the directory where the error happens, on Virtuozzo containers, on per vhost basis&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Apache and PHP are already running so installing them is unnecessary &lt;/li&gt;
&lt;li&gt;Install SuPHP in force or paranoic mode. The safest way is to configure and compile it by your own, because RPM/Yum will install it in a way you will not be able to continue. Also, in Yum&#039;s case you will also have to enable Atomic package support.&lt;/li&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Building manually&lt;/strong&gt;. Download suphp from its official site using wget for example, to a directory where you have building permissions. I usually use the /usr/src/ directory for this purpose:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;cd /usr/src/&lt;br /&gt;wget http://www.suphp.org/download/suphp-0.7.1.tar.gz&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&quot;untar&quot; the object, then navigate in the directory which has been created&lt;/li&gt;
&lt;li&gt;Configure to prepare installing:&lt;br /&gt;
&lt;code&gt;./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=paranoid --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable-SUPHP_USE_USERGROUP=yes&lt;/code&gt;&lt;br /&gt;
The &quot;paranoid&quot; mode is quite important, as well as the &quot;apr&quot; directive&lt;/li&gt;
&lt;li&gt;If there wasn&#039;t any issue, finish installation:&lt;br /&gt;
&lt;code&gt;make &amp;amp;&amp;amp; make install&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;At this point suPHP is installed on your server but no one makes use of it since apache doesn&#039;t know about it. Fixing this is easy as 123: navigate to apache&#039;s conf.d directory, create a file named mod_suphp.conf and place the below line in it:&lt;br /&gt;
&lt;code&gt;LoadModule suphp_module modules/mod_suphp.so&lt;/code&gt; Alternatively, you can put this line in any *.conf you want, even in httpd.conf in the appropriate place (where the modules are  loaded to not create a mess)&lt;/li&gt;
&lt;li&gt;Usually, when you install suPHP a file named suphp.conf is also created in the place where you have specified when you configured the script:&lt;br /&gt;
&lt;code&gt;sysconfdir=/etc&lt;/code&gt;&lt;br /&gt;
open it up, and make adjustments if you want/need, I use this config:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;[global]&lt;br /&gt;logfile=/var/log/httpd/suphp_log&lt;br /&gt;loglevel=warn&lt;br /&gt;webserver_user=apache&lt;br /&gt;docroot=/var/www/vhosts&lt;br /&gt;env_path=/bin:/usr/bin&lt;br /&gt;umask=0077&lt;br /&gt;min_uid=500&lt;br /&gt;min_gid=500&lt;br /&gt;&lt;br /&gt;; Security options&lt;br /&gt;allow_file_group_writeable=false&lt;br /&gt;allow_file_others_writeable=false&lt;br /&gt;allow_directory_group_writeable=false&lt;br /&gt;allow_directory_others_writeable=false&lt;br /&gt;&lt;br /&gt;;Check wheter script is within DOCUMENT_ROOT&lt;br /&gt;check_vhost_docroot=true&lt;br /&gt;&lt;br /&gt;;Send minor error messages to browser&lt;br /&gt;errors_to_browser=false&lt;br /&gt;&lt;br /&gt;[handlers]&lt;br /&gt;;Handler for php-scripts&lt;br /&gt;x-httpd-php=&amp;quot;php:/usr/bin/php-cgi&amp;quot;&lt;br /&gt;&lt;br /&gt;;Handler for CGI-scripts&lt;br /&gt;x-suphp-cgi=&amp;quot;execute:!self&amp;quot;&lt;/code&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Now the vhost you want to enable suPHP on. Navigate to it, enter the directory named &quot;conf&quot;, inside that create a file named &quot;vhost.conf&quot;:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;cd /var/www/vhosts/example.com/&lt;br /&gt;cd conf&lt;br /&gt;touch vhost.conf&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
Put the following inside the vhost.conf:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;IfModule mod_suphp.c&amp;gt;&lt;br /&gt;&amp;lt;Directory &amp;quot;/var/www/vhosts/example.com/httpdocs/&amp;quot;&amp;gt;&lt;br /&gt;php_admin_flag engine on&lt;br /&gt;suPHP_Engine On&lt;br /&gt;suPHP_ConfigPath &amp;quot;/var/www/vhosts/example.com/etc/&amp;quot;&lt;br /&gt;AddHandler x-httpd-php .php&lt;br /&gt;AddHandler php5-script .php&lt;br /&gt;AddHandler x-httpd-php .php .php5 .php4 .php3 .phtml&lt;br /&gt;suPHP_AddHandler x-httpd-php&lt;br /&gt;suPHP_AddHandler php5-script .php&lt;br /&gt;&lt;br /&gt;suPHP_UserGroup YOUR_FTP_USER psacln&lt;br /&gt;&lt;br /&gt;php_value open_basedir &amp;quot;/tmp/&amp;quot;&lt;br /&gt;php_value upload_tmp_dir &amp;quot;/var/www/vhosts/example.com/tmp/&amp;quot;&lt;br /&gt;&lt;br /&gt;&amp;lt;Files php.ini&amp;gt;&lt;br /&gt;order allow,deny&lt;br /&gt;deny from all&lt;br /&gt;php_value open_basedir &amp;quot;/tmp/&amp;quot;&lt;br /&gt;php_value upload_tmp_dir &amp;quot;/var/www/vhosts/example.com/tmp/&amp;quot;&lt;br /&gt;&amp;lt;/Files&amp;gt;&lt;br /&gt;&amp;lt;/Directory&amp;gt;&lt;br /&gt;&amp;lt;/IfModule&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Let&#039;s create a php.ini in your vhost&#039;s etc directory. If you don&#039;t wish to create one, PHP will use the default one; in this case you will have to modify the original php.ini.&lt;br /&gt;
Since there&#039;s already a working php.ini, we can safely copy that to the vhost&#039;s etc directory and use that:&lt;br /&gt;
&lt;code&gt;cp /etc/php.ini /var/www/vhosts/example.com/etc/php.ini&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Open up the php.ini you will gonna use and enter the following line in it:&lt;br /&gt;
&lt;code&gt;error_log = error_log&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;And finally, restart the webserver:&lt;br /&gt;
&lt;code&gt;httpd -k restart&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Definitely not the best guide, but should work.&lt;/p&gt;
 </description>
     <pubDate>Sun, 19 Apr 2009 06:04:11 +0000</pubDate>
 <dc:creator>methode</dc:creator>
 <guid isPermaLink="false">comment 1240586 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Greg K, not you , that was</title>
    <link>https://www.webmaster-forums.net/server-management/php-error-logs#comment-1240585</link>
    <description> &lt;p&gt;Greg K, not you &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;, that was directed towards Shaggy. I really don&#039;t like the &quot;impossible&quot; word when we talk about Unix-like or Unix systems, because even if seemingly something is impossible, you touch a c script, open it up with vi and when you&#039;re finished gcc does the rest, and your issue is solved.&lt;/p&gt;
&lt;p&gt;I code rarely, but Greg usually messes with PHP all day long, and if he got used to error reporting to the dir where the error happens, why forcing him to get used to a new system? Instead I try to create an environment exactly or at least very similar to the one he is used to.&lt;br /&gt;
When you have to get used to new environments, you loose efficiency and that&#039;s not good.&lt;/p&gt;
 </description>
     <pubDate>Sun, 19 Apr 2009 05:18:54 +0000</pubDate>
 <dc:creator>methode</dc:creator>
 <guid isPermaLink="false">comment 1240585 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>The error logs are viewable,</title>
    <link>https://www.webmaster-forums.net/server-management/php-error-logs#comment-1240581</link>
    <description> &lt;p&gt;The error logs are viewable, but htaccess resolves that:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;files error_log&amp;gt;&lt;br /&gt;order allow,deny&lt;br /&gt;deny from all&lt;br /&gt;&amp;lt;/files&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I find directory based error logs are easier for development. When coding, the FTP client is generally open in the dir for the files being worked on, allowing quick access to the error log for errors specific to the files you are currently working on.&lt;/p&gt;
&lt;p&gt;I very rarely get errors, warnings or notices anyway.&lt;br /&gt;
On the rare occasions it tends to be that PHP halts with a fatal error for something stupid like I miss of a final brace to a bunch of if/elses, or the last parenthesis to a function within an IF.&lt;br /&gt;
So a quick glance at the error log is easier than logging into plesk/cpanel and browsing to the error log section IMO.&lt;br /&gt;
Also, I delete error logs after reading them, and when I save the file I&#039;m working on, the dir in ftp reloads automatically, revealing an error log if there was something I missed. &lt;/p&gt;
&lt;p&gt;As you said though, each to their own, we all work differently.&lt;br /&gt;
As long as live sites don&#039;t have output to the screen generally things are ok. Although a Google search shows plenty of people don&#039;t turn screen error reporting off. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/doh.png&quot; title=&quot;Doh!&quot; alt=&quot;Doh!&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Cheers for the help!&lt;/p&gt;
 </description>
     <pubDate>Sun, 19 Apr 2009 00:45:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1240581 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>No offence taken, to each</title>
    <link>https://www.webmaster-forums.net/server-management/php-error-logs#comment-1240580</link>
    <description> &lt;p&gt;No offence taken, to each their own setup, just IMO makes the server messier with possible error messages all over. If I have a script in one directory, and it includes 2 or 3 other scripts from other locations, I wouldn&#039;t want to be going checking all those directories to find the one that the error occurred at, i prefer just to tail the domain&#039;s error_log&lt;/p&gt;
&lt;p&gt;Thank you for sharing how you achieved it though&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
&lt;p&gt;PS. what permissions are on the error logs? If i go to your site and see  /members/login.php   Would I be able to just browser to /members/error_log and see errors that were generated in the past? (potentially showing info you wouldn&#039;t want people to see.&lt;/p&gt;
 </description>
     <pubDate>Sat, 18 Apr 2009 22:11:39 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1240580 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
