<?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>Blonko! &#187; sqlite</title>
	<atom:link href="http://www.wonko.be/tag/sqlite/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wonko.be</link>
	<description>Blog + Wonko = Blonko!</description>
	<lastBuildDate>Mon, 16 Aug 2010 18:03:04 +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>sqlite version 2 in PHP on OS X</title>
		<link>http://www.wonko.be/2008/01/02/sqlite-version-2-in-php-on-os-x</link>
		<comments>http://www.wonko.be/2008/01/02/sqlite-version-2-in-php-on-os-x#comments</comments>
		<pubDate>Wed, 02 Jan 2008 11:47:39 +0000</pubDate>
		<dc:creator>blonko</dc:creator>
				<category><![CDATA[blonko]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.wonko.be/2008/01/02/sqlite-version-2-in-php-on-os-x/</guid>
		<description><![CDATA[While working some more on a symfony project, I wanted to migrate the setup on the testing servers to my laptop, so I could continue working when I wasn&#8217;t at the office. The project used a SQLite database, as the data stored is minimal (some hostnames and logins). On the testing servers, we had no [...]]]></description>
			<content:encoded><![CDATA[<p>While working some more on a <a href="http://www.symfony-project.org">symfony</a> project, I wanted to migrate the setup on the testing servers to my laptop, so I could continue working when I wasn&#8217;t at the office.</p>
<p>The project used a SQLite database, as the data stored is minimal (some hostnames and logins). On the testing servers, we had no problems using and working with these, and all needed parts happily talked to the datafiles. Alas, when running it on my Macbook Pro running Leopard, I got some errors from symfony, complaining the datafile was encrypted or no real sqlite datafile.</p>
<p>A quick check gave no real indication of the problem; the datafile appeared to be correct and worked using the CLI tools:</p>
<pre>
bernard:tmp bernard$ sqlite3 project.sqlite
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> .tables
ftp_hosts_and_logins       sf_guard_remember_key
ftp_path                   sf_guard_user
sf_guard_group             sf_guard_user_group
sf_guard_group_permission  sf_guard_user_permission
sf_guard_permission
sqlite>
</pre>
<p>I even dumped the data to a text-file, and re-imported it using the cli-tools. Nothing helped, symfony (well, php) could not read the file. After a while, the problem was found. On Leopard, all the SQLite version 3 tools are included on the system, but in the PHP which is shipped with Leopard, the linked in library is version 2. </p>
<p><img src='http://www.wonko.be/wp-content/uploads/2008/01/sqlite2.png' alt='sqlite2.png' /></p>
<p>This would be no problem, but it seems Leopard ships without the SQLite version 2 cli tools, so there was no obvious way to convert this datafile to version 2 (or I should use the tools on the testing server, but then I had no way of using it from within my shell, which was no option).</p>
<p>This is just plain stupid. All libraries and tools are version 3, but the the linked library for PHP is version 2. Talk about forgetting something. As propel can&#8217;t work with PDO (another db layer in php), I either had to replace my PHP on Leopard with a custom-made one, or try to install the sqlite 2 tools. Neither seemed a good idea, I hate to replace my defaults with custom stuff.</p>
<p>It resulted in converting the SQLite database to MySQL and changing my symfony project to use the MySQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonko.be/2008/01/02/sqlite-version-2-in-php-on-os-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!--f0c25b539901624b460e129d15264305-->