<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "How to include Advanced Poll in my smarty-powered site"]]></title>
		<link>https://proxy2.de/forum/posts/list/3.php</link>
		<description><![CDATA[Latest messages posted in the topic "How to include Advanced Poll in my smarty-powered site"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>How to include Advanced Poll in my smarty-powered site</title>
				<description><![CDATA[ Hi all,<br /> <br /> playing with Advance Poll since yesterday I'm really convinced that<br /> this script is really btw the very best poll scripts available on the web.<br /> <br /> However I'm trying to add Advanced Poll to my smarty templates powered<br /> website using the following in my template to include the polls: <br /> <br /> {php} <br /> include "/home/net/www/poll/poll_cookie.php"; <br /> include_once "/home/net/www/poll/booth.php"; <br /> echo $php_poll-&gt;poll_process("1"); <br /> {/php} <br /> <br /> For cookie setup is ok but when calling the second script <br /> using mysql database I get directly mysql related error: <br /> <br /> [Sat May 27 14:23:48 2006] [error] PHP Warning: mysql_connect(): Access denied for user 'nobody'@'localhost' (using password: NO) in /home/net/www/poll/include/class_mysql.php on line 32 <br /> <br /> This is strange because the poll script is working standalone without <br /> any problems and using its database without any errors. <br /> <br /> booth.php is requiring config.php file containing all access codes <br /> to its database. <br /> <br /> class.mysql.php on line 32 is trying to connect with the following line: <br /> <br /> $this-&gt;conn_id = mysql_connect($this-&gt;db['host'].":".$this-&gt;port,$this-&gt;db['user'],$this-&gt;db['pass']); <br /> <br /> so I have tried even to fill all variables directly with my real values <br /> and I got no more mysql errors so mysql connection was successful <br /> however in this case I get the following PHP errors: <br /> <br /> PHP Fatal error: Call to a member function on a non-object in /home/net/www/poll/include/class_poll.php on line 37 <br /> <br /> And class_poll.php line 37 is: <br /> <br /> $this-&gt;pollvars = $this-&gt;db-&gt;fetch_array($this-&gt;db-&gt;query("SELECT * FROM ".$this-&gt;tbl['poll_config'])); <br /> <br /> so this is also database connection related ?<br /> <br /> Smarty templates engine is widely used on the web<br /> <a class="snap_shots" href="http://smarty.php.net" target="_blank" rel="nofollow">http://smarty.php.net</a><br /> <br /> My problem seems to be identical to the post dated June 23rd, 2005<br /> on this forum and titled "Advanced Polls + smarty templates"<br /> The author of this post has finally decided to use iframes to workaround<br /> the issue, and that's exactly what I did for now but using iframes becomes<br /> really obsolete and not fully flexible; in addition some browsers like<br /> Opera dont accept my temporary solution.<br /> <br /> Smarty templates are using ezSQL class (<a class="snap_shots" href="http://php.justinvincent.com" target="_blank" rel="nofollow">http://php.justinvincent.com</a>)<br /> to connect to Mysql.<br /> So the connection to mysql is done with the following:<br /> $this-&gt;dbh = @mysql_connect($dbhost,$dbuser,$dbpassword);<br /> $db-&gt;get_var();<br /> $db-&gt;get_results();.....<br /> <br /> Concerning the last PHP fatal error I have found related web page at:<br /> <a class="snap_shots" href="http://www.jvmultimedia.com/portal/node/33" target="_blank" rel="nofollow">http://www.jvmultimedia.com/portal/node/33</a><br /> <br /> Could you please give me some clues or advice to achieve this integration<br /> of Advanced Poll with Smarty.<br /> <br /> Thanks in advance for your time<br /> <br /> Adam]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/5654/20558.php</guid>
				<link>https://proxy2.de/forum/posts/preList/5654/20558.php</link>
				<pubDate><![CDATA[Sat, 27 May 2006 18:39:13]]> GMT</pubDate>
				<author><![CDATA[ adam]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Have you put the correct settings in config.inc.php?]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/5654/20559.php</guid>
				<link>https://proxy2.de/forum/posts/preList/5654/20559.php</link>
				<pubDate><![CDATA[Sat, 27 May 2006 19:58:16]]> GMT</pubDate>
				<author><![CDATA[ Auron]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ [quote="Auron"]Have you put the correct settings in config.inc.php?[/quote]<br /> <br /> Yes, of course <img src="https://proxy2.de/forum//images/smilies/8a80c6485cd926be453217d59a84a888.gif" /><br /> Advance Pool is working perfectly as standalone script called from<br /> blank php page with all mysql settings in config.inc.php.<br /> <br /> Thats the reason I'm wondering why I get this message about<br /> nobody (apache) trying to connect to mysql ?<br /> <br /> This is something related to smarty templates but I'm looking for<br /> some advice before start to modify all the code ?]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/5654/20560.php</guid>
				<link>https://proxy2.de/forum/posts/preList/5654/20560.php</link>
				<pubDate><![CDATA[Sat, 27 May 2006 20:51:29]]> GMT</pubDate>
				<author><![CDATA[ adam]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ I say that because...<br /> <br /> [code]&#91;Sat May 27 14&#58;23&#58;48 2006&#93; &#91;error&#93; PHP Warning&#58; mysql_connect&#40;&#41;&#58; Access denied for user 'nobody'@'localhost' &#40;using password&#58; NO&#41; in /home/net/www/poll/include/class_mysql.php on line 32 [/code]<br /> <br /> Wrong username or password?<br /> <br /> This "1" should be 1 only use "..." for newest<br /> <br /> [code]&#123;php&#125;<br /> include &quot;/home/net/www/poll/poll_cookie.php&quot;;<br /> include_once &quot;/home/net/www/poll/booth.php&quot;;<br /> echo $php_poll-&gt;poll_process&#40;1&#41;;<br /> &#123;/php&#125;[/code]<br /> <br /> Smarty templates allow PHP but I'm not sure if there isn't some sort of conflict between the two somewhere.<br /> <br /> Auron]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/5654/20561.php</guid>
				<link>https://proxy2.de/forum/posts/preList/5654/20561.php</link>
				<pubDate><![CDATA[Sat, 27 May 2006 21:02:54]]> GMT</pubDate>
				<author><![CDATA[ Auron]]></author>
			</item>
	</channel>
</rss>