<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Global $db_pages in localhost is null?</title>
		<link>https://www.cotonti.com</link>
		<description>Neueste Themenbeiträge</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Mon, 13 Apr 2026 10:41:27 -0000</pubDate>

		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	Right. The exception is when hooking to the page module itself. And of course you don't need to require the page module if your plugin has already done it in some other hook which is executed before current hook.</p>
]]></description>
			<pubDate>Di, 05 Feb 2013 19:29:42 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7331&d=0#post36975]]></link>
		</item>
		<item>
			<title>Eugene</title>
			<description><![CDATA[<p>
	ok.</p>
<p>
	so, your guidline for pluginmaking - is to include functions of Page module each time I need to work with Pages and $db_pages...?</p>
<p>
	not to rely on that as on global variable?</p>
]]></description>
			<pubDate>Di, 05 Feb 2013 17:58:11 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7331&d=0#post36974]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	The cause of the problem lays in the execution order. The availability of globals/functions depends on in which order files are required and the code is executed. Enabling/disabling cache affects this flow as well.</p>
<p>
	As plugin developers we prefer to require APIs we want explicitly every time we need it, because it is better than relying on some other plugin to do it for us, which simply might not be present.</p>
]]></description>
			<pubDate>Di, 05 Feb 2013 14:34:56 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7331&d=0#post36968]]></link>
		</item>
		<item>
			<title>Eugene</title>
			<description><![CDATA[<p>
	Trust, it is what I may do easily, but I don't like it.</p>
<p>
	Let me clarify: if I do</p>
<pre class="brush:php;">
global $db, $db_pages;</pre>
<p>
	On hosting - I will get normal variable, but on localhost - null.</p>
<p>
	How I can fight it?</p>
<p><strong>Добавлено 1 часа спустя:</strong></p><p>
	I found a reason, i guess.</p>
<p>
	during development somtimes I turn off CACHE $cfg['cache'] = FALSE;</p>
<p>
	That makes those global variable null. I don't know if that's right, but I'm glad it's solved.</p>
]]></description>
			<pubDate>Mo, 04 Feb 2013 18:01:58 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7331&d=0#post36958]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	Your plugin should require page module to use its functions or tables, at the top of it do:</p>
<pre class="brush:php;">
require_once cot_incfile('page', 'module');</pre>
<p>
	 </p>
]]></description>
			<pubDate>Mo, 04 Feb 2013 17:40:21 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7331&d=0#post36957]]></link>
		</item>
		<item>
			<title>Eugene</title>
			<description><![CDATA[<p>
	Hello.</p>
<p>
	Guys, it is not first time i mentioned problems with my localhost apache:</p>
<p>
	<strong>some global variables are null</strong> !</p>
<p>
	When I upload site to hosting - it is working well. But while it is on localhost - I need to define variables...</p>
<p>
	example: plugin which works with hook <strong><em>users.details.tags</em></strong></p>
<p>
	what is wrong?</p>
]]></description>
			<pubDate>Mo, 04 Feb 2013 17:24:37 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=7331&d=0#post36955]]></link>
		</item>
	</channel>
</rss>