<?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>LAMPdocs: Linux, Apache, MySQL, PHP &#187; PHP Configuration</title>
	<atom:link href="http://www.lampdocs.com/blog/category/php-configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lampdocs.com/blog</link>
	<description>Linux, Apache, MySQL, PHP: Docs, Tricks and Secrets</description>
	<lastBuildDate>Wed, 04 Jan 2012 13:11:27 +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>How to Prepend a PHP File For a Single Domain</title>
		<link>http://www.lampdocs.com/blog/2010/11/how-to-prepend-a-php-file-starting-automatically-for-a-single-domain/</link>
		<comments>http://www.lampdocs.com/blog/2010/11/how-to-prepend-a-php-file-starting-automatically-for-a-single-domain/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 11:51:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[PHP Solutions]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=927</guid>
		<description><![CDATA[php auto prepend using httpd.conf]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to prepend a PHP file, before execution of any file. This can be: website header, or variable declaration, or anything else. In order to do it, we need access to out Virtualhost (which is usually located ad your httpd.conf). If you are using Directadmin, you may find it at /usr/local/directadmin/data/users/<username>. Of course, you need to have root access to modify these values. </p>
<p>Here is our source virtualhost secrion: </p>
<blockquote><p><VirtualHost IP:80 ></p>
<p>	ServerName www.lampdocs.com<br />
	ServerAlias www.lampdocs.com lampdocs.com<br />
	ServerAdmin webmaster@lampdocs.com<br />
	DocumentRoot /home/lampdocs/domains/lampdocs.com/public_html<br />
	ScriptAlias /cgi-bin/ /home/lampdocs/domains/lampdocs.com/public_html/cgi-bin/<br />
	UseCanonicalName OFF<br />
	SuexecUserGroup lampdocs lampdocs<br />
	CustomLog /var/log/httpd/domains/lampdocs.com.bytes bytes<br />
	CustomLog /var/log/httpd/domains/lampdocs.com.log combined<br />
	ErrorLog /var/log/httpd/domains/lampdocs.com.error.log</p>
<p>	<Directory /home/lampdocs/domains/lampdocs.com/public_html><br />
		Options +Includes -Indexes<br />
		php_admin_flag engine ON<br />
		<IfModule !mod_php6.c><br />
			php_admin_flag safe_mode OFF<br />
		</IfModule><br />
		php_admin_value sendmail_path &#8216;/usr/sbin/sendmail -t -i -f lampdocs@lampdocs.com&#8217;<br />
	</Directory> </p></blockquote>
<p>We will add a string: </p>
<blockquote><p>php_admin_value auto_prepend_file /var/www/html/docroot.php. </p></blockquote>
<p>Here is the result: </p>
<blockquote><p><VirtualHost IP:80 ><br />
	ServerName www.lampdocs.com<br />
	ServerAlias www.lampdocs.com lampdocs.com<br />
	ServerAdmin webmaster@lampdocs.com<br />
	DocumentRoot /home/lampdocs/domains/lampdocs.com/public_html<br />
	ScriptAlias /cgi-bin/ /home/lampdocs/domains/lampdocs.com/public_html/cgi-bin/<br />
	php_admin_value auto_prepend_file /var/www/html/docroot.php<br />
	UseCanonicalName OFF<br />
	SuexecUserGroup lampdocs lampdocs<br />
	CustomLog /var/log/httpd/domains/lampdocs.com.bytes bytes<br />
	CustomLog /var/log/httpd/domains/lampdocs.com.log combined<br />
	ErrorLog /var/log/httpd/domains/lampdocs.com.error.log</p>
<p>	<Directory /home/lampdocs/domains/lampdocs.com/public_html><br />
		Options +Includes -Indexes<br />
		php_admin_flag engine ON<br />
		<IfModule !mod_php6.c><br />
			php_admin_flag safe_mode OFF<br />
		</IfModule><br />
		php_admin_value sendmail_path &#8216;/usr/sbin/sendmail -t -i -f lampdocs@lampdocs.com&#8217;<br />
	</Directory></p></blockquote>
<p>Now reboot Apache and have fun. You can place anything you need in this file. This method does not involve php.ini and allows to prepend a PHP file for a single domain. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/11/how-to-prepend-a-php-file-starting-automatically-for-a-single-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>/usr/bin/ld: cannot find -lltdl on PHP Make: How to Fix</title>
		<link>http://www.lampdocs.com/blog/2010/04/usrbinld-cannot-find-lltdl-on-php-make-how-to-fix/</link>
		<comments>http://www.lampdocs.com/blog/2010/04/usrbinld-cannot-find-lltdl-on-php-make-how-to-fix/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 14:36:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Configuration]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=865</guid>
		<description><![CDATA[lltdl error on PHP make: here is the solution for you. ]]></description>
			<content:encoded><![CDATA[<p>You can meet this error while trying to make PHP on a fresh server. For example, you have this configure line:</p>
<p><code>./configure '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-calendar' '--enable-mbstring' '--disable-cgi' '--disable-magic-quotes' '--with-curl' '--with-curlwrappers' '--with-zlib' '--with-bz2' '--enable-ftp' '--with-gd' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr/lib/mysql' '--enable-soap' '--with-xmlrpc' '--enable-zip' '--with-pear'</code></p>
<p>and the error you receive is: </p>
<p><code>/usr/bin/ld: cannot find -lltdl<br />
collect2: ld returned 1 exit status<br />
make: *** [libphp5.la] Error 1</code></p>
<p>Most probably you don&#8217;t have libtool-ltdl-devel installed. All you need is to install it using yum (or any other applicable package manager). <strong>yum install libtool-ltdl-devel</strong>. Then run <strong>./configure</strong>, <strong>make</strong> and <strong>make install</strong>. This should do the job. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/04/usrbinld-cannot-find-lltdl-on-php-make-how-to-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Imagemagick Support to PHP</title>
		<link>http://www.lampdocs.com/blog/2010/02/how-to-add-imagemagick-support-to-php/</link>
		<comments>http://www.lampdocs.com/blog/2010/02/how-to-add-imagemagick-support-to-php/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 14:13:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Image Processing]]></category>
		<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[add imagemagick support]]></category>
		<category><![CDATA[imagemagick functions php]]></category>
		<category><![CDATA[php imagemagick]]></category>
		<category><![CDATA[php imagick]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=831</guid>
		<description><![CDATA[How to add imagemagick functions support to your php installation. ]]></description>
			<content:encoded><![CDATA[<p>In order to process images with php using <a href="http://php.net/manual/en/book.imagick.php">image processing functions</a>, you need to have Imagemagick support installed. Since I haven&#8217;t found any clear reference, how to do it fast, let me post my solution, it should help you to <a href="http://www.lampdocs.com/blog/tag/add-imagemagick-support/" class="st_tag internal_tag" rel="tag" title="Posts tagged with add imagemagick support">add Imagemagick support</a> to your PHP installation.</p>
<p>First of all, we need to ensure we&#8217;ve got Imagemagick on our server. Please, read my previous post, where the procedure of <a href="http://www.lampdocs.com/blog/2010/02/how-to-install-imagemagick-on-a-linux-server/">Imagemagick setup</a> is explained, if you don&#8217;t have it installed. You need to install Imagemagick first in order to add its functions in PHP, I hope it&#8217;s clear.</p>
<p>After the main library is installed, we will need another source archive, that will allow us to add Imagemagick functions to PHP. This package is called <a href="http://pecl.php.net/package/imagick">Imagick</a>, and you&#8217;re welcome to select one package you like. I&#8217;ve taken <a href="http://pecl.php.net/package/imagick/3.0.0b2">3.0.0b2</a> beta, the most recent for today.</p>
<p>Let&#8217;s download it to our server:</p>
<blockquote><p>wget http://pecl.php.net/get/imagick-3.0.0b2.tgz</p></blockquote>
<p>Extract to a folder:</p>
<blockquote><p>tar -xzvf imagick-3.0.0b2.tgz</p></blockquote>
<p>cd into this folder</p>
<blockquote><p>cd imagick-3.0.0b2;</p></blockquote>
<p>Then we need to run phpize</p>
<blockquote><p>phpize</p></blockquote>
<blockquote><p>Then our usual list of commands:<br />
./configure &#8211;with-imagick=/usr/local<br />
make<br />
make install</p></blockquote>
<p>After you&#8217;ve built imagick, you should see something like this:</p>
<p><a href="http://www.lampdocs.com/blog/wp-content/uploads/2010/02/imagick.jpg"><img class="alignnone size-medium wp-image-832" title="imagick installation" src="http://www.lampdocs.com/blog/wp-content/uploads/2010/02/imagick-300x47.jpg" alt="how to install imagick" width="300" height="47" /></a></p>
<p>Now you need to copy the created library named imagick.so to your extensions directory. However you can skip this step, if you like to deal with ling paths in your php.ini.</p>
<p>And the final stage is to add imagick module to php.ini. If you have copied the library to your extensions directory, you should add the following line to php.ini:</p>
<blockquote><p>extension=imagick.so</p></blockquote>
<p>If you have decided to keep the library at the place where it was installed, the string will look like</p>
<blockquote><p>extension=/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so</p></blockquote>
<p>Now restart Apache and check your phpinfo(). If everything is OK, you should see:</p>
<p><a href="http://www.lampdocs.com/blog/wp-content/uploads/2010/02/imagick2.jpg"><img class="alignnone size-medium wp-image-833" title="php imagemagick installed" src="http://www.lampdocs.com/blog/wp-content/uploads/2010/02/imagick2-300x285.jpg" alt="imagick ready" width="300" height="285" /></a></p>
<p>You should now be able to use Imagemagick functions. Feel free to ask me any questions you have.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/02/how-to-add-imagemagick-support-to-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Enable Ioncube Support For The Entire Server</title>
		<link>http://www.lampdocs.com/blog/2010/01/how-to-enable-ioncube-support-for-the-entire-server/</link>
		<comments>http://www.lampdocs.com/blog/2010/01/how-to-enable-ioncube-support-for-the-entire-server/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 11:17:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[how to install ioncube]]></category>
		<category><![CDATA[install ioncube server level]]></category>
		<category><![CDATA[ioncube first time installation]]></category>
		<category><![CDATA[ioncube server support]]></category>
		<category><![CDATA[ioncube support php]]></category>
		<category><![CDATA[php.ini file location]]></category>
		<category><![CDATA[run ioncube]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=621</guid>
		<description><![CDATA[You will install ioncube support after you read this article - everything is simple!]]></description>
			<content:encoded><![CDATA[<p>PHP code protection is widely used today. As most servers come with Zend installed, I will tell you how to install another code protection library named <a href="http://www.ioncube.com/loaders.php">Ioncube</a>. If you&#8217;re a server administrator, I would suggest you to install this library on server level, as it might be used by many users of your server.</p>
<p>First of all, we need to download the <a href="http://www.ioncube.com/loaders.php">Ioncube package</a>. Just choose your operating system and download an archive to your place. Then you need to extract it.</p>
<blockquote><p>tar -xzvf ioncube_loaders_lin_x86.tar.gz</p></blockquote>
<p>I would suggest you to copy extracted files to a safe location so you could point to it when adding support lines to php.ini.</p>
<p>It will be much easier if ioncube loader helper page is accessible from the web, just like here: http://www.lampdocs.com/blog/ioncube/ioncube-loader-helper.php?page=install-assistant . Helper will detect the place where your php.ini is located and will suggest the correct path. If you don&#8217;t have web access to helper page, you&#8217;re welcome to follow my post <a href="http://www.lampdocs.com/blog/2008/05/how-to-find-your-phpini-file-location/">finding php.ini file location</a>.</p>
<p>To install the Loader in your php.ini file, edit or create php.ini file by the path specified by loader and add the following line before any other zend_extension lines:</p>
<blockquote><p>zend_extension = /<br />
/ioncube_loader_lin_5.2.so</p></blockquote>
<p>where /<br />
/ is where you&#8217;ve installed the loader, e.g. /usr/local/ioncube/. Make sure this line is added <strong>before </strong> any other zend_extension lines, as you might have troubles starting Apache. Here is how it looks on my server:</p>
<blockquote><p>[Zend]<br />
zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.2.so<br />
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3<br />
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3<br />
zend_optimizer.version=3.3.3</p>
<p>zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so<br />
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so</p></blockquote>
<p>After that you must restart apache to activate your changes. You should not experience problems starting it, and your ioncube installation should be ready to use. If not, you&#8217;re welcome to ask me here. <img src='http://www.lampdocs.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/01/how-to-enable-ioncube-support-for-the-entire-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Find The Version of Linux You Are Using</title>
		<link>http://www.lampdocs.com/blog/2009/02/how-to-find-the-version-of-linux-you-are-using/</link>
		<comments>http://www.lampdocs.com/blog/2009/02/how-to-find-the-version-of-linux-you-are-using/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 17:44:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[htaccess Solutions]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[command to find linux version]]></category>
		<category><![CDATA[command to identify linux version]]></category>
		<category><![CDATA[how to find linux version]]></category>
		<category><![CDATA[linux command os version]]></category>
		<category><![CDATA[linux version command line]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=663</guid>
		<description><![CDATA[Sometimes you need to know what version of the Operating system is installed on your server. This is extremely useful when you order a dedicated server and want to know what is the version of OS on it. A simple command will help you as usual: cat `ls /etc/*{-,_}{release,version} 2&#62;/dev/null &#124; head -n 1` This [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to know what version of the Operating system is installed on your server. This is extremely useful when you order a dedicated server and want to know what is the version of OS on it. A simple command will help you as usual:</p>
<blockquote><p>cat `ls /etc/*{-,_}{release,version} 2&gt;/dev/null | head -n 1`</p></blockquote>
<p>This will show you something like</p>

<a href='http://www.lampdocs.com/blog/2009/02/how-to-find-the-version-of-linux-you-are-using/uname2/' title='uname2'><img width="150" height="150" src="http://www.lampdocs.com/blog/wp-content/uploads/2009/02/uname2-150x150.jpg" class="attachment-thumbnail" alt="uname2" title="uname2" /></a>

<p>The picture below shows the difference between common commands: one shown above and <strong>uname -a</strong>. Sometimes you don&#8217;t need the kernel version, just the operating system name. This command should help you to do that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2009/02/how-to-find-the-version-of-linux-you-are-using/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Deletes Angle Brackets While Parsing HTML: How to Solve</title>
		<link>http://www.lampdocs.com/blog/2009/02/php-deletes-angle-brackets-while-parsing-html-how-to-solve/</link>
		<comments>http://www.lampdocs.com/blog/2009/02/php-deletes-angle-brackets-while-parsing-html-how-to-solve/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 08:45:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[build php with expat]]></category>
		<category><![CDATA[downgrade libxml2]]></category>
		<category><![CDATA[libxml 2.7.3 wordpress]]></category>
		<category><![CDATA[libxml2 2.7.1 causes breakage]]></category>
		<category><![CDATA[php character data in xml_parse]]></category>
		<category><![CDATA[php libxml problem]]></category>
		<category><![CDATA[php libxml2]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=638</guid>
		<description><![CDATA[Today I&#8217;ve faced a problem that was quite strange. One of my WordPress installations refused to understand posted angle brackets. This was especially related to tags and the encoded symbols like &#38;gt; &#38;lt; and so on. I started to think what I did before . The issue is described at PHP Bugs.  There is no [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve faced a problem that was quite strange. One of my <a href="http://wordpress.org/">WordPress</a> installations refused to understand posted angle brackets. This was especially related to tags and the encoded symbols like &amp;gt; &amp;lt; and so on. I started to think what I did before <img src='http://www.lampdocs.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>The issue is described at <a href="http://bugs.php.net/bug.php?id=45996">PHP Bugs</a>.  There is no exact solution there that&#8217;s why I decided to create this guide.</p>
<p>I&#8217;ve found that the issue was found after a recent PHP update using Directadmin <strong>custombuild</strong> script. I&#8217;ve got all recent software, but PHP doesn&#8217;t recognize simple symbols. My first thought was that the problem is with XML interpretation, that is especially related to <strong>libxml2</strong>. I&#8217;ve followed <a href="http://www.directadmin.com/forum/showthread.php?t=28290">Directadmin forums</a> and thought the problem is with libxml2 version.  I&#8217;ve tried to update it to version 2.7.3. There was no success as the problem still continued to persist.</p>
<blockquote><p>#cd /usr/local/directadmin/custombuild<br />
#wget http://xmlsoft.org/sources/libxml2-2.7.3.tar.gz<br />
#tar -zxvf libxml2-2.7.3.tar.gz<br />
#cd libxml2-2.7.3<br />
#./configure &#8211;with-iconv=/usr/local<br />
#make<br />
#make install</p></blockquote>
<p>This step itself doesn&#8217;t help, but you need to do it in order to fix the entire problem.</p>
<p>The second step you need to make is to build php with libexpat. In order to do this, you will need to perform the following steps:</p>
<p>- install expat-devel by entering  <strong>yum install expat-devel</strong>.</p>
<p>- add expat support to your PHP build. In order to do this (I assume you&#8217;re using custombuild to build PHP), you have to edit <strong>/usr/local/directadmin/custombuild/configure/ap2/configure.php5</strong>.  <strong>&#8211;with-libexpat-dir=/usr</strong> is the string you need to end to your current file contents.</p>
<p><img class="alignnone size-full wp-image-642" title="expat adding to php" src="http://www.lampdocs.com/blog/wp-content/uploads/2009/02/expat2.jpg" alt="expat adding to php" width="352" height="453" /></p>
<p>Then you need to update  the PHP version in /usr/local/directadmin/custombuild/versions.txt to 5.2.8 (most current version at the moment). After that you have to build PHP again.</p>
<blockquote><p>cd /usr/local/directadmin/custombuild<br />
./build php</p></blockquote>
<p>There is no need to build anything but PHP that&#8217;s why I&#8217;ve said No to all other proposals (like cURL, Freetype, etc).  As Apache is restarted automatically, you just have to wait while the build process is complete. After that you&#8217;re welcome to enjoy your new PHP installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2009/02/php-deletes-angle-brackets-while-parsing-html-how-to-solve/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Enable Socket Support In PHP</title>
		<link>http://www.lampdocs.com/blog/2008/12/how-to-enable-socket-support-in-php/</link>
		<comments>http://www.lampdocs.com/blog/2008/12/how-to-enable-socket-support-in-php/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 11:08:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[enable socket for php]]></category>
		<category><![CDATA[enable socket option in php linux]]></category>
		<category><![CDATA[enable sockets support]]></category>
		<category><![CDATA[how to enable socket support in apache]]></category>
		<category><![CDATA[how to socket php]]></category>
		<category><![CDATA[need php with socket enabled]]></category>
		<category><![CDATA[php apache socket]]></category>
		<category><![CDATA[php enable socket]]></category>
		<category><![CDATA[php enable sockets]]></category>
		<category><![CDATA[php sockets support]]></category>
		<category><![CDATA[php5 enabling sockets]]></category>
		<category><![CDATA[socket functions php]]></category>
		<category><![CDATA[socket support php]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=191</guid>
		<description><![CDATA[In order to add socket support with PHP you need jsut to include it into your configure string: there is no need to install any third-party applications or software. All you need is to recompile PHP, and it can be done in some minutes. First of all you need to know where your PHP installation [...]]]></description>
			<content:encoded><![CDATA[<p>In order to add socket support with PHP you need jsut to include it into your configure string: there is no need to install any third-party applications or software. All you need is to recompile PHP, and it can be done in some minutes.</p>
<p>First of all you need to know where your PHP installation is located. I think you already have it installed if you are going to add some functions. Try searching for your PHP package (I mean installing PHP from source in this article) at your server: it should exist.</p>
<p>When you have the package near and know where it is located, you should identify your current configuration to avoid deleting some elements from the configure line. The most useful method is to copy your current configure line from the output produced by phpinfo(); You may create a new file containing just these lines:</p>
<blockquote><p>&lt;?<br />
phpinfo();<br />
?&gt;</p></blockquote>
<p>Then run it using a web browser. At the beginning of this output you should see a configure line: it should look like:</p>
<blockquote><p>&#8216;./configure&#8217; &#8216;&#8211;with-apxs2&#8242; &#8216;&#8211;with-curl=/usr/local/lib&#8217; &#8216;&#8211;with-gd&#8217; &#8216;&#8211;enable-gd-native-ttf&#8217; &#8216;&#8211;with-ttf&#8217; &#8216;&#8211;with-gettext&#8217; &#8216;&#8211;with-jpeg-dir=/usr/local/lib&#8217; &#8216;&#8211;with-freetype-dir=/usr/local/lib&#8217; &#8216;&#8211;with-kerberos&#8217; &#8216;&#8211;with-openssl&#8217; &#8216;&#8211;with-mcrypt&#8217; &#8216;&#8211;with-mhash&#8217; &#8216;&#8211;with-mysql=/usr&#8217; &#8216;&#8211;with-mysqli=/usr/bin/mysql_config&#8217; &#8216;&#8211;with-pear&#8217; &#8216;&#8211;with-png-dir=/usr/local/lib&#8217; &#8216;&#8211;with-zlib&#8217; &#8216;&#8211;with-zlib-dir=/usr/local/lib&#8217; &#8216;&#8211;enable-zip&#8217; &#8216;&#8211;with-iconv=/usr/local&#8217; &#8216;&#8211;enable-bcmath&#8217; &#8216;&#8211;enable-calendar&#8217; &#8216;&#8211;enable-ftp&#8217; &#8216;&#8211;enable-magic-quotes&#8217; &#8216;&#8211;enable-mbstring&#8217; &#8216;&#8211;enable-pcntl&#8217;</p></blockquote>
<p>Copy it to your text editor and remove quotes and apostrophes. Then add &#8216;&#8211;enable-sockets&#8217; to this line: that&#8217;s the only string we need to enable socket support.</p>
<p>Then we need to make PHP. If you&#8217;re doing it for the first time, see my previous post: <a href="http://www.lampdocs.com/blog/2008/04/17/adding-dba-support-to-php/" target="_blank">How to configure PHP</a> .</p>
<p>The command is simple enough: <strong>make</strong> <img src='http://www.lampdocs.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I&#8217;d suggest you to <strong>make clean</strong> before doing make to avoid some possible errors. After the PHP is  &#8220;made&#8221; you need to <strong>make install</strong> and then to reboot Apache or any web server you might have to see the changes.  If everything went OK, you should see that socket functions are now available.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/12/how-to-enable-socket-support-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Enable mhash in PHP built from source</title>
		<link>http://www.lampdocs.com/blog/2008/10/how-to-enable-mhash-in-php-built-from-source/</link>
		<comments>http://www.lampdocs.com/blog/2008/10/how-to-enable-mhash-in-php-built-from-source/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 13:36:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[built mhash library in linux]]></category>
		<category><![CDATA[download mhash linux]]></category>
		<category><![CDATA[enable mhash php in linux]]></category>
		<category><![CDATA[enabling mhash]]></category>
		<category><![CDATA[how to enabling mhash in php]]></category>
		<category><![CDATA[how to install mhash for php]]></category>
		<category><![CDATA[instal mhash]]></category>
		<category><![CDATA[install mhash]]></category>
		<category><![CDATA[install mhash library]]></category>
		<category><![CDATA[install mhash php]]></category>
		<category><![CDATA[linux install mhash php library]]></category>
		<category><![CDATA[mhash support php]]></category>
		<category><![CDATA[php configure with mhash]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=241</guid>
		<description><![CDATA[If you have a server that doesn&#8217;t come with any panel and all the software was compiled from sources, you have to install the missing packages by yourself, without any scripts, etc. Today we&#8217;ll install mhash support for a server that has nothing related with this library. As we&#8217;re dealing with a non-rpm system, we&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a server that doesn&#8217;t come with any panel and all the software was compiled from sources, you have to install the missing packages by yourself, without any scripts, etc. Today we&#8217;ll <a href="http://www.lampdocs.com/blog/tag/install-mhash/" class="st_tag internal_tag" rel="tag" title="Posts tagged with install mhash">install mhash</a> support for a server that has nothing related with this library.</p>
<p>As we&#8217;re dealing with a non-rpm system, we&#8217;ll have to install all the software we need from sources. In order to support hash algoritms we need to install <a href="http://sourceforge.net/projects/mhash/">libmhash</a>. Just download it, extract with the following command:</p>
<blockquote><p>tar -xzvf mhash-0.9.9.tar.gz</p></blockquote>
<p>and go to the extracted directory:</p>
<blockquote><p>cd mhash-0.9.9</p></blockquote>
<p>Then you will use the usual combination for linux:</p>
<blockquote><p>./configure<br />
make<br />
make install</p></blockquote>
<p>Then you will need to recompile PHP with</p>
<blockquote><p>&#8211;with-mhash</p></blockquote>
<p>If you don&#8217;t know how to recompile PHP,  just search this blog as it contains lots of information on installing and configuring PHP.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/10/how-to-enable-mhash-in-php-built-from-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Enable Iconv for PHP on a DirectAdmin Linux Server</title>
		<link>http://www.lampdocs.com/blog/2008/10/how-to-enable-iconv-for-php-on-a-directadmin-linux-server/</link>
		<comments>http://www.lampdocs.com/blog/2008/10/how-to-enable-iconv-for-php-on-a-directadmin-linux-server/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 18:39:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Directadmin Tricks]]></category>
		<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[add iconv support php]]></category>
		<category><![CDATA[configure php with iconv]]></category>
		<category><![CDATA[enable iconv apache]]></category>
		<category><![CDATA[enable iconv apache linux]]></category>
		<category><![CDATA[enable iconv in directadmin]]></category>
		<category><![CDATA[enable iconv in php]]></category>
		<category><![CDATA[how to enable the iconv in php]]></category>
		<category><![CDATA[iconv library php]]></category>
		<category><![CDATA[php enable iconv]]></category>
		<category><![CDATA[php iconv]]></category>
		<category><![CDATA[php iconv directadmin]]></category>
		<category><![CDATA[php iconv support]]></category>
		<category><![CDATA[php install iconv]]></category>
		<category><![CDATA[steps to installation iconv for php]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=230</guid>
		<description><![CDATA[I haven&#8217;t found a good guide on this that&#8217;s why I decided to create my own. iconv functions are great if you&#8217;re working with text information stored using different encodings and it is essential to have it on your server. Let&#8217;s take we have Directadmin with Apache 2 support (please, read my previous articles to [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t found a good guide on this that&#8217;s why I decided to create my own. iconv functions are great if you&#8217;re working with text information stored using different encodings and it is essential to have it on your server. Let&#8217;s take we have Directadmin with Apache 2 support (please, read my previous articles to find out how to upgrade your apache).</p>
<p>First of all we need to log in as root and go to <strong>/usr/local/directadmin/customapache</strong>.</p>
<blockquote><p><strong>cd /usr/local/directadmin/customapache</strong></p></blockquote>
<p>You should find configure.php_ap2 or configure.php files, depending on Apache version that is build using this Directadmin build system. I&#8217;ve got both these files. In order to add iconv support we need to add the following line to these files:</p>
<blockquote><p>&#8211;with-iconv</p></blockquote>
<p>Just take a look at my file.</p>
<p><a href="http://www.lampdocs.com/blog/wp-content/uploads/2008/10/iconv_sup.jpg"><img class="alignnone size-medium wp-image-231" title="php iconv support" src="http://www.lampdocs.com/blog/wp-content/uploads/2008/10/iconv_sup-215x300.jpg" alt="" width="215" height="300" /></a></p>
<p>Then we need to go to the command line to the same directory to run our build script. The string will look like</p>
<blockquote><p>[root@lampdocs customapache]# ./build php_ap2</p></blockquote>
<p>If your Apache version is lower than 2 (for example, 1.4), your string will be:</p>
<blockquote><p>[root@lampdocs customapache]# ./build php</p></blockquote>
<p>It will ask you to rebuild the software you have, you don&#8217;t really need it. You won&#8217;t need to add any configure lines: the script will do this for you. make and make install will be done automatically.  Don&#8217;t forget to reboot Apache (<strong>service httpd restart</strong>) and have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/10/how-to-enable-iconv-for-php-on-a-directadmin-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Optimize Your LAMP Configuration</title>
		<link>http://www.lampdocs.com/blog/2008/09/how-to-optimize-your-lamp-configuration/</link>
		<comments>http://www.lampdocs.com/blog/2008/09/how-to-optimize-your-lamp-configuration/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 07:49:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache Performance]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[MySQL Tricks]]></category>
		<category><![CDATA[PHP Configuration]]></category>
		<category><![CDATA[fine tune apache]]></category>
		<category><![CDATA[LAMP config]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=155</guid>
		<description><![CDATA[Today I&#8217;m just sharing a link: I don&#8217;t think I can explain this better than IBM guys did. These three acrticles contain a comprehensive guide for your LAMP system optimization. Here is the first one, that contains general linux settings for perfect LAMP config. The second one describes how to fine tune Apache and PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m just sharing a link: I don&#8217;t think I can explain this better than IBM guys did. These three acrticles contain a comprehensive guide for your LAMP system optimization. Here is the first one, that contains <a href="http://www.ibm.com/developerworks/linux/library/l-tune-lamp-1/index.html?S_TACT=105AGX03&amp;S_CMP=EDU">general linux settings for perfect LAMP config</a>. The second one describes <a href="http://www.ibm.com/developerworks/linux/library/l-tune-lamp-2.html?S_TACT=105AGX03&amp;S_CMP=EDU">how to fine tune Apache and PHP </a>and finally the third one deals with MySQL &#8211; you will find out <a href="http://www.ibm.com/developerworks/linux/library/l-tune-lamp-3.html?S_TACT=105AGX03&amp;S_CMP=EDU">how to optimize MySQL configuration for any server</a> . I usually recommend this guide for those who didn&#8217;t tune anything before &#8211; it&#8217;s clear and brings excellent results. If you have links to similar excellent tutorials, you&#8217;re welcome to share them in comments. Have a nice day!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/09/how-to-optimize-your-lamp-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

