Warning (2): PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known [CORE/Cake/Model/Datasource/Database/Mysql.php, line 160]
- <pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr5841f1bf9b960-trace').style.display = (document.getElementById('cakeErr5841f1bf9b960-trace').style.display == 'none' ? '' : 'none');"><b>Notice</b> (8)</a>: Undefined variable: title [<b>APP/View/Layouts/default.ctp</b>, line <b>6</b>]<div id="cakeErr5841f1bf9b960-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr5841f1bf9b960-code').style.display = (document.getElementById('cakeErr5841f1bf9b960-code').style.display == 'none' ? '' : 'none')">Code</a> <a href="javascript:void(0);" onclick="document.getElementById('cakeErr5841f1bf9b960-context').style.display = (document.getElementById('cakeErr5841f1bf9b960-context').style.display == 'none' ? '' : 'none')">Context</a><pre id="cakeErr5841f1bf9b960-code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000">        ob_start();</span></code> <code><span style="color: #000000"></span></code> <span class="code-highlight"><code><span style="color: #000000">        include $___viewFn;</span></code></span></pre><pre id="cakeErr5841f1bf9b960-context" class="cake-context" style="display: none;">$___viewFn = '/home/infohuddvps/sunshinevitamins.net/app/View/Layouts/default.ctp' $___dataForView = array( 'class' => 'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known', 'code' => '500', 'url' => '/', 'name' => 'Database connection &quot;SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known&quot; is missing, or could not be created.', 'error' => object(MissingConnectionException) {}, '_serialize' => array( ), 'content_for_layout' => '<h2>Missing Database Connection</h2> <p class="error"> <strong>Error: </strong> SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known requires a database connection</p> <p class="error"> <strong>Error: </strong> Confirm you have created the file : app/Config/database.php.</p> <p class="notice"> <strong>Notice: </strong> If you want to customize this error message, create app/View/Errors/missing_connection.ctp.</p> <h3>Stack Trace</h3> <ul class="cake-stack-trace"> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-0')">CORE/Cake/Model/Datasource/DboSource.php line 245</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-0')">Mysql->connect()</a> <div id="file-excerpt-0" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;));</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($autoConnect)&nbsp;{</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;connect();</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code></pre></div> <div id="trace-args-0" class="cake-code-dump" style="display: none;"><pre></pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-1')">CORE/Cake/Model/ConnectionManager.php line 101</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-1')">DboSource->__construct(array)</a> <div id="file-excerpt-1" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$conn&nbsp;=&nbsp;self::$_connectionsEnum[$name];</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$class&nbsp;=&nbsp;$conn['classname'];</span></code> <code><span style="color: #000000"></span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self::$_dataSources[$name]&nbsp;=&nbsp;new&nbsp;$class(self::$config-&gt;{$name});</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self::$_dataSources[$name]-&gt;configKeyName&nbsp;=&nbsp;$name;</span></code></pre></div> <div id="trace-args-1" class="cake-code-dump" style="display: none;"><pre>array( 'password' => '*****', 'login' => '*****', 'host' => '*****', 'database' => '*****', 'prefix' => '*****', 'datasource' => 'Database/Mysql', 'persistent' => false )</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-2')">CORE/Cake/Model/Model.php line 3417</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-2')">ConnectionManager::getDataSource(string)</a> <div id="file-excerpt-2" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($dataSource&nbsp;!=&nbsp;null)&nbsp;{</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;useDbConfig&nbsp;=&nbsp;$dataSource;</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$db&nbsp;=&nbsp;ConnectionManager::getDataSource($this-&gt;useDbConfig);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(!empty($oldConfig)&nbsp;&amp;&amp;&nbsp;isset($db-&gt;config['prefix']))&nbsp;{</span></code></pre></div> <div id="trace-args-2" class="cake-code-dump" style="display: none;"><pre>'default'</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-3')">CORE/Cake/Model/Model.php line 1083</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-3')">Model->setDataSource(string)</a> <div id="file-excerpt-3" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;*&nbsp;@return&nbsp;void</span></code> <code><span style="color: #000000">&nbsp;*/</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;setSource($tableName)&nbsp;{</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;setDataSource($this-&gt;useDbConfig);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$db&nbsp;=&nbsp;ConnectionManager::getDataSource($this-&gt;useDbConfig);</span></code></pre></div> <div id="trace-args-3" class="cake-code-dump" style="display: none;"><pre>'default'</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-4')">CORE/Cake/Model/Model.php line 3443</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-4')">Model->setSource(string)</a> <div id="file-excerpt-4" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;getDataSource()&nbsp;{</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(!$this-&gt;_sourceConfigured&nbsp;&amp;&amp;&nbsp;$this-&gt;useTable&nbsp;!==&nbsp;false)&nbsp;{</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;_sourceConfigured&nbsp;=&nbsp;true;</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;setSource($this-&gt;useTable);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code></pre></div> <div id="trace-args-4" class="cake-code-dump" style="display: none;"><pre>'categories'</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-5')">CORE/Cake/Model/Model.php line 3054</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-5')">Model->getDataSource()</a> <div id="file-excerpt-5" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;*/</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;query($sql)&nbsp;{</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$params&nbsp;=&nbsp;func_get_args();</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$db&nbsp;=&nbsp;$this-&gt;getDataSource();</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;call_user_func_array(array(&amp;$db,&nbsp;'query'),&nbsp;$params);</span></code></pre></div> <div id="trace-args-5" class="cake-code-dump" style="display: none;"><pre></pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-6')">APP/Controller/PagesController.php line 35</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-6')">Model->query(string)</a> <div id="file-excerpt-6" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;GET&nbsp;MENU&nbsp;ITEMS</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sql&nbsp;=&nbsp;"SELECT&nbsp;category&nbsp;FROM&nbsp;categories";</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result&nbsp;=&nbsp;$this-&gt;Categories-&gt;query($sql);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$menus&nbsp;=&nbsp;array();</span></code></pre></div> <div id="trace-args-6" class="cake-code-dump" style="display: none;"><pre>'SELECT category FROM categories'</pre></div></li> <li><a href="#">[internal function]</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-7')">PagesController->home()</a> <div id="trace-args-7" class="cake-code-dump" style="display: none;"><pre></pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-8')">CORE/Cake/Controller/Controller.php line 485</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-8')">ReflectionMethod->invokeArgs(PagesController, array)</a> <div id="file-excerpt-8" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'action'&nbsp;=&gt;&nbsp;$request-&gt;params['action']</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;));</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$method-&gt;invokeArgs($this,&nbsp;$request-&gt;params['pass']);</span></code></span> <code><span style="color: #000000"></span></code></pre></div> <div id="trace-args-8" class="cake-code-dump" style="display: none;"><pre>object(PagesController) { name => 'Pages' helpers => array( ) uses => array( ) components => array( ) request => object(CakeRequest) {} response => object(CakeResponse) {} viewPath => 'Pages' layoutPath => null viewVars => array( ) view => 'home' layout => 'default' autoRender => true autoLayout => true Components => object(ComponentCollection) {} viewClass => 'View' View => null ext => '.ctp' plugin => null cacheAction => false passedArgs => array() scaffold => false methods => array( ) modelClass => 'Slideshows' modelKey => 'page' validationErrors => null Session => object(SessionComponent) {} RequestHandler => object(RequestHandlerComponent) {} Categories => object(AppModel) {} } array()</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-9')">CORE/Cake/Routing/Dispatcher.php line 103</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-9')">Controller->invokeAction(CakeRequest)</a> <div id="file-excerpt-9" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$controller-&gt;startupProcess();</span></code> <code><span style="color: #000000"></span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$render&nbsp;=&nbsp;true;</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result&nbsp;=&nbsp;$controller-&gt;invokeAction($request);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($result&nbsp;instanceof&nbsp;CakeResponse)&nbsp;{</span></code></pre></div> <div id="trace-args-9" class="cake-code-dump" style="display: none;"><pre>object(CakeRequest) { params => array( ) data => array() query => array() url => false base => '' webroot => '/' here => '/' }</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-10')">CORE/Cake/Routing/Dispatcher.php line 85</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-10')">Dispatcher->_invoke(PagesController, CakeRequest, CakeResponse)</a> <div id="file-excerpt-10" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;));</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code> <code><span style="color: #000000"></span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$this-&gt;_invoke($controller,&nbsp;$request,&nbsp;$response);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;}</span></code></pre></div> <div id="trace-args-10" class="cake-code-dump" style="display: none;"><pre>object(PagesController) { name => 'Pages' helpers => array( ) uses => array( ) components => array( ) request => object(CakeRequest) {} response => object(CakeResponse) {} viewPath => 'Pages' layoutPath => null viewVars => array( ) view => 'home' layout => 'default' autoRender => true autoLayout => true Components => object(ComponentCollection) {} viewClass => 'View' View => null ext => '.ctp' plugin => null cacheAction => false passedArgs => array() scaffold => false methods => array( ) modelClass => 'Slideshows' modelKey => 'page' validationErrors => null Session => object(SessionComponent) {} RequestHandler => object(RequestHandlerComponent) {} Categories => object(AppModel) {} } object(CakeRequest) { params => array( ) data => array() query => array() url => false base => '' webroot => '/' here => '/' } object(CakeResponse) { }</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-11')">APP/webroot/index.php line 92</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-11')">Dispatcher->dispatch(CakeRequest, CakeResponse)</a> <div id="file-excerpt-11" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;App::uses('Dispatcher',&nbsp;'Routing');</span></code> <code><span style="color: #000000"></span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;$Dispatcher&nbsp;=&nbsp;new&nbsp;Dispatcher();</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;$Dispatcher-&gt;dispatch(new&nbsp;CakeRequest(),&nbsp;new&nbsp;CakeResponse(array('charset'&nbsp;=&gt;&nbsp;Configure::read('App.encoding'))));</span></code></span> <code><span style="color: #000000"></span></code></pre></div> <div id="trace-args-11" class="cake-code-dump" style="display: none;"><pre>object(CakeRequest) { params => array( ) data => array() query => array() url => false base => '' webroot => '/' here => '/' } object(CakeResponse) { }</pre></div></li> </ul> <script type="text/javascript"> function traceToggle(event, id) { var el = document.getElementById(id); el.style.display = (el.style.display == 'block') ? 'none' : 'block'; event.preventDefault(); return false; } </script> ', 'scripts_for_layout' => '', 'title_for_layout' => 'Errors' ) $class = 'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known' $code = '500' $url = '/' $name = 'Database connection &quot;SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known&quot; is missing, or could not be created.' $error = object(MissingConnectionException) {} $_serialize = array( (int) 0 => 'code', (int) 1 => 'url', (int) 2 => 'name' ) $content_for_layout = '<h2>Missing Database Connection</h2> <p class="error"> <strong>Error: </strong> SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known requires a database connection</p> <p class="error"> <strong>Error: </strong> Confirm you have created the file : app/Config/database.php.</p> <p class="notice"> <strong>Notice: </strong> If you want to customize this error message, create app/View/Errors/missing_connection.ctp.</p> <h3>Stack Trace</h3> <ul class="cake-stack-trace"> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-0')">CORE/Cake/Model/Datasource/DboSource.php line 245</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-0')">Mysql->connect()</a> <div id="file-excerpt-0" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;));</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($autoConnect)&nbsp;{</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;connect();</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code></pre></div> <div id="trace-args-0" class="cake-code-dump" style="display: none;"><pre></pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-1')">CORE/Cake/Model/ConnectionManager.php line 101</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-1')">DboSource->__construct(array)</a> <div id="file-excerpt-1" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$conn&nbsp;=&nbsp;self::$_connectionsEnum[$name];</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$class&nbsp;=&nbsp;$conn['classname'];</span></code> <code><span style="color: #000000"></span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self::$_dataSources[$name]&nbsp;=&nbsp;new&nbsp;$class(self::$config-&gt;{$name});</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self::$_dataSources[$name]-&gt;configKeyName&nbsp;=&nbsp;$name;</span></code></pre></div> <div id="trace-args-1" class="cake-code-dump" style="display: none;"><pre>array( 'password' => '*****', 'login' => '*****', 'host' => '*****', 'database' => '*****', 'prefix' => '*****', 'datasource' => 'Database/Mysql', 'persistent' => false )</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-2')">CORE/Cake/Model/Model.php line 3417</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-2')">ConnectionManager::getDataSource(string)</a> <div id="file-excerpt-2" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($dataSource&nbsp;!=&nbsp;null)&nbsp;{</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;useDbConfig&nbsp;=&nbsp;$dataSource;</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$db&nbsp;=&nbsp;ConnectionManager::getDataSource($this-&gt;useDbConfig);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(!empty($oldConfig)&nbsp;&amp;&amp;&nbsp;isset($db-&gt;config['prefix']))&nbsp;{</span></code></pre></div> <div id="trace-args-2" class="cake-code-dump" style="display: none;"><pre>'default'</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-3')">CORE/Cake/Model/Model.php line 1083</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-3')">Model->setDataSource(string)</a> <div id="file-excerpt-3" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;*&nbsp;@return&nbsp;void</span></code> <code><span style="color: #000000">&nbsp;*/</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;setSource($tableName)&nbsp;{</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;setDataSource($this-&gt;useDbConfig);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$db&nbsp;=&nbsp;ConnectionManager::getDataSource($this-&gt;useDbConfig);</span></code></pre></div> <div id="trace-args-3" class="cake-code-dump" style="display: none;"><pre>'default'</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-4')">CORE/Cake/Model/Model.php line 3443</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-4')">Model->setSource(string)</a> <div id="file-excerpt-4" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;getDataSource()&nbsp;{</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(!$this-&gt;_sourceConfigured&nbsp;&amp;&amp;&nbsp;$this-&gt;useTable&nbsp;!==&nbsp;false)&nbsp;{</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;_sourceConfigured&nbsp;=&nbsp;true;</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;setSource($this-&gt;useTable);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code></pre></div> <div id="trace-args-4" class="cake-code-dump" style="display: none;"><pre>'categories'</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-5')">CORE/Cake/Model/Model.php line 3054</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-5')">Model->getDataSource()</a> <div id="file-excerpt-5" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;*/</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;query($sql)&nbsp;{</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$params&nbsp;=&nbsp;func_get_args();</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$db&nbsp;=&nbsp;$this-&gt;getDataSource();</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;call_user_func_array(array(&amp;$db,&nbsp;'query'),&nbsp;$params);</span></code></pre></div> <div id="trace-args-5" class="cake-code-dump" style="display: none;"><pre></pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-6')">APP/Controller/PagesController.php line 35</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-6')">Model->query(string)</a> <div id="file-excerpt-6" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;GET&nbsp;MENU&nbsp;ITEMS</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sql&nbsp;=&nbsp;"SELECT&nbsp;category&nbsp;FROM&nbsp;categories";</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result&nbsp;=&nbsp;$this-&gt;Categories-&gt;query($sql);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$menus&nbsp;=&nbsp;array();</span></code></pre></div> <div id="trace-args-6" class="cake-code-dump" style="display: none;"><pre>'SELECT category FROM categories'</pre></div></li> <li><a href="#">[internal function]</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-7')">PagesController->home()</a> <div id="trace-args-7" class="cake-code-dump" style="display: none;"><pre></pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-8')">CORE/Cake/Controller/Controller.php line 485</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-8')">ReflectionMethod->invokeArgs(PagesController, array)</a> <div id="file-excerpt-8" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'action'&nbsp;=&gt;&nbsp;$request-&gt;params['action']</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;));</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$method-&gt;invokeArgs($this,&nbsp;$request-&gt;params['pass']);</span></code></span> <code><span style="color: #000000"></span></code></pre></div> <div id="trace-args-8" class="cake-code-dump" style="display: none;"><pre>object(PagesController) { name => 'Pages' helpers => array( ) uses => array( ) components => array( ) request => object(CakeRequest) {} response => object(CakeResponse) {} viewPath => 'Pages' layoutPath => null viewVars => array( ) view => 'home' layout => 'default' autoRender => true autoLayout => true Components => object(ComponentCollection) {} viewClass => 'View' View => null ext => '.ctp' plugin => null cacheAction => false passedArgs => array() scaffold => false methods => array( ) modelClass => 'Slideshows' modelKey => 'page' validationErrors => null Session => object(SessionComponent) {} RequestHandler => object(RequestHandlerComponent) {} Categories => object(AppModel) {} } array()</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-9')">CORE/Cake/Routing/Dispatcher.php line 103</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-9')">Controller->invokeAction(CakeRequest)</a> <div id="file-excerpt-9" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$controller-&gt;startupProcess();</span></code> <code><span style="color: #000000"></span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$render&nbsp;=&nbsp;true;</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result&nbsp;=&nbsp;$controller-&gt;invokeAction($request);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($result&nbsp;instanceof&nbsp;CakeResponse)&nbsp;{</span></code></pre></div> <div id="trace-args-9" class="cake-code-dump" style="display: none;"><pre>object(CakeRequest) { params => array( ) data => array() query => array() url => false base => '' webroot => '/' here => '/' }</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-10')">CORE/Cake/Routing/Dispatcher.php line 85</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-10')">Dispatcher->_invoke(PagesController, CakeRequest, CakeResponse)</a> <div id="file-excerpt-10" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;));</span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></code> <code><span style="color: #000000"></span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$this-&gt;_invoke($controller,&nbsp;$request,&nbsp;$response);</span></code></span> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;}</span></code></pre></div> <div id="trace-args-10" class="cake-code-dump" style="display: none;"><pre>object(PagesController) { name => 'Pages' helpers => array( ) uses => array( ) components => array( ) request => object(CakeRequest) {} response => object(CakeResponse) {} viewPath => 'Pages' layoutPath => null viewVars => array( ) view => 'home' layout => 'default' autoRender => true autoLayout => true Components => object(ComponentCollection) {} viewClass => 'View' View => null ext => '.ctp' plugin => null cacheAction => false passedArgs => array() scaffold => false methods => array( ) modelClass => 'Slideshows' modelKey => 'page' validationErrors => null Session => object(SessionComponent) {} RequestHandler => object(RequestHandlerComponent) {} Categories => object(AppModel) {} } object(CakeRequest) { params => array( ) data => array() query => array() url => false base => '' webroot => '/' here => '/' } object(CakeResponse) { }</pre></div></li> <li><a href="#" onclick="traceToggle(event, 'file-excerpt-11')">APP/webroot/index.php line 92</a> &rarr; <a href="#" onclick="traceToggle(event, 'trace-args-11')">Dispatcher->dispatch(CakeRequest, CakeResponse)</a> <div id="file-excerpt-11" class="cake-code-dump" style="display:none;"><pre><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;App::uses('Dispatcher',&nbsp;'Routing');</span></code> <code><span style="color: #000000"></span></code> <code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;$Dispatcher&nbsp;=&nbsp;new&nbsp;Dispatcher();</span></code> <span class="code-highlight"><code><span style="color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;$Dispatcher-&gt;dispatch(new&nbsp;CakeRequest(),&nbsp;new&nbsp;CakeResponse(array('charset'&nbsp;=&gt;&nbsp;Configure::read('App.encoding'))));</span></code></span> <code><span style="color: #000000"></span></code></pre></div> <div id="trace-args-11" class="cake-code-dump" style="display: none;"><pre>object(CakeRequest) { params => array( ) data => array() query => array() url => false base => '' webroot => '/' here => '/' } object(CakeResponse) { }</pre></div></li> </ul> <script type="text/javascript"> function traceToggle(event, id) { var el = document.getElementById(id); el.style.display = (el.style.display == 'block') ? 'none' : 'block'; event.preventDefault(); return false; } </script> ' $scripts_for_layout = '' $title_for_layout = 'Errors'</pre><pre class="stack-trace">include - APP/View/Layouts/default.ctp, line 6 View::_evaluate() - CORE/Cake/View/View.php, line 910 View::_render() - CORE/Cake/View/View.php, line 874 View::renderLayout() - CORE/Cake/View/View.php, line 529 View::render() - CORE/Cake/View/View.php, line 473 Controller::render() - CORE/Cake/Controller/Controller.php, line 959 ExceptionRenderer::_outputMessage() - CORE/Cake/Error/ExceptionRenderer.php, line 263 ExceptionRenderer::_cakeError() - CORE/Cake/Error/ExceptionRenderer.php, line 187 ExceptionRenderer::render() - CORE/Cake/Error/ExceptionRenderer.php, line 165 ErrorHandler::handleException() - CORE/Cake/Error/ErrorHandler.php, line 127 [main] - [internal], line ??</pre></div></pre>

Missing Database Connection

Error: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known requires a database connection

Error: Confirm you have created the file : app/Config/database.php.

Notice: If you want to customize this error message, create app/View/Errors/missing_connection.ctp.

Stack Trace