<?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>ThinkSupport.net - Outsourced Web Hosting Support, Cheap Server Management, Cheap Fully Managed Dedicated Servers, Software Development, Website Designing and SEO services, Vision Helpdesk Software &#187; PHP / Mysql</title>
	<atom:link href="http://www.thinksupport.net/blog/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.thinksupport.net/blog</link>
	<description>Outsourced Web Hosting and Software Development</description>
	<lastBuildDate>Tue, 01 Feb 2011 12:42:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Install Imagemagick / Imagick for PHP on CentOS Cpanel/Plesk</title>
		<link>http://www.thinksupport.net/blog/install-imagemagick-imagick-for-php-on-centos-cpanelplesk.html</link>
		<comments>http://www.thinksupport.net/blog/install-imagemagick-imagick-for-php-on-centos-cpanelplesk.html#comments</comments>
		<pubDate>Thu, 24 Apr 2008 12:52:19 +0000</pubDate>
		<dc:creator>Sunil</dc:creator>
				<category><![CDATA[PHP / Mysql]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[WHM/cPanel]]></category>

		<guid isPermaLink="false">http://thinksupport.net/blog/install-imagemagick-imagick-for-php-on-centos-cpanelplesk.html</guid>
		<description><![CDATA[Install Imagemagick / Imagick for PHP on CentOS Cpanel/Plesk Solution : For installing Imagick extension for PHP you have to install ImageMagick from source and Its a Must. Otherwise the extension for PHP wont compile. *# wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz* # tar zxf ImageMagick.tar.gz # cd ImageMagick-x.x.x # ./configure # make # make install Now download the [...]]]></description>
			<content:encoded><![CDATA[<p>Install Imagemagick / Imagick for PHP on CentOS Cpanel/Plesk</p>
<p>Solution : For installing Imagick extension for PHP you have to install ImageMagick from source and Its a Must. Otherwise the extension for PHP wont compile.</p>
<p>*# wget <a href="ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz*" rel="nofollow">ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz*</a><br />
<strong># tar zxf ImageMagick.tar.gz</strong><br />
<strong># cd ImageMagick-x.x.x</strong><br />
<strong># ./configure</strong><br />
<strong># make</strong><br />
<strong># make install</strong></p>
<p>Now download the Imagick extension source from <a href="http://pecl.php.net/package/imagick" rel="nofollow">http://pecl.php.net/package/imagick</a></p>
<p>*# wget <a href="http://pecl.php.net/get/imagick-x.x.x.tgz*" rel="nofollow">http://pecl.php.net/get/imagick-x.x.x.tgz*</a><br />
<strong># tar zxf imagick-x.x.x.tgz</strong><br />
<strong># cd imagick-x.x.x.tgz</strong><br />
<strong># phpize &amp;&amp; ./configure</strong></p>
<p>*** if you get an error which looks like this:</p>
<p>============================<br />
checking for PHP includes&#8230; -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext<br />
checking for PHP extension directory&#8230; /usr/lib64/php/modules<br />
checking for PHP installed headers prefix&#8230; /usr/include/php<br />
checking for re2c&#8230; no<br />
configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.<br />
checking for gawk&#8230; gawk<br />
checking whether to enable the magickwand extension&#8230; no<br />
<strong>configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.</strong><br />
============================</p>
<p>Solution : Install <strong>ImageMagick-devel</strong> package using &#8220;yum install ImageMagick-devel&#8221; and then continue</p>
<p><strong># make</strong><br />
<strong># make install</strong></p>
<p>This will make compile imagick source and build imagick.so &#8211; In my machine, I found imagick.so in the following directory</p>
<p><strong>Installing shared extensions:     /path/to/php/modules/</strong></p>
<p># Now add &#8220;<strong>extension=imagick.so</strong>&#8221; in your php.ini (You may need to write the full path of imagick.so based on your configuration)</p>
<p># Restart your web server and thats it (You should see the Imagick extension section in phpinfo page )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinksupport.net/blog/install-imagemagick-imagick-for-php-on-centos-cpanelplesk.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Send Email from a PHP Script</title>
		<link>http://www.thinksupport.net/blog/how-to-send-email-from-a-php-script.html</link>
		<comments>http://www.thinksupport.net/blog/how-to-send-email-from-a-php-script.html#comments</comments>
		<pubDate>Sat, 12 Jan 2008 06:22:43 +0000</pubDate>
		<dc:creator>Sachin</dc:creator>
				<category><![CDATA[Direct Admin]]></category>
		<category><![CDATA[Ensim]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Helm]]></category>
		<category><![CDATA[HSP]]></category>
		<category><![CDATA[HSphere]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP / Mysql]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[WHM/cPanel]]></category>

		<guid isPermaLink="false">http://thinksupport.net/blog/how-to-send-email-from-a-php-script.html</guid>
		<description><![CDATA[Using php mail() function to send emails from php script. Send Email from a PHP Script Example : The first argument to this function is the recipient, the second specifies the message&#8217;s subject and the third one should contain the body. So to send a simple sample message, we could use:]]></description>
			<content:encoded><![CDATA[<p>Using  php mail() function to send emails from php script.</p>
<p>Send Email from a PHP Script Example :</p>
<p>The first argument to this function is the recipient, the second specifies the message&#8217;s subject and the third one should contain the body. So to send a simple sample message, we could use:</p>
<blockquote><p>
<? php<br />
    $to = "recipient@example.com";<br />
    $subject = "Hi!";<br />
    $body = "Hi,\n\nHow are you?";<br />
    if (mail($to, $subject, $body)) {<br />
      echo("
<p>Message successfully sent!</p>
<p>&#8220;);<br />
     } else {<br />
      echo(&#8220;
<p>Message delivery failed&#8230;</p>
<p>&#8220;);<br />
     }<br />
    ?>
</p></blockquote>
<p>Save this file as mail.php and browse from url http://yourdomain/mail.php </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinksupport.net/blog/how-to-send-email-from-a-php-script.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Couldn&#8217;t open stream {localhost:143}INBOX</title>
		<link>http://www.thinksupport.net/blog/couldnt-open-stream-localhost143inbox.html</link>
		<comments>http://www.thinksupport.net/blog/couldnt-open-stream-localhost143inbox.html#comments</comments>
		<pubDate>Wed, 14 Nov 2007 15:23:19 +0000</pubDate>
		<dc:creator>Sachin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP / Mysql]]></category>

		<guid isPermaLink="false">http://thinksupport.net/blog/couldnt-open-stream-localhost143inbox.html</guid>
		<description><![CDATA[Q) All my other IMAP clients can connect to my server, but TWIG says: Warning: Couldn&#8217;t open stream {localhost:143}INBOX in /var/www/html/twig/lib/mail/php-imap.inc.php3 A) Your server probably has Transport Layer Security turned on, but PHP does not support TLS. You&#8217;ll need to edit config.inc.php3: $config["imap_port"] = &#8220;143/notls&#8221;; Good read&#8230;]]></description>
			<content:encoded><![CDATA[<p>Q) All my other IMAP clients can connect to my server, but TWIG says:<br />
Warning: Couldn&#8217;t open stream {localhost:143}INBOX in<br />
/var/www/html/twig/lib/mail/php-imap.inc.php3</p>
<p>A) Your server probably has Transport Layer Security turned on, but<br />
PHP does not support TLS. You&#8217;ll need to edit config.inc.php3:<br />
$config["imap_port"] = &#8220;143/notls&#8221;;</p>
<p>Good read&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinksupport.net/blog/couldnt-open-stream-localhost143inbox.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Quota Check Tool</title>
		<link>http://www.thinksupport.net/blog/mysql-quota-check-tool.html</link>
		<comments>http://www.thinksupport.net/blog/mysql-quota-check-tool.html#comments</comments>
		<pubDate>Sat, 26 May 2007 06:29:36 +0000</pubDate>
		<dc:creator>Sachin</dc:creator>
				<category><![CDATA[Articles -- Webhosting]]></category>
		<category><![CDATA[Direct Admin]]></category>
		<category><![CDATA[Ensim]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP / Mysql]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[WHM/cPanel]]></category>

		<guid isPermaLink="false">http://thinksupport.net/blog/?p=204</guid>
		<description><![CDATA[I came across wonderfull mysql quota check tool &#8212; Here is how it works - The MySQL Quota-Tool helps you to set a size limit on MySQL databases. It works by checking the size of each database and revoking the INSERT- and REATE-priveleges for the databases, which exceed the given size limit. When the size [...]]]></description>
			<content:encoded><![CDATA[<p>I came across wonderfull mysql quota check tool &#8212; Here is how it works -</p>
<p>The MySQL Quota-Tool helps you to set a size limit on MySQL databases.</p>
<p>It works by checking the size of each database and revoking the INSERT- and REATE-priveleges for the databases, which exceed the given size limit.</p>
<p>When the size of the database falls below the given limit, the INSERT- and CREATE-priveleges are granted again.</p>
<p>This (of course) doesn&#8217;t work for users who have global priveleges, because the quota is database and not user based, but in most environments privileges are given in the &#8220;db&#8221;-table which is modified by the MySQL Quota Tool. </p>
<p><code>#!/usr/bin/php -q<br />
<?PHP</p>
<p>/*<br />
 * MySQL quota script<br />
 * written by Sebastian Marsching<br />
 *<br />
 */</p>
<p>/*<br />
    This program is free software; you can redistribute it and/or modify<br />
    it under the terms of the GNU General Public License as published by<br />
    the Free Software Foundation; either version 2 of the License, or<br />
    (at your option) any later version.</p>
<p>    This program is distributed in the hope that it will be useful,<br />
    but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br />
    GNU General Public License for more details.</p>
<p>    You should have received a copy of the GNU General Public License<br />
    along with this program; if not, write to the Free Software<br />
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA<br />
*/</p>
<p>/*<br />
 * Create table for quota data with the following statement:<br />
 *<br />
 * CREATE TABLE `Quota` (`Db` CHAR(64) NOT NULL,<br />
 * `Limit` BIGINT NOT NULL,<br />
 * `Exceeded` ENUM('Y','N') DEFAULT 'N' NOT NULL,<br />
 * PRIMARY KEY (`Db`), UNIQUE (`Db`));<br />
 *<br />
 * The field 'db' stores the information for which database<br />
 * you want to limit the size.<br />
 * The field 'limit' is the size limit in bytes.<br />
 * The field 'exceeded' is only used internally and must be<br />
 * initialized with 'N'.<br />
 */</p>
<p>/*<br />
 * Settings<br />
 */</p>
<p>$mysql_host  = 'localhost';<br />
$mysql_user  = 'root'; // Do NOT change, root-access is required<br />
$mysql_pass  = '';<br />
$mysql_db    = 'quotadb'; // Not the DB to check, but the db with the quota table<br />
$mysql_table = 'quota';</p>
<p>/*<br />
 * Do NOT change anything below<br />
 */</p>
<p>$debug = 0;</p>
<p>// Connect to MySQL Server</p>
<p>if (!mysql_connect($mysql_host, $mysql_user, $mysql_pass))<br />
{<br />
 echo "Connection to MySQL-server failed!";<br />
 exit;<br />
}</p>
<p>// Select database</p>
<p>if (!mysql_select_db($mysql_db))<br />
{<br />
 echo "Selection of database $mysql_db failed!";<br />
 exit;<br />
}</p>
<p>// Check quota for each entry in quota table</p>
<p>$sql = "SELECT * FROM $mysql_table;";<br />
$result = mysql_query($sql);</p>
<p>while ($row = mysql_fetch_array($result))<br />
{<br />
 $quota_db = $row['db'];<br />
 $quota_limit = $row['limit'];<br />
 $quota_exceeded = ($row['exceeded']=='Y') ? 1 : 0;</p>
<p> if ($debug)<br />
  echo "Checking quota for '$quota_db'...\n";</p>
<p> $qsql = "SHOW TABLE STATUS FROM $quota_db;";<br />
 $qresult = mysql_query($qsql);</p>
<p> if ($debug)<br />
  echo "SQL-query is \"$qsql\"\n";</p>
<p> $quota_size = 0;</p>
<p> while ($qrow = mysql_fetch_array($qresult))<br />
 {<br />
  if ($debug)<br />
  { echo "Result of query:\n"; var_dump($qrow); }<br />
  $quota_size += $qrow['Data_length'] + $qrow['Index_length'];<br />
 }</p>
<p> if ($debug)<br />
  echo "Size is $quota_size bytes, limit is $quota_limit bytes\n";</p>
<p> if ($debug &#038;&#038; $quota_exceeded)<br />
  echo "Quota is marked as exceeded.\n";<br />
 if ($debug &#038;&#038; !$quota_exceeded)<br />
  echo "Quota is not marked as exceeded.\n";</p>
<p> if (($quota_size > $quota_limit) &#038;&#038; !$quota_exceeded)<br />
 {<br />
  if ($debug)<br />
   echo "Locking database...\n";<br />
  // Save in quota table<br />
  $usql = "UPDATE $mysql_table SET exceeded='Y' WHERE db='$quota_db';";<br />
  mysql_query($usql);<br />
  if ($debug)<br />
   echo "Querying: $usql\n";<br />
  // Dismiss CREATE and INSERT privilege for database<br />
  mysql_select_db('mysql');<br />
  $usql = "UPDATE db SET Insert_priv='N', Create_priv='N' WHERE Db='$quota_db';";<br />
  mysql_query($usql);<br />
  if ($debug)<br />
   echo "Querying: $usql\n";<br />
  mysql_select_db($mysql_db);<br />
 }</p>
<p> if (($quota_size <= $quota_limit) &#038;&#038; $quota_exceeded)<br />
 {<br />
  if ($debug)<br />
   echo "Unlocking database...\n";<br />
  // Save in quota table<br />
  $usql = "UPDATE $mysql_table SET exceeded='N' WHERE db='$quota_db';";<br />
  mysql_query($usql);<br />
  if ($debug)<br />
   echo "Querying: $usql\n";<br />
  // Grant CREATE and INSERT privilege for database<br />
  mysql_select_db('mysql');<br />
  $usql = "UPDATE db SET Insert_priv='Y', Create_priv='Y' WHERE Db='$quota_db';";<br />
  mysql_query($usql);<br />
  if ($debug)<br />
   echo "Querying: $usql\n";<br />
  mysql_select_db($mysql_db);<br />
 }<br />
}</p>
<p>?></code></p>
<p>&#8212;-</p>
<p>More details can be found at &#8211;<a href="http://projects.marsching.org/mysql_quota/"> http://projects.marsching.org/mysql_quota/</a></p>
<p>I am going to install this tool and see how it works for me <img src='http://www.thinksupport.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Thanks,<br />
Preeti S.<br />
<a href="http://ThinkSupport.net">ThinkSupport.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinksupport.net/blog/mysql-quota-check-tool.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timeout error occurred trying to start MySQL Daemon.</title>
		<link>http://www.thinksupport.net/blog/timeout-error-occurred-trying-to-start-mysql-daemon.html</link>
		<comments>http://www.thinksupport.net/blog/timeout-error-occurred-trying-to-start-mysql-daemon.html#comments</comments>
		<pubDate>Fri, 18 May 2007 08:18:13 +0000</pubDate>
		<dc:creator>Sachin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP / Mysql]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://thinksupport.net/blog/?p=201</guid>
		<description><![CDATA[I came across mysql error &#8212; &#8220;Timeout error occurred trying to start MySQL Daemon.&#8221; Mysql will not restart &#8212; [root@vps init.d]# ./mysqld restart Stopping MySQL: [FAILED] Timeout error occurred trying to start MySQL Daemon. Starting MySQL: [FAILED] Server Details : Linux VPS &#8212; Plesk Installed. Mysql Version : 4.1 &#8212;&#8212; Solution : Add this line [...]]]></description>
			<content:encoded><![CDATA[<p>I came across mysql error &#8212; &#8220;Timeout error occurred trying to start MySQL Daemon.&#8221;</p>
<p>Mysql will not restart &#8212; </p>
<p>[root@vps init.d]# ./mysqld restart<br />
Stopping MySQL:                                            [FAILED]<br />
Timeout error occurred trying to start MySQL Daemon.<br />
Starting MySQL:                                             [FAILED]</p>
<p>Server Details :<br />
Linux VPS &#8212; Plesk Installed.<br />
Mysql Version : 4.1</p>
<p>&#8212;&#8212;</p>
<p>Solution : Add this line in /etc/my.cnf</p>
<p><strong>skip-innodb</strong> under socket=/var/lib/mysql/mysql.sock</p>
<p>vi /etc/my.cnf<br />
&#8212;&#8212;&#8211;</p>
<p>[mysqld]<br />
datadir=/var/lib/mysql<br />
socket=/var/lib/mysql/mysql.sock<br />
<strong>skip-innodb</strong><br />
# Default to using old password format for compatibility with mysql 3.x<br />
# clients (those using the mysqlclient10 compatibility package).<br />
old_passwords=1<br />
&#8212;&#8212;&#8212;</p>
<p>Thanks,<br />
Sachin<br />
<a href="http://thinksupport.net">ThinkSupport.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinksupport.net/blog/timeout-error-occurred-trying-to-start-mysql-daemon.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to access PHP5 ?</title>
		<link>http://www.thinksupport.net/blog/how-to-access-php5.html</link>
		<comments>http://www.thinksupport.net/blog/how-to-access-php5.html#comments</comments>
		<pubDate>Sat, 28 Apr 2007 12:33:11 +0000</pubDate>
		<dc:creator>Sachin</dc:creator>
				<category><![CDATA[Direct Admin]]></category>
		<category><![CDATA[Ensim]]></category>
		<category><![CDATA[HSphere]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP / Mysql]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[WHM/cPanel]]></category>

		<guid isPermaLink="false">http://thinksupport.net/blog/?p=148</guid>
		<description><![CDATA[How to access PHP5 on your server if you have both PHP4 and PHP5 installed. You can enabled PHP5 on particular domain by adding following line in .htaccess under public_html folder &#8211; AddType application/x-httpd-php5 .php Thank you]]></description>
			<content:encoded><![CDATA[<p>How to access PHP5 on your server if you have both PHP4 and PHP5 installed.</p>
<p>You can enabled PHP5 on particular domain by adding following line in .htaccess under public_html folder &#8211;</p>
<p>AddType application/x-httpd-php5 .php</p>
<p>Thank you <img src='http://www.thinksupport.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinksupport.net/blog/how-to-access-php5.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful MYSQL tips ..</title>
		<link>http://www.thinksupport.net/blog/useful-mysql-tips.html</link>
		<comments>http://www.thinksupport.net/blog/useful-mysql-tips.html#comments</comments>
		<pubDate>Fri, 27 Apr 2007 07:53:01 +0000</pubDate>
		<dc:creator>Sachin</dc:creator>
				<category><![CDATA[Direct Admin]]></category>
		<category><![CDATA[Ensim]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP / Mysql]]></category>
		<category><![CDATA[WHM/cPanel]]></category>

		<guid isPermaLink="false">http://thinksupport.net/blog/?p=146</guid>
		<description><![CDATA[Check this &#8212; http://souptonuts.sourceforge.net/readme_mysql.htm]]></description>
			<content:encoded><![CDATA[<p>Check this &#8212; </p>
<p><a href="http://souptonuts.sourceforge.net/readme_mysql.htm">http://souptonuts.sourceforge.net/readme_mysql.htm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinksupport.net/blog/useful-mysql-tips.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Fileinfo using PECL Modules</title>
		<link>http://www.thinksupport.net/blog/installing-fileinfo-using-pecl-modules.html</link>
		<comments>http://www.thinksupport.net/blog/installing-fileinfo-using-pecl-modules.html#comments</comments>
		<pubDate>Tue, 24 Apr 2007 18:00:14 +0000</pubDate>
		<dc:creator>Sunil</dc:creator>
				<category><![CDATA[PHP / Mysql]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[WHM/cPanel]]></category>

		<guid isPermaLink="false">http://thinksupport.net/blog/?p=120</guid>
		<description><![CDATA[The PHP Extension Community Library (PECL) is a collection of modules/extensions that you can install to enhance your version of PHP. The categories range wildly from Authentication to Image Handling, and from Encryption to XML. However, installation of the PECL libraries can sometimes be a bit tricky for the beginner. There are two main ways [...]]]></description>
			<content:encoded><![CDATA[<p>The PHP Extension Community Library (PECL) is a collection of modules/extensions that you can install to enhance your version of PHP. The categories range wildly from Authentication to Image Handling, and from Encryption to XML. However, installation of the PECL libraries can sometimes be a bit tricky for the beginner. There are two main ways to install the PECL libraries. Note that if you installed PHP from an RPM or similar package, you will also need the PHP-devel package as well.</p>
<p>You can view all the PECL modules available at the PECL website. Some useful modules are:</p>
<ul>
<li><a href="http://pecl.php.net/package/imagick">ImageMagick</a></li>
<li><a href="http://pecl.php.net/package/GDChart">GDChart</a> More info on using GDChart can be found <a href="http://ilia.ws/archives/99-GDChart-Fileinfo-Releases.html">here</a>.</li>
<li><a href="http://pecl.php.net/package/id3">ID3</a></li>
<li><a href="http://pecl.php.net/package/mailparse">Mailparse</a></li>
</ul>
<p>We will be installing <a href="http://pecl.php.net/package/Fileinfo">Fileinfo 1.0.4</a> for this tutorial.</p>
<p><strong>Installation using the PECL binary</strong></p>
<p>If you are using a more recent version of PHP, chances are you have the pecl binary installed as well. As root from the command line, try running &#8216;pecl&#8217;. If found, it will give you a list of options that can be used to compile your extensions. To install Fileinfo, simply type</p>
<p><code>pecl install fileinfo</code></p>
<p>This will download the fileinfo source files, phpize the source, and then compile and install the extension.</p>
<p>You will need to activate the extension by editting your php.ini and add:</p>
<p>extension=fileinfo.so</p>
<p>Restarting your webserver should result in PHP starting with the fileinfo extension active and ready for use.</p>
<p><strong>Installing from Source</strong></p>
<p>Some systems don&#8217;t have pecl available due to running an older version of PHP. However, you can still install the extension, albeit with a bit more work. The first step is to download the extension, unpack the file, and phpize the contents. You then need to perform a normal configure and make routine to install the module:</p>
<p><code>wget http://pecl.php.net/get/Fileinfo-1.0.4.tgz<br />
tar -zxf Fileinfo-1.0.4.tgz<br />
cd Fileinfo-1.0.4<br />
phpize<br />
./configure<br />
make<br />
make install<br />
</code></p>
<p>This will install the fileinfo.so module in your php extensions folder. As per above, add this to your php.ini file by adding</p>
<p>extension=fileinfo.so</p>
<p>in the extensions section. It would be wise to check that your php.ini has the correct extensions directory set as well and this is set via the extension_dir directive.</p>
<p><strong>Installing on Windows</strong></p>
<p>Installation of the PECL modules on windows is alot easier, as all the hard work has been done. Simply locate the extension on the <a href="http://pecl4win.php.net/list.php">PECL Windows</a> page and simply place the dll in your extensions directory. Add the extension to the php.ini file as described above, restart your web server, and you are good to go!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinksupport.net/blog/installing-fileinfo-using-pecl-modules.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Pear ?</title>
		<link>http://www.thinksupport.net/blog/what-is-pear.html</link>
		<comments>http://www.thinksupport.net/blog/what-is-pear.html#comments</comments>
		<pubDate>Mon, 23 Apr 2007 09:02:03 +0000</pubDate>
		<dc:creator>Sachin</dc:creator>
				<category><![CDATA[Articles -- Webhosting]]></category>
		<category><![CDATA[Direct Admin]]></category>
		<category><![CDATA[Ensim]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP / Mysql]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[WHM/cPanel]]></category>

		<guid isPermaLink="false">http://thinksupport.net/blog/?p=115</guid>
		<description><![CDATA[PEAR Is short for â€˜PHP Extension and Application Repositoryâ€™ PEAR is having itâ€™s primary goal to become a repository for PHP extensions and library code. The most important goal of the PEAR project is to try to define standard coding packages that can be used be developers directoly and it is re-usable coding. Each package [...]]]></description>
			<content:encoded><![CDATA[<p>PEAR Is short for â€˜PHP Extension and Application Repositoryâ€™</p>
<p>PEAR is having itâ€™s primary goal to become a repository for PHP extensions and library code. The most important goal of the PEAR project is to try to define standard coding packages that can be used be developers directoly and it is re-usable coding.<br />
Each package is a seperate project and is having a diffreent developer team.</p>
<p>Packages are in the gzipped tar files with a description file inside, and installed on your server using the PEAR installer.</p>
<p>You can install any pear package as<br />
â€”â€”â€”â€“<br />
pear install pear-package-name<br />
â€”â€”â€”â€“</p>
<p>You can check all the PEAR packages that are available with<br />
â€”â€”â€”â€”<br />
pear list-all<br />
â€”â€”â€”â€”</p>
<p>You can check installed PEAR packages on your server as<br />
â€”â€”â€”â€”<br />
pear list<br />
â€”â€”â€”â€”</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinksupport.net/blog/what-is-pear.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Optimize MySQL on DirectAdmin Server</title>
		<link>http://www.thinksupport.net/blog/how-to-optimize-mysql-on-directadmin-server.html</link>
		<comments>http://www.thinksupport.net/blog/how-to-optimize-mysql-on-directadmin-server.html#comments</comments>
		<pubDate>Sun, 22 Apr 2007 08:58:17 +0000</pubDate>
		<dc:creator>Sachin</dc:creator>
				<category><![CDATA[Direct Admin]]></category>
		<category><![CDATA[PHP / Mysql]]></category>

		<guid isPermaLink="false">http://thinksupport.net/blog/?p=107</guid>
		<description><![CDATA[vi /etc/my.cnf [ENTER] Press &#8216;i&#8217; to enter insert mode, then paste: [mysqld] skip-locking skip-innodb query_cache_limit=1M query_cache_size=32M query_cache_type=1 max_connections=500 interactive_timeout=100 wait_timeout=100 connect_timeout=10 thread_cache_size=128 key_buffer=16M join_buffer=1M max_allowed_packet=16M table_cache=1024 record_buffer=1M sort_buffer_size=2M read_buffer_size=2M max_connect_errors=10 # Try number of CPU&#8217;s*2 for thread_concurrency thread_concurrency=2 myisam_sort_buffer_size=64M log-bin server-id=1 [safe_mysqld] err-log=/var/log/mysqld.log open_files_limit=8192 [mysqldump] quick max_allowed_packet=16M [mysql] no-auto-rehash #safe-updates [isamchk] key_buffer=64M sort_buffer=64M read_buffer=16M write_buffer=16M [...]]]></description>
			<content:encoded><![CDATA[<p>vi /etc/my.cnf [ENTER]<br />
Press &#8216;i&#8217; to enter insert mode, then paste:</p>
<p>[mysqld]<br />
skip-locking<br />
skip-innodb<br />
query_cache_limit=1M<br />
query_cache_size=32M<br />
query_cache_type=1<br />
max_connections=500<br />
interactive_timeout=100<br />
wait_timeout=100<br />
connect_timeout=10<br />
thread_cache_size=128<br />
key_buffer=16M<br />
join_buffer=1M<br />
max_allowed_packet=16M<br />
table_cache=1024<br />
record_buffer=1M<br />
sort_buffer_size=2M<br />
read_buffer_size=2M<br />
max_connect_errors=10<br />
# Try number of CPU&#8217;s*2 for thread_concurrency<br />
thread_concurrency=2<br />
myisam_sort_buffer_size=64M<br />
log-bin<br />
server-id=1</p>
<p>[safe_mysqld]<br />
err-log=/var/log/mysqld.log<br />
open_files_limit=8192</p>
<p>[mysqldump]<br />
quick<br />
max_allowed_packet=16M</p>
<p>[mysql]<br />
no-auto-rehash<br />
#safe-updates</p>
<p>[isamchk]<br />
key_buffer=64M<br />
sort_buffer=64M<br />
read_buffer=16M<br />
write_buffer=16M</p>
<p>[myisamchk]<br />
key_buffer=64M<br />
sort_buffer=64M<br />
read_buffer=16M<br />
write_buffer=16M</p>
<p>[mysqlhotcopy]<br />
interactive-timeout<br />
Press ctrl-c to exit insert mode. Then press shift-Z shift-Z to save and quit. Restart mysqld:<br />
Redhat:</p>
<p>/sbin/service mysqld restart</p>
<p>FreeBSD:</p>
<p>/usr/local/etc/rc.d/mysqld restart</p>
<p>Note that this guide is only for MySQL 4. There is a default my.cnf that comes with mysql that will work fine</p>
<p>cp -f /usr/share/mysql/my-huge.cnf /etc/my.cnf</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinksupport.net/blog/how-to-optimize-mysql-on-directadmin-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

