<?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>PHP Magic Book - Free PHP Scripts, Tutorials and Downloads &#187; settings</title>
	<atom:link href="http://www.phpmagicbook.com/tag/settings/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpmagicbook.com</link>
	<description>PHP AtoZ Reloaded, free php tutorials, free php downloads, php scripts, PHP tips</description>
	<lastBuildDate>Tue, 15 Jun 2010 13:22:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to Setup VHOSTS on Xamp</title>
		<link>http://www.phpmagicbook.com/how-to-setup-vhosts-on-xamp/</link>
		<comments>http://www.phpmagicbook.com/how-to-setup-vhosts-on-xamp/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 03:47:54 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Softwares]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[xamp]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=294</guid>
		<description><![CDATA[Following are the steps you need to take to create a new vhost in the XAMP. Step 1 &#038; 2 is once only and is needed if you have a fresh installation of XAMP. 1- Enable/Uncomment The following line in your /xamp/apache/conf/httpd.ini file LoadModule vhost_alias_module modules/mod_vhost_alias.so 2- Open your /xampe/apache/conf/extra/httpd-vhosts file and uncomment following line [...]<p><a href="http://www.phpmagicbook.com/how-to-setup-vhosts-on-xamp/">How to Setup VHOSTS on Xamp</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Following are the steps you need to take to create a new vhost in the XAMP.<br />
Step 1 &#038; 2 is once only and is needed if you have a fresh installation of XAMP.</p>
<p><strong>1-</strong> Enable/Uncomment The following line in your /xamp/apache/conf/httpd.ini file<br />
LoadModule vhost_alias_module modules/mod_vhost_alias.so</p>
<p><strong>2-</strong> Open your /xampe/apache/conf/extra/httpd-vhosts file and uncomment following line<br />
NameVirtualHost *:80</p>
<p><strong>3-</strong> Now if you have to map a vhost for any of your new project. Add the following block of lines in the same httpd-vhosts file at the end. Remember to change these blocks to meet your DOMAIN name and DIRECTORY structure.</p>
<p><span id="more-294"></span></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;VirtualHost *:80&gt;
    DocumentRoot C:/User/Projects/website/code
    ServerName websitename.domainname.com
&lt;Directory &quot;C:/User/Projects/website/code&quot;&gt;
Allow from all
&lt;/Directory&gt;
&lt;/VirtualHost&gt;</pre></div></div>

<p>The above block will map <strong>websitename.domainname.com</strong> to specified directory</p>
<p><strong>4-</strong> Restart Apache and you are ready to go.</p>
<p><a href="http://www.phpmagicbook.com/how-to-setup-vhosts-on-xamp/">How to Setup VHOSTS on Xamp</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/upload-max-filesize-large-file-uploads/" title="Upload Max Filesize &#8211; Large File Uploads in PHP">Upload Max Filesize &#8211; Large File Uploads in PHP</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/how-to-setup-vhosts-on-xamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upload Max Filesize &#8211; Large File Uploads in PHP</title>
		<link>http://www.phpmagicbook.com/upload-max-filesize-large-file-uploads/</link>
		<comments>http://www.phpmagicbook.com/upload-max-filesize-large-file-uploads/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 14:17:27 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[File Upload]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[filesize]]></category>
		<category><![CDATA[ini]]></category>
		<category><![CDATA[settings]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=275</guid>
		<description><![CDATA[By default there is a restriction of 2 Megabytes file upload at a time for PHP. If we have to upload media files or other large files then we will have to change some settings in php.ini. Locate the php.ini file in the folder your upload script resides in. If none exists, install a new [...]<p><a href="http://www.phpmagicbook.com/upload-max-filesize-large-file-uploads/">Upload Max Filesize &#8211; Large File Uploads in PHP</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>By default there is a restriction of 2 Megabytes file upload at a time for PHP. If we have to upload media files or other large files then we will have to change some settings in php.ini.</p>
<ul>
<li>Locate the php.ini file in the folder your upload script resides in. If none exists, install a new php.ini file from the PHP config icon in cPanel. Then, use the File Manager to rename php.ini.default to php.ini</li>
<li>In the php.ini file, locate the line called &#8216;upload_max_filesize = 2M&#8217;</li>
<li>Modify that entry to read &#8216;upload_max_filesize = 10M&#8217;, or whatever your script requires. (M = megabytes)</li>
</ul>
<p><span id="more-275"></span></p>
<p>PHP presents a very versatile and user friendly interface for handling file uploads. The default installation is not capable of working with files greater than 2 Mega Bytes size. Here are some more options for configuring PHP to handle large file transfers.</p>
<p><strong>php.ini settings</strong></p>
<p>The php.ini file contains all the configuration settings for PHP. These can be overridden by directives in apache .htaccess files or even with in the scripts themselves but for the moment let&#8217;s just concentrate on the ini file.</p>
<p>This file contains the following settings that we need to modify according to our needs.</p>
<ul>
<li>file_uploads</li>
<li>upload_max_filesize</li>
<li>max_input_time</li>
<li>memory_limit</li>
<li>max_execution_time</li>
<li>post_max_size</li>
</ul>
<p><strong>file_uploads</strong></p>
<p>If you set this off, uploading is disabled.</p>
<p><strong>upload_max_filesize and post_max_size</strong></p>
<p>Files are POSTed to the webserver in a format known as &#8216;multipart/form-data&#8217;. The post_max_size sets the upper limit on the amount of data that a script can accept in this manner. Ideally this value should be larger than the value that you set for upload_max_filesize.</p>
<p>It&#8217;s important to realize that <strong>upload_max_filesize</strong> is the sum of the sizes of all the files that you are uploading. <strong>post_max_size</strong> is the upload_max_filesize plus the sum of the lengths of all the other fields in the form plus any mime headers that the encoder might include.</p>
<p>According to the PHP documentation you can set a <strong>MAX_UPLOAD_LIMIT</strong> in your HTML form in a hidden field to suggest a limit to the browser but this is not 100% reliable way.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;form&gt;
&lt;input name=&quot;MAX_FILE_SIZE&quot; type=&quot;hidden&quot; value=&quot;10737418240&quot; /&gt;
&lt;/form&gt;</pre></div></div>

<p><strong>memory_limit</strong></p>
<p>When the PHP engine is handling an incoming POST it needs to keep some of the incoming data in memory. Setting too high a value can be very dangerous because if several uploads are being handled concurrently all available memory will be used up and other unrelated scripts that consume a lot of memory might effect the whole server as well.</p>
<p><strong>max_execution_time and max_input_time</strong></p>
<p>These settings define the maximum life time of the script and the time that the script should spend in accepting input. If several mega bytes of data are being transfered max_input_time should be reasonably high. You can override the setting in the ini file for max_input_time by calling the <strong>set_time_limit()</strong> function in your scripts.</p>
<p>While working with uploading in PHP, consider above settings and options in mind and use these very carefully.</p>
<p><a href="http://www.phpmagicbook.com/upload-max-filesize-large-file-uploads/">Upload Max Filesize &#8211; Large File Uploads in PHP</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/php-file-upload-script-globals-off/" title="PHP File Upload Script &#8211; Globals Off">PHP File Upload Script &#8211; Globals Off</a></li><li><a href="http://www.phpmagicbook.com/how-to-setup-vhosts-on-xamp/" title="How to Setup VHOSTS on Xamp">How to Setup VHOSTS on Xamp</a></li><li><a href="http://www.phpmagicbook.com/get-file-size-and-file-type-in-php/" title="Get File Size and File Type In PHP">Get File Size and File Type In PHP</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/upload-max-filesize-large-file-uploads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
