<?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>S.G. Vulcan &#187; apache</title>
	<atom:link href="http://www.sgvulcan.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sgvulcan.com</link>
	<description>Silviu&#039;s tech blog. Resources and informations about linux, windows, symbian systems, networks, reviews, microcontrollers, and more.</description>
	<lastBuildDate>Wed, 01 Feb 2012 09:20:13 +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>Error noticed in Joomla site apache logs</title>
		<link>http://www.sgvulcan.com/error-noticed-in-joomla-site-apache-logs/</link>
		<comments>http://www.sgvulcan.com/error-noticed-in-joomla-site-apache-logs/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 17:50:23 +0000</pubDate>
		<dc:creator>silviu</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.sgvulcan.com/?p=1609</guid>
		<description><![CDATA[rowsing trough my web logs I found the following error in the apache error log of a Joomla site: View Code APACHELOG1 [Mon Oct 17 13:49:16 2011] [error] [client aaa.aaa.aaa.aaa] PHP Notice: Array to string conversion in aaa/libraries/joomla/html/parameter.php on line 83 One suggestion found online was: Edit parameters.php and change the line 83 as follows: Before: View Code PHP1 if &#40;trim&#40; $data &#41;&#41; &#123; After: View Code PHP1 if &#40;$data&#41; &#123; But modifying core joomla files isn&#8217;t such a hot idea as one user notices. So the solution is fixing the plugin causing the problem in the first place: Edit plugins/system/JoomSEO.php at line 46 View Code PHP1 $this-&#62;params = new JParameter&#40;$params&#41;; replace with View Code PHP1 $this-&#62;params = new JParameter&#40;$params&#91;'params'&#93;&#41;;]]></description>
			<content:encoded><![CDATA[<p>rowsing trough my web logs I found the following error in the apache error log of a Joomla site:</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1609code6'); return false;">View Code</a> APACHELOG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16096"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1609code6"><pre class="apachelog" style="font-family:monospace;">[Mon Oct 17 13:49:16 2011] [error] [client aaa.aaa.aaa.aaa] PHP Notice: Array to string conversion in aaa/libraries/joomla/html/parameter.php on line 83</pre></td></tr></table></div>

<p>One suggestion found <a href="http://www.joomseo.com/forums/4711.html" target="_blank">online</a> was:</p>
<p>Edit parameters.php and change the line 83 as follows:</p>
<p>Before:</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1609code7'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16097"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1609code7"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/trim"><span style="color: #990000;">trim</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$data</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>After:</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1609code8'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16098"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1609code8"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>But modifying core joomla files isn&#8217;t such a hot idea as one user notices. So the solution is fixing the plugin causing the problem in the first place:</p>
<p>Edit plugins/system/JoomSEO.php at line 46</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1609code9'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p16099"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1609code9"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> JParameter<span style="color: #009900;">&#40;</span><span style="color: #000088;">$params</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>replace with</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1609code10'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p160910"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1609code10"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> JParameter<span style="color: #009900;">&#40;</span><span style="color: #000088;">$params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'params'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<div id="in_post_ad_bottom_1" style="clear:both;margin: 5px;padding: 0px;"><p> </p>
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-7825242150714747";
/* Dupa articol 468x60, created 8/19/09 */
google_ad_slot = "8916341192";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://www.sgvulcan.com/error-noticed-in-joomla-site-apache-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Joomla 1.0 work with PHP 5.3</title>
		<link>http://www.sgvulcan.com/make-joomla-1-0-work-with-php-5-3/</link>
		<comments>http://www.sgvulcan.com/make-joomla-1-0-work-with-php-5-3/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 10:43:03 +0000</pubDate>
		<dc:creator>silviu</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.sgvulcan.com/make-joomla-1-0-work-with-php-5-3/</guid>
		<description><![CDATA[With the recent posts regarding resurrecting old stuff, recently I had to resurrect a Joomla 1.0 site. Soon enough I discovered that the home page doesn&#8217;t display correctly. No errors, just lots of white space . The problem is that Joomla 1.0 is not really made for PHP 5.3. Of course I could have started a virtual machine with the right environment but I wanted it running along some newer sites. Here&#8217;s an easy fix: Edit ./includes/Cache/Lite/Function.php, find the line reading View Code PHP1 &#60;strong&#62;$arguments = func_get_args&#40;&#41;;&#60;/strong&#62; and replace with: View Code PHP1 2 3 4 5 $arguments = func_get_args&#40;&#41;; $numargs = func_num_args&#40;&#41;; for&#40;$i=1; $i &#38;lt; $numargs; $i++&#41;&#123; $arguments&#91;$i&#93; = &#38;amp;$arguments&#91;$i&#93;; &#125; Check now, it should be working. Enjoy your new old site &#160;]]></description>
			<content:encoded><![CDATA[<p>With the recent posts regarding resurrecting old stuff, recently I had to resurrect a Joomla 1.0 site. Soon enough I discovered that the home page doesn&#8217;t display correctly. No errors, just lots of white space <img src='http://www.sgvulcan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . The problem is that Joomla 1.0 is not really made for PHP 5.3. Of course I could have started a virtual machine with the right environment but I wanted it running along some newer sites. Here&#8217;s an easy fix:</p>
<p>Edit ./includes/Cache/Lite/Function.php, find the line reading</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1516code13'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p151613"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1516code13"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span><span style="color: #000088;">$arguments</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/func_get_args"><span style="color: #990000;">func_get_args</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>strong<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>and replace with:</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1516code14'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p151614"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p1516code14"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$arguments</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/func_get_args"><span style="color: #990000;">func_get_args</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$numargs</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/func_num_args"><span style="color: #990000;">func_num_args</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #000088;">$numargs</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$arguments</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span><span style="color: #000088;">$arguments</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Check now, it should be working. Enjoy your new <em>old</em> site <img src='http://www.sgvulcan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin: 5px;padding: 0px;"><p> </p>
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-7825242150714747";
/* Dupa articol 468x60, created 8/19/09 */
google_ad_slot = "8916341192";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://www.sgvulcan.com/make-joomla-1-0-work-with-php-5-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Akismet troubles traced back to DNS issues.</title>
		<link>http://www.sgvulcan.com/akismet-troubles-traced-back-to-dns-issues/</link>
		<comments>http://www.sgvulcan.com/akismet-troubles-traced-back-to-dns-issues/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 05:50:34 +0000</pubDate>
		<dc:creator>silviu</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[akismet]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[mtr]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ping]]></category>

		<guid isPermaLink="false">http://www.sgvulcan.com/?p=1439</guid>
		<description><![CDATA[My API key for Akismet was suddenly unconfirmed by reason of not being able to reach akismet.com My provider had indeed troubles with their primary DNS so I switched to the google public one. (8.8.8.8). This is a server not a browsing machine so I don&#8217;t have any privacy worries. Long storry short, I changed the DNS and expected the problem to go away. Next day I was happy to find out that it didn&#8217;t. I pinged akismet.com from the console, tried http connection to it with links everything was fine. For good measure I tried other DNS entries, tried a mtr to akismet.com but still everything was fine and the key in Akismet Configuration refused to work. Than, after a slap on my forehead I remembered THIS. Right, after View Code BASH1 2 # service httpd stop # service httpd start Everything went back to normal.]]></description>
			<content:encoded><![CDATA[<p>My API key for Akismet was suddenly unconfirmed by reason of not being able to reach akismet.com My provider had indeed troubles with their primary DNS so I switched to the google public one. (8.8.8.8). This is a server not a browsing machine so I don&#8217;t have any privacy worries.</p>
<p>Long storry short, I changed the DNS and expected the problem to go away. Next day I was happy to find out that it didn&#8217;t. I pinged akismet.com from the console, tried http connection to it with links everything was fine. For good measure I tried other DNS entries, tried a mtr to akismet.com but still everything was fine and the key in Akismet Configuration refused to work.</p>
<p>Than, after a slap on my forehead I remembered <strong><a href="http://www.sgvulcan.com/php-code-misses-dns-updates/">THIS</a>.</strong> Right, after</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1439code16'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p143916"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p1439code16"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># service httpd stop</span>
<span style="color: #666666; font-style: italic;"># service httpd start</span></pre></td></tr></table></div>

<p>Everything went back to normal.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin: 5px;padding: 0px;"><p> </p>
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-7825242150714747";
/* Dupa articol 468x60, created 8/19/09 */
google_ad_slot = "8916341192";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://www.sgvulcan.com/akismet-troubles-traced-back-to-dns-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP code misses DNS updates.</title>
		<link>http://www.sgvulcan.com/php-code-misses-dns-updates/</link>
		<comments>http://www.sgvulcan.com/php-code-misses-dns-updates/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 12:26:00 +0000</pubDate>
		<dc:creator>silviu</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[dns]]></category>

		<guid isPermaLink="false">http://www.sgvulcan.com/?p=1141</guid>
		<description><![CDATA[Apache needs a full stop &#38; start on DNS changes. While working on a test environment I noticed that php code was not finding new hosts. The hosts were served by an internal, private dns server which was configured as default in resolv.conf Warning: file_get_contents(http://www.testdomain.com/webapp/file.php) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /var/www/htdocs/test.php on line 4 192.168.1.40 [root@jentlaibm01 manager]# cat test.php Download test.txt1 2 3 4 5 6 7 &#60;?php error_reporting&#40;E_ALL&#41;; ini_set&#40;'display_errors','on'&#41;; echo file_get_contents&#40;&#34;http://www.testdomain.com/webapp/file.php&#34;&#41;; $ip = gethostbyname&#40;'www.testdomain.com'&#41;; echo $ip; ?&#62; Ping was working so any other test I tried, the only part not resolving the newly added host was the php application. I tried restarting (both graceful and restart) the apache server but to no avail. At some point I simply stopped apache, waited a few seconds and started it again. Suddenly the php code was finding the new host. Apparently apache needs a full stop and start in order to update previously obtained DNS entries.]]></description>
			<content:encoded><![CDATA[<h2>Apache needs a full stop &amp; start on DNS changes.</h2>
<p>While working on a test environment I noticed that php code was not finding new hosts. The hosts were served by an internal, private dns server which was configured as default in resolv.conf</p>
<p><strong>Warning</strong>:  file_get_contents(http://www.testdomain.com/webapp/file.php) [<a href="http://manager.jentla.ibm.com//function.file-get-contents">function.file-get-contents</a>]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error  in <strong>/var/www/htdocs/test.php</strong> on line <strong>4</strong></p>
<p>192.168.1.40</p>
<p>[root@jentlaibm01 manager]# cat test.php</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left2">Download <a href="http://www.sgvulcan.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=1141&amp;download=test.txt">test.txt</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p114118"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p1141code18"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<a href="http://www.php.net/error_reporting"><span style="color: #990000;">error_reporting</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">E_ALL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<a href="http://www.php.net/ini_set"><span style="color: #990000;">ini_set</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'display_errors'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'on'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">echo</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.testdomain.com/webapp/file.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$ip</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/gethostbyname"><span style="color: #990000;">gethostbyname</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'www.testdomain.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$ip</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<div>Ping was working so any other test I tried, the only part not resolving the newly added host was the php application. I tried restarting (both graceful and restart) the apache server but to no avail. At some point I simply stopped apache, waited a few seconds and started it again. Suddenly the php code was finding the new host.</div>
<div><strong>Apparently apache needs a full stop and start in order to update previously obtained DNS entries.</strong></div>
<div id="in_post_ad_bottom_1" style="clear:both;margin: 5px;padding: 0px;"><p> </p>
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-7825242150714747";
/* Dupa articol 468x60, created 8/19/09 */
google_ad_slot = "8916341192";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://www.sgvulcan.com/php-code-misses-dns-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 2.2 will not serve corectly from CIFS mounted share</title>
		<link>http://www.sgvulcan.com/apache-2-2-will-not-serve-corectly-from-cifs-mounted-share/</link>
		<comments>http://www.sgvulcan.com/apache-2-2-will-not-serve-corectly-from-cifs-mounted-share/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 09:09:40 +0000</pubDate>
		<dc:creator>silviu</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[smbfs]]></category>
		<category><![CDATA[symlink]]></category>

		<guid isPermaLink="false">http://www.sgvulcan.com/?p=1062</guid>
		<description><![CDATA[I have a home server I use for all kinds of stuff when I&#8217;m away. I have set it up recently so that it can serve a folder mounted over the network from a Windows machine. And this is where the fun started! The folders and files appear correctly, I can navigate and I can download them. Only that the files, even if apparently having the same size are corrupted. I checked the FollowSymLinks and as expected was set as required. I tried wget in the command prompt to see if I could find some enlightment but I got the following errors: View Code BASH1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 # wget http://192.xxx.xxx.xxx/windowsshare/folder/file.jpg --09:18:00-- http://192.xxx.xxx.xxx/windowsshare/folder/file.jpg =&#62; `file.jpg' Connecting to 127.0.0.1:80... connected. HTTP request sent, awaiting response... 200 OK Length: 763,685 (746K) [image/jpeg] &#160; 0% [ ] 0 --.--K/s &#160; 09:18:00 (0.00 B/s) - Connection closed at byte 0. Retrying. &#160; --09:18:01-- http://192.xxx.xxx.xxx/windowsshare/folder/file.jpg (try: 2) =&#62; `file.jpg' Connecting to 127.0.0.1:80... connected. HTTP request sent, awaiting response... 200 OK Length: 763,685 &#40;746K&#41; &#91;image/jpeg&#93; file.jpg has sprung into existence. [...]]]></description>
			<content:encoded><![CDATA[<p>I have a home server I use for all kinds of stuff when I&#8217;m away. I have set it up recently so that it can serve a folder mounted over the network from a Windows machine.</p>
<p><em>And this is where the fun started!</em></p>
<p>The folders and files appear correctly, I can navigate and I can download them. Only that the files, even if apparently having the same size are corrupted. I checked the <strong><em>FollowSymLinks </em></strong>and as expected was set as required. I tried wget in the command prompt to see if I could find some enlightment but I got the following errors:</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1062code20'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p106220"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre></td><td class="code" id="p1062code20"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># wget http://192.xxx.xxx.xxx/windowsshare/folder/file.jpg</span>
 --09:<span style="color: #000000;">18</span>:00--  http:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #000000;">192</span>.xxx.xxx.xxx<span style="color: #000000; font-weight: bold;">/</span>windowsshare<span style="color: #000000; font-weight: bold;">/</span>folder<span style="color: #000000; font-weight: bold;">/</span>file.jpg
 =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">`</span>file.jpg<span style="color: #ff0000;">'
 Connecting to 127.0.0.1:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 763,685 (746K) [image/jpeg]
&nbsp;
 0%
 [                                                                  ]
 0             --.--K/s
&nbsp;
 09:18:00 (0.00 B/s) - Connection closed at byte 0. Retrying.
&nbsp;
 --09:18:01--  http://192.xxx.xxx.xxx/windowsshare/folder/file.jpg
 (try: 2) =&gt; `file.jpg'</span>
 Connecting to 127.0.0.1:<span style="color: #000000;">80</span>... connected.
 HTTP request sent, awaiting response... <span style="color: #000000;">200</span> OK
 Length: <span style="color: #000000;">763</span>,<span style="color: #000000;">685</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>746K<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>image<span style="color: #000000; font-weight: bold;">/</span>jpeg<span style="color: #7a0874; font-weight: bold;">&#93;</span>
 file.jpg has sprung into existence.
 Retrying.
&nbsp;
 --09:<span style="color: #000000;">18</span>:03--  http:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #000000;">192</span>.xxx.xxx.xxx<span style="color: #000000; font-weight: bold;">/</span>windowsshare<span style="color: #000000; font-weight: bold;">/</span>folder<span style="color: #000000; font-weight: bold;">/</span>file.jpg
 <span style="color: #7a0874; font-weight: bold;">&#40;</span>try: <span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">`</span>file.jpg.1<span style="color: #ff0000;">'
 Connecting to 127.0.0.1:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 763,685 (746K) [image/jpeg]
&nbsp;
 0%
 [                                                                  ]
 0             --.--K/s</span></pre></td></tr></table></div>

<p>and it will continue like this creating empty files.</p>
<p>Especial the <strong>has sprung into existence</strong> baffled me. Also note that symlinking any other folder, even mounted as <strong>smbfs</strong> instead of <strong>cifs</strong> worked perfectly. At this point changing the mount to smbfs would have solved my problem but curiosity was stronger.</p>
<p>As it turns either apache or (more likely) the cifs driver has a bug. You can work around it by setting the following inside your apache configuration.</p>
<pre>EnableSendfile off</pre>
<p>Further upgrades will probably eradicate this problem.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin: 5px;padding: 0px;"><p> </p>
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-7825242150714747";
/* Dupa articol 468x60, created 8/19/09 */
google_ad_slot = "8916341192";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://www.sgvulcan.com/apache-2-2-will-not-serve-corectly-from-cifs-mounted-share/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Uploading big files via php</title>
		<link>http://www.sgvulcan.com/uploading-big-files-php/</link>
		<comments>http://www.sgvulcan.com/uploading-big-files-php/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 09:43:45 +0000</pubDate>
		<dc:creator>silviu</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://www.sgvulcan.com/?p=714</guid>
		<description><![CDATA[I&#8217;m updating a site for a client that only has file access to his hosting account via a php file manager (extPlorer for Joomla to be precise). He needed uploaded a few flash videos (in excess of 15 Mb each) but extPlorer stated that the file limit for php was set to 8 Mb. I already knew that .htaccess overrides were allowed since I used .htaccess to enable a seo component for the site. So adding the following lines to .htaccess (in the root folder of his site) was enough to allow large uploads using a php upload. If it doesn&#8217;t exist you&#8217;ll need to create a text file named .htaccess in the root of the site containing the following code: View Code BASH1 2 3 4 php_value upload_max_filesize 30M php_value post_max_size 30M php_value max_execution_time 250 php_value max_input_time 250 If you don&#8217;t see an increase of the allowed upload size it means that you are not allowed to override this settings and you&#8217;ll need to contact your hosting provider.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sgvulcan.com/wp-content/uploads/2010/02/phpupload.jpg" rel="lightbox[714]"><img class="alignleft size-full wp-image-715" title="phpupload" src="http://www.sgvulcan.com/wp-content/uploads/2010/02/phpupload.jpg" alt="" width="200" height="140" /></a>I&#8217;m updating a site for a client that only has file access to his hosting account via a php file manager (extPlorer for Joomla to be precise). He needed uploaded a few flash videos (in excess of 15 Mb each) but extPlorer stated that the file limit for php was set to 8 Mb.</p>
<p>I already knew that .htaccess overrides were allowed since I used .htaccess to enable a seo component for the site. So adding the following lines to .htaccess (in the root folder of his site) was enough to allow large uploads using a php upload.</p>
<p>If it doesn&#8217;t exist you&#8217;ll need to create a text file named .htaccess in the root of the site containing the following code:</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p714code22'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p71422"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p714code22"><pre class="bash" style="font-family:monospace;">php_value upload_max_filesize 30M
php_value post_max_size 30M
php_value max_execution_time <span style="color: #000000;">250</span>
php_value max_input_time <span style="color: #000000;">250</span></pre></td></tr></table></div>

<p>If you don&#8217;t see an increase of the allowed upload size it means that you are not allowed to override this settings and you&#8217;ll need to contact your hosting provider.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin: 5px;padding: 0px;"><p> </p>
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-7825242150714747";
/* Dupa articol 468x60, created 8/19/09 */
google_ad_slot = "8916341192";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://www.sgvulcan.com/uploading-big-files-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

