<?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>The Css Bug &#187; PHP</title>
	<atom:link href="http://thecssbug.com/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://thecssbug.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 29 Jul 2009 15:52:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP file uploads</title>
		<link>http://thecssbug.com/php-file-uploads</link>
		<comments>http://thecssbug.com/php-file-uploads#comments</comments>
		<pubDate>Mon, 13 Jul 2009 21:38:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sitepoint]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=105</guid>
		<description><![CDATA[A common challenge faced by PHP programmers is how to accept files uploaded by visitors to your site. In this bonus excerpt from Chapter 12 of the recently published SitePoint book: Build Your Own Database Driven Web Site Using PHP &#38; MySQL (4th Edition), youll learn how to accept file uploads from your web site [...]]]></description>
			<content:encoded><![CDATA[<p>A common challenge faced by PHP programmers is how to accept files uploaded by visitors to your site. In this bonus excerpt from Chapter 12 of the recently published SitePoint book: Build Your Own Database Driven Web Site Using PHP &amp; MySQL (4th Edition), youll learn how to accept file uploads from your web site visitors securely and store them.</p>
<p>full article on<a href="http://www.sitepoint.com/article/handle-file-uploads-php/"> SitePoint</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/php-file-uploads/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wamp wamp</title>
		<link>http://thecssbug.com/wamp-wamp</link>
		<comments>http://thecssbug.com/wamp-wamp#comments</comments>
		<pubDate>Mon, 06 Jul 2009 20:37:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[Sitepoint]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wamp]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=102</guid>
		<description><![CDATA[With the lunch of the 4th edition of the &#8220;Build Your Own Database Driven Web Site Using PHP &#38; MySQL&#8221; book, the SitePoint team starts by offering a superb free tutorial on installing the WAMP platform.
WampServer (where Wamp stands for Windows, Apache, MySQL, and PHP) is a free, all-in-one program that includes built-in copies of [...]]]></description>
			<content:encoded><![CDATA[<p>With the lunch of the 4th edition of the &#8220;Build Your Own Database Driven Web Site Using PHP &amp; MySQL&#8221; book, the SitePoint team starts by offering a superb free tutorial on installing the WAMP platform.</p>
<p>WampServer (where Wamp stands for Windows, Apache, MySQL, and PHP) is a free, all-in-one program that includes built-in copies of recent versions of the Apache web server, PHP, and MySQL.</p>
<p>Full article on  <a href="http://www.sitepoint.com/article/php-amp-mysql-1-installation/">SitePoint</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/wamp-wamp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash XML cache problem</title>
		<link>http://thecssbug.com/flash-xml-cache-problem</link>
		<comments>http://thecssbug.com/flash-xml-cache-problem#comments</comments>
		<pubDate>Wed, 01 Jul 2009 16:42:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Caching]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=87</guid>
		<description><![CDATA[Prevent XML files from caching when working with actionscript and dynamic data.]]></description>
			<content:encoded><![CDATA[<p>One of the most common problem encountered when working with <strong>XML in <a href="http://thecssbug.com/category/flash">Flash</a></strong> and dynamic data, is that the browsers tend to cache the xml files.</p>
<p>Let&#8217;s we are building a dynamic photo gallery in flash using <strong>ActionsScript 3.0</strong>. The data is originally placed in a MySQL database, and through a web application written in PHP, the user is allowed to upload files to the gallery or delete existing files. <a href="http://thecssbug.com/category/flash">Flash</a> is used as a front-end in order to achieve better results for visual effects. When the user makes changes to the gallery, the <a href="http://thecssbug.com/category/php">PHP application</a> updates the XML file located on the webserver with the new data. When accesing the page containing the flash galley, the user should see the updated gallery, but instead he sees the old one. The reason is that the browser loads the XML file from it&#8217;s cache and not the webserver. Not even a refresh won&#8217;t solve this problem on most browsers.</p>
<p>The solution is a small trick used by programmers to fool the browser into thinking it is always loading a different file, by adding an extra parameter (with a ramndom value)  to the URL of the file that is beeing loaded. So, even if the file name itself is the same, the URL changes on every request.</p>
<p>The changes must be made on the portion of the code where the XML file is requested throught ActionScript.</p>
<pre class="brush: c++">

myIdentifier=Math.round(Math.random()*10000);
xmlData.load(&quot;gallery.xml?uid=&quot;+myIdentifier);
</pre>
<p>Simple as that!</p>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/flash-xml-cache-problem/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ImageMagick strip exif (PHP)</title>
		<link>http://thecssbug.com/imagemagik-strip-exif-php</link>
		<comments>http://thecssbug.com/imagemagik-strip-exif-php#comments</comments>
		<pubDate>Tue, 21 Apr 2009 12:01:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[badorgood]]></category>
		<category><![CDATA[exif]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[strip]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=78</guid>
		<description><![CDATA[ImageMagick is probably the best option we have when dealing with image resizing, croping and other small editing jobs that we need when working with image uploads.
As I am running a photography website, where community members are sometimes uploading images straight out of their digital cameras, I came across the following problem:
Digital cameras usually add [...]]]></description>
			<content:encoded><![CDATA[<p><strong>ImageMagick</strong> is probably the best option we have when dealing with image resizing, croping and other small editing jobs that we need when working with image uploads.</p>
<p>As I am running a <a href="http://www.badorgood.com">photography website</a>, where community members are sometimes uploading images straight out of their digital cameras, I came across the following problem:</p>
<p>Digital cameras usually add a lot of extra information in the <strong>EXIF</strong> section of the JPEG file (regarding camera type, camera settings or the exposure conditions under which the shot was taken). When creating thumbnails for images, using the <em>resize</em> or <em>crop</em> functions from <strong>ImageMagick</strong>, all this extra information is kept inside the resized thumbnail, adding significant overhead to the resulting file. For instance a small thumbnail 48 by 48 px (like a member&#8217;s avatar picture) could take over up to 40 Kb if the file contains <strong>EXIF</strong> information, instead of abou 8 Kb without EXIF. Considering  you could have about 50 avatars beeing loaded on a page, reducing the size of the thumbnails could have an important effect on your page loading time.</p>
<p>The solution to this problem is quite trivial. All you have to do is add an extra parameter to your <em>convert</em> command: <em>- strip</em></p>
<p>So if your convert command looked like this:</p>
<pre class="brush: php">

exec(&#039;convert &#039;.$source_file.&#039;  48x48 &#039;.$destination_file.&#039;&#039;);
</pre>
<p>The stripped version would be:</p>
<pre class="brush: php">

exec(&#039;convert &#039;.$source_file.&#039;  -strip 48x48 &#039;.$destination_file.&#039;&#039;);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/imagemagik-strip-exif-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change php max_execution_time value without having access to php.ini</title>
		<link>http://thecssbug.com/change-php-max_execution_time-value-without-having-access-to-phpini</link>
		<comments>http://thecssbug.com/change-php-max_execution_time-value-without-having-access-to-phpini#comments</comments>
		<pubDate>Sun, 12 Apr 2009 21:16:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[max_execution_time]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[web serve]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=75</guid>
		<description><![CDATA[If you are in a shared server environment, and you don&#8217;t have access to the php.ini file,  or you want to set php parameters on a per-site basis, you can use the .htaccess file (when running on an Apache webserver).
For instance, in order to change the max_execution_time value, all you need to do is edit [...]]]></description>
			<content:encoded><![CDATA[<p>If you are in a shared server environment, and you don&#8217;t have access to the php.ini file,  or you want to set php parameters on a per-site basis, you can use the .htaccess file (when running on an Apache webserver).</p>
<p>For instance, in order to change the max_execution_time value, all you need to do is edit .htaccess (located in the root of your website, usually accesible by FTP), and add this line:</p>
<pre class="brush: php">

php_value max_execution_time 120
</pre>
<p>where 120 is the number of seconds you wish to set the maximum execution time for a php script.<br />
There are 2 types of variables that can be set:</p>
<dl>
<dt class="varlistentry"><span class="term"> </span> </dt>
</dl>
<dl>
<dt class="varlistentry"><span class="term"> </span> </dt>
</dl>
<p>1. The values of  specific directives can be set using <code class="systemitem systemitem">php_value</code> <em><tt class="parameter">name</tt></em> <em><tt class="parameter">value</tt></em><span class="term"><code class="systemitem systemitem">. Ex:</code></span></p>
<pre class="brush: php">

php_value memory_limit 128M
</pre>
<p>2.Boolean varibles can be set using <span class="term"><code class="systemitem systemitem">a </code></span><code class="systemitem systemitem">php_flag</code> <em><tt class="parameter">name</tt></em> <em><tt class="parameter">on|off </tt></em><span class="term"><code class="systemitem systemitem">directive. Ex:</code></span></p>
<pre class="brush: php">

php_flag magic_quotes_gpc Off
</pre>
<dl>
<dt class="varlistentry"> <span class="term"> <code class="systemitem systemitem"><br />
</code><em><tt class="parameter"></tt></em> </span> </dt>
</dl>
<p>Other values that can be changed through the .htaccess are:<br />
<span class="link">allow_url_fopen</span><br />
<span class="link">allow_url_inc</span><span class="link">l</span><span class="link">ude</span><br />
<a class="link" href="http://us2.php.net/manual/en/apc.configuration.php#ini.apc.cache-by-default"></a>arg_separator<br />
<span class="link">arg_separator.input</span><br />
<span class="link">arg_separator.output</span><br />
<span class="link">asp_tags</span><br />
<span class="link">default_charset</span><br />
<span class="link">default_mimetype</span><br />
<span class="link">default_socket_timeout</span><br />
<span class="link">define_syslog_variables</span><br />
detect_unicode<br />
<span class="link">display_errors</span><br />
<span class="link">display_startup_errors</span><br />
<span class="link">docref_ext</span><br />
<span class="link">docref_root<br />
</span><span class="link">engine<br />
</span><span class="link">error_append_string</span><a class="link" href="http://us2.php.net/manual/en/errorfunc.configuration.php#ini.docref-root"><br />
</a><span class="link">error_log<br />
</span><span class="link">error_prepend_string</span><a class="link" href="http://us2.php.net/manual/en/errorfunc.configuration.php#ini.docref-root"><br />
</a><span class="link">error_reporting<br />
</span><span class="link">gpc_order<br />
</span><span class="link">html_errors<br />
http.allowed_methods</span><a class="link" href="http://us2.php.net/manual/en/errorfunc.configuration.php#ini.docref-root"><br />
</a><span class="link">log_errors<br />
</span><span class="link">log_errors_max_len</span><a class="link" href="http://us2.php.net/manual/en/errorfunc.configuration.php#ini.docref-root"><br />
</a><span class="link">magic_quotes_gpc<br />
</span><span class="link">magic_quotes_runtime</span><a class="link" href="http://us2.php.net/manual/en/errorfunc.configuration.php#ini.docref-root"><br />
</a><span class="link">max_execution_time<br />
</span><span class="link">max_input_time<br />
</span><span class="link">memory_limit<br />
</span><span class="link">msql.allow_persistent<br />
</span><span class="link">mysql.allow_persistent<br />
mysql.cache_size</span><a class="link" href="http://us2.php.net/manual/en/errorfunc.configuration.php#ini.docref-root"><br />
</a><span class="link">mysql.connect_timeout<br />
</span><span class="link">mysql.default_host<br />
</span><span class="link">mysql.default_port<br />
</span><span class="link">mysql.max_persistent<br />
</span><span class="link">post_max_s</span><span class="link">i</span><span class="link">ze<br />
</span><span class="link">regis</span><span class="link">t</span><span class="link">er_glo</span><span class="link">b</span><span class="link">als<br />
</span><span class="link">register_long_arrays<br />
</span><span class="link">safe_mode<br />
</span><span class="link">sendmail_from</span><span class="link"><br />
</span><span class="link">session.auto_start<br />
</span><span class="link">session.cache_expire<br />
</span><span class="link">session.cache_limiter<br />
</span><span class="link">session.use_cookies<br />
</span><span class="link">short_open_tag<br />
</span><span class="link">smtp_port<br />
</span><span class="link">upload_max_filesize<br />
</span><span class="link">url_rewriter.tags<br />
</span><span class="link">user_agent<br />
</span><span class="link">user_dir<br />
</span><span class="link">zlib.output_compression</span></p>
<p><em>Note: You will need      &#8220;AllowOverride Options&#8221; or &#8220;AllowOverride All&#8221; privileges in order to be able to use htaccess to modify php variables.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/change-php-max_execution_time-value-without-having-access-to-phpini/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SyntaxHighlighter Plus problem</title>
		<link>http://thecssbug.com/syntaxhighlighter-plus-problem</link>
		<comments>http://thecssbug.com/syntaxhighlighter-plus-problem#comments</comments>
		<pubDate>Mon, 06 Apr 2009 21:03:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[header.php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[ProBlogger]]></category>
		<category><![CDATA[SyntaxHighlighter Plus]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=67</guid>
		<description><![CDATA[As I  started to build this blog, I clearly needed some solution for displaying code on a wordpress blog.
Asfter studying a few solutions with more or less results, I decided uppon SyntaxHighlighter Plus which seams to be the best solution out there.
However, although it worked great with the default Wordpress theme I realised that as [...]]]></description>
			<content:encoded><![CDATA[<p>As I  started to build this blog, I clearly needed some solution for displaying code on a wordpress blog.</p>
<p>Asfter studying a few solutions with more or less results, I decided uppon SyntaxHighlighter Plus which seams to be the best solution out there.</p>
<p>However, although it worked great with the default Wordpress theme I realised that as soon as I applied the &#8220;ProBlogger&#8221; theme, the javascripts that do the highlighting work would not function corectllyany more. The documentation did offer some solutions, but not the one I needed.</p>
<p>So, if you run into problems when installing SyntaxHighlighter Plus on some wordpress theme, be sure that the <em>header.php</em> file in your theme, contains the following line, somewhere in the head portion of the file:</p>
<pre class="brush: php">
&lt;?php wp_head(); ?&gt;
&lt;/head&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/syntaxhighlighter-plus-problem/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
