<?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>Everyday Internet Stuff &#187; PHP</title>
	<atom:link href="http://www.everydayinternetstuff.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.everydayinternetstuff.com</link>
	<description>Useful Tips And Tricks For Webmasters</description>
	<lastBuildDate>Tue, 27 Dec 2011 21:01:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>expecting T_PAAMAYIM_NEKUDOTAYIM</title>
		<link>http://www.everydayinternetstuff.com/2009/07/expecting-t_paamayim_nekudotayim/</link>
		<comments>http://www.everydayinternetstuff.com/2009/07/expecting-t_paamayim_nekudotayim/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 11:11:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[T_PAAMAYIM_NEKUDOTAYIM]]></category>

		<guid isPermaLink="false">http://www.everydayinternetstuff.com/?p=23</guid>
		<description><![CDATA[If you get PHP error something like &#8220;syntax error, unexpected &#8216;)&#8217;, expecting T_PAAMAYIM_NEKUDOTAYIM&#8221; it should be immediately obvious to you that PHP parser believes that you are missing a dollar sign in front of one of the variable names on that particular line (for example in isset or foreach clause) Isn&#8217;t this obvious?]]></description>
			<content:encoded><![CDATA[<p>If you get PHP error something like &#8220;<strong><em>syntax error, unexpected &#8216;)&#8217;, expecting T_PAAMAYIM_NEKUDOTAYIM&#8221;</em><span style="font-weight: normal;"> it should be immediately obvious to you that PHP parser believes that you are missing a dollar sign in front of one of the variable names on that particular line (for example in isset or foreach clause)</span></strong></p>
<p>Isn&#8217;t this obvious?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.everydayinternetstuff.com/2009/07/expecting-t_paamayim_nekudotayim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download and install wordpress with single PHP script</title>
		<link>http://www.everydayinternetstuff.com/2009/07/download-and-install-wordpress-with-single-php-script/</link>
		<comments>http://www.everydayinternetstuff.com/2009/07/download-and-install-wordpress-with-single-php-script/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 18:33:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Single file automatic Wordpress install]]></category>

		<guid isPermaLink="false">http://www.everydayinternetstuff.com/?p=21</guid>
		<description><![CDATA[One of the common tasts that I have to do recently is installing wordpress on new website. While configuring the WordPress is simple and fast before you get there you need to download wordpress ZIP file, extract it to the correct folder (by default unzipping the file will create folder &#8220;wordpress&#8221; that you most likely [...]]]></description>
			<content:encoded><![CDATA[<p>One of the common tasts that I have to do recently is installing wordpress on new website. While configuring the WordPress is simple and fast before you get there you need to download wordpress ZIP file, extract it to the correct folder (by default unzipping the file will create folder &#8220;wordpress&#8221; that you most likely don&#8217;t need). I&#8217;ve put together the folling script that would automatically download latest WordPress version, unzip it to correct folder and redirect you to configuration page. All you need to do is craete and configure the database.</p>
<p>You can <a title="Wordpress install script" href="http://www.everydayinternetstuff.com/wp-content/uploads/2009/09/installwordpress.zip">download the script from here</a>. Here&#8217;s the script listing for information purposes (because WordPress changes quotation symbols copy-pasting it will not product working PHP code):</p>
<blockquote><p>&lt;?php</p>
<p>$URL = &#8220;http://wordpress.org/latest.zip&#8221;;</p>
<p>$ch = curl_init($URL);</p>
<p>curl_setopt($ch, CURLOPT_VERBOSE, 1);</p>
<p>curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);</p>
<p>curl_setopt ($ch, CURLOPT_URL, $URL);</p>
<p>curl_setopt ($ch, CURLOPT_TIMEOUT, 600);</p>
<p>curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);</p>
<p>$content = curl_exec($ch);</p>
<p>$fh = fopen(&#8220;wordpress.zip&#8221;, &#8220;wb&#8221;);</p>
<p>fwrite($fh, $content);</p>
<p>fclose($fh);</p>
<p>$zip = zip_open(&#8220;wordpress.zip&#8221;);</p>
<p>$dst_path = $_REQUEST['path'];</p>
<p>if ($dst_path == &#8221;) { $dst_path = &#8216;.&#8217;; }</p>
<p>while ($entry = zip_read($zip))</p>
<p>{</p>
<p>$name = zip_entry_name($entry);</p>
<p>if (preg_match(&#8216;/\/$/&#8217;, $name)) { continue; }</p>
<p>$new_name = preg_replace(&#8216;/^wordpress/i&#8217;, $dst_path, $name);</p>
<p>if (preg_match(&#8216;/^(.+)\/([^\/]+)$/i&#8217;, $new_name, $matches)) {</p>
<p>$directory = $matches[1];</p>
<p>if ($directory != &#8221; &amp;&amp; !is_dir($directory)) {</p>
<p>if (!mkdir($directory, 0777, 1)) {</p>
<p>return FALSE;</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p>$fh = fopen($new_name, &#8220;wb&#8221;);</p>
<p>zip_entry_open($zip, $entry, &#8220;rb&#8221;);</p>
<p>while ($data = zip_entry_read($entry))</p>
<p>{</p>
<p>fwrite($fh, $data);</p>
<p>}</p>
<p>zip_entry_close($entry);</p>
<p>fclose($fh);</p>
<p>}</p>
<p>zip_close($zip);</p>
<p>header(&#8220;Location: /&#8221;);</p>
<p>?&gt;</p></blockquote>
<p>Using it is very simple: create file installwordpress.php and copy-paste this script there and then navigate your browser to this file. All should happen automatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.everydayinternetstuff.com/2009/07/download-and-install-wordpress-with-single-php-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup large MySQL database without SSH access</title>
		<link>http://www.everydayinternetstuff.com/2009/06/backup-large-mysql-database-without-ssh-access/</link>
		<comments>http://www.everydayinternetstuff.com/2009/06/backup-large-mysql-database-without-ssh-access/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 06:41:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQLDumper]]></category>
		<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://www.everydayinternetstuff.com/?p=14</guid>
		<description><![CDATA[Moving your databases around is easy when they are small. When they get large it may become a problem especially if you are on a shared hosting&#8230; One of my website&#8217;s database grew to 5.5Gb in size. When it&#8217;s that big phpMyAdmin and standard control panel backup scripts just don&#8217;t work. Fortunately there is a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mysqldumper.de/"><img class="alignleft size-full wp-image-17" style="border: 0pt none; margin: 5px;" title="mysqldumper" src="http://www.everydayinternetstuff.com/wp-content/uploads/2009/06/mysqldumper.jpg" alt="mysqldumper" width="190" height="191" /></a>Moving your databases around is easy when they are small. When they get large it may become a problem especially if you are on a shared hosting&#8230;</p>
<p>One of my website&#8217;s database grew to 5.5Gb in size. When it&#8217;s that big phpMyAdmin and standard control panel backup scripts just don&#8217;t work. Fortunately there is a great solution: <a href="http://www.mysqldumper.de/">MysqlDumper.de</a> (<a href="http://translate.google.com/translate?u=http%3A//www.mysqldumper.de/&amp;hl=en&amp;langpair=auto|en&amp;tbb=1&amp;ie=UTF-8">english translation</a>). It&#8217;s PHP/AJAX application that backs up and restores your databases part by part. It&#8217;s really straightforward to use.</p>
<p>It took it 10+ hours to export by 5.5Gb database as 700Mb of GZipped SQL scripts but it got the job done 100%. Another nice touch about it is that it allows you to break down your backups into parts so you can start restoring the database at the new location the moment first part is ready. This can be quite useful since when you are restoring database this big reconstructing indexes can take a very long time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.everydayinternetstuff.com/2009/06/backup-large-mysql-database-without-ssh-access/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

