<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "poll - fclose() error"]]></title>
		<link>https://proxy2.de/forum/posts/list/3.php</link>
		<description><![CDATA[Latest messages posted in the topic "poll - fclose() error"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>poll - fclose() error</title>
				<description><![CDATA[ I just downloaded and installed the poll becasue I want to quit using the Bravenet poll that I currently use. I changed permissions as per the readme file. But when I access mydomain/poll/admin I get the following errors:<br /> <br /> Warning: fclose() has been disabled for security reasons in /home/obsessed/public_html/poll/include/class_template.php on line 75<br /> <br /> Warning: Cannot modify header information - headers already sent by (output started at /home/obsessed/public_html/poll/include/class_template.php:75) in /home/obsessed/public_html/poll/admin/common.inc.php on line 15<br /> <br /> Warning: Cannot modify header information - headers already sent by (output started at /home/obsessed/public_html/poll/include/class_template.php:75) in /home/obsessed/public_html/poll/admin/common.inc.php on line 16<br /> <br /> Warning: Cannot modify header information - headers already sent by (output started at /home/obsessed/public_html/poll/include/class_template.php:75) in /home/obsessed/public_html/poll/admin/common.inc.php on line 17<br /> <br /> Warning: Cannot modify header information - headers already sent by (output started at /home/obsessed/public_html/poll/include/class_template.php:75) in /home/obsessed/public_html/poll/admin/common.inc.php on line 18<br /> <br /> The login box shows below that but a graphic is missing. Please help!<br /> <br /> Thank you<br /> <br /> Stevendude<br /> www.obsessed-with-music.com]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16423.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16423.php</link>
				<pubDate><![CDATA[Thu, 9 Jun 2005 07:11:06]]> GMT</pubDate>
				<author><![CDATA[ stevendude]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ fclose has been banned but not fopen :-/ really stupid security that one.  I came across this problem with the guestbook on some servers and the fix is easy. I'm about to hit the sack after a 12 hour night shift so will look at the code later. So long as it's only the template stuff I should be able to replace the fopen, fread, fclose bit with just file_get_contents]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16425.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16425.php</link>
				<pubDate><![CDATA[Thu, 9 Jun 2005 08:39:17]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Thank you, I appreciate whatever help you can be with this.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16555.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16555.php</link>
				<pubDate><![CDATA[Tue, 14 Jun 2005 17:09:37]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Sorry forgot all about this :|busy and all that<br /> <br /> Open class_templates.php<br /> <br /> replace<br /> [code]$fp = fopen&#40;$file_path, 'r'&#41;;                <br /> $this-&gt;files&#91;$filename&#93; = fread&#40;$fp, filesize&#40;$file_path&#41;&#41;;<br /> fclose&#40;$fp&#41;;[/code]<br /> <br /> with<br /> [code]$this-&gt;files&#91;$filename&#93; = file_get_contents&#40;$file_path&#41;;[/code]<br /> <br /> Should work but as I haven't tried it no promises.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16557.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16557.php</link>
				<pubDate><![CDATA[Tue, 14 Jun 2005 17:21:15]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ That worked! But now, on the next page I get the errors below:<br /> <br /> What should I substitute there?<br /> <br /> <br /> Warning: fclose() has been disabled for security reasons in /home/obsessed/public_html/poll/include/class_session.php on line 52<br /> <br /> Warning: Cannot modify header information - headers already sent by (output started at /home/obsessed/public_html/poll/include/class_session.php:52) in /home/obsessed/public_html/poll/admin/common.inc.php on line 15<br /> <br /> Warning: Cannot modify header information - headers already sent by (output started at /home/obsessed/public_html/poll/include/class_session.php:52) in /home/obsessed/public_html/poll/admin/common.inc.php on line 16<br /> <br /> Warning: Cannot modify header information - headers already sent by (output started at /home/obsessed/public_html/poll/include/class_session.php:52) in /home/obsessed/public_html/poll/admin/common.inc.php on line 17<br /> <br /> Warning: Cannot modify header information - headers already sent by (output started at /home/obsessed/public_html/poll/include/class_session.php:52) in /home/obsessed/public_html/poll/admin/common.inc.php on line 18<br /> <br /> <br /> Thank you!!!]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16589.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16589.php</link>
				<pubDate><![CDATA[Thu, 16 Jun 2005 22:26:34]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ At a guess the same thing that is in class_templates.php exists in class_session.php. Open it in a text editor and look for the same as before.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16591.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16591.php</link>
				<pubDate><![CDATA[Thu, 16 Jun 2005 22:47:08]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ That file is a little different. The error is from the fclose in this chunk of code (below). How can I fix this one? Thanks!!<br /> <br />     function generate_new_session_id($user_id) {<br />         srand((double)microtime()*1000000);<br />         $session = md5 (uniqid (rand()));<br />         $unix_time = time();<br />         $config="&lt;?php\n";<br />         $config.="\$auth['session']=\"$session\";\n";<br />         $config.="\$auth['uid']=\"$user_id\";\n";<br />         $config.="\$auth['expire']=\"$unix_time\";\n";<br />         $config.="?&gt;";<br />         $fp = fopen("$this-&gt;include_path/session.php","w");<br />         flock($fp, 2);<br />         fwrite($fp, $config);<br />         flock($fp, 3);<br />         fclose($fp);<br />         return $session;<br />     }]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16592.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16592.php</link>
				<pubDate><![CDATA[Fri, 17 Jun 2005 07:24:38]]> GMT</pubDate>
				<author><![CDATA[ stevendude]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Ah you are using the text version of the poll. This could be a problem. Let me look into it. Still say it's weird locking fclose but not fopen.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16593.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16593.php</link>
				<pubDate><![CDATA[Fri, 17 Jun 2005 07:27:05]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ I have emailed my hosting company about why they are disabling fclose, have not heard back yet. Thank you for any work-around you can provide.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16594.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16594.php</link>
				<pubDate><![CDATA[Fri, 17 Jun 2005 07:29:35]]> GMT</pubDate>
				<author><![CDATA[ stevendude]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Thanks for any help.<br /> <br /> My hosting company is giving me the run-a-round. <br /> Is there a fix for this fclose being disabled? <br /> Can I use something else instead? <br /> And, please be patient with me, what happens if I just delete that line(s) and don't fclose at all (will it work)?]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16641.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16641.php</link>
				<pubDate><![CDATA[Mon, 20 Jun 2005 21:41:47]]> GMT</pubDate>
				<author><![CDATA[ stevendude]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ I'm trying to see if there is a different way to write to files.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16642.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16642.php</link>
				<pubDate><![CDATA[Mon, 20 Jun 2005 22:39:50]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Thank you, that would be great. Another developer told me that he thought, that anything that I did an fopen() for, would automatically be closed when the script terminates. Other than sloppy coding, is this true?<br /> <br /> But yes, it there is a better way that is fine too.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16643.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16643.php</link>
				<pubDate><![CDATA[Tue, 21 Jun 2005 01:10:21]]> GMT</pubDate>
				<author><![CDATA[ stevendude]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ In theory yes. But it may end up corrupting the file in some extreme cases. Make a regular back up of the files and you should be ok.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4710/16649.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4710/16649.php</link>
				<pubDate><![CDATA[Tue, 21 Jun 2005 11:37:43]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
	</channel>
</rss>