Am Montag, 28. Januar 2013 10:15:28 UTC+1 schrieb advantage+:
Thanks I will check the AppController out,
But I do not reference $_SERVER anywhere in the site, but I will do some exploring with your pointer.
Thanks,
Dave
From: cake...@googlegroups.com [mailto:cake...@googlegroups.
com ] On Behalf Of euromark
Sent: Monday, January 28, 2013 4:51 AM
To: cake...@googlegroups.com
Subject: Re: Bake Plugin Issues
Looks like this is your own faulty code (in AppController) that triggers it
Fix that first.
PS: You cannot just use $_SERVER like that without any checking. Especially if you also invoke the AppController via CLI (while baking for example) as
some vars will not be set as you know it from a web-based request. use isset() or better the cake method env() here.
Am Montag, 28. Januar 2013 08:51:30 UTC+1 schrieb advantage+:On my Windows desktop I can bake models / views controllers / basic stuff no problem.
When I run cake bake plugin Users I get a crazy assortment of errors. Any ideas anyone?
K:\wamp\www\starter\2.x\app>cake bake plugin Users <pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr51062ce5c94b0-trace').style.display = (document.getElementById('c akeErr51062ce5c94b0-trace').style.display == 'none' ? '' : 'none');"><b>Notice</ b> (8)</a>: Undefined index: SERVER_PORT [<b>APP\Controller\AppController.php</b >, line <b>155</b>]<div id="cakeErr51062ce5c94b0-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr51062ce5c94b0-code').style.display = (document.getElementById('ca keErr51062ce5c94b0-code').style.display == 'none' ? '' : 'none')">Code</a> <a hr ef="javascript:void(0);" onclick="document.getElementById(' cakeErr51062ce5c94b0- context').style.display = (document.getElementById('cakeErr51062ce5c94b0-context ').style.display == 'none' ? '' : 'none')">Context</a><pre id="cakeErr51062ce5c94b0-code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000"><span style="color: #0000BB"> </span><span sty le="color: #007700">*************************************************** ********* /</span></span></code><code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">private function </span><s pan style="color: #0000BB">notSSL</span><span style="color: #007700">() {</span></span></code><span class="code-highlight"><code><span style="color: #000000"><span style="col or: #0000BB"> < /span><span style= "color: #007700">if( </span><span style="color: #0000BB">$_SERVER</span><span style="color: #007700">[</span><span style="color: #DD0000">'SERVER_PORT'</span><span style="color: #007700">] != </span><span style="color: #DD000 0">'80' </span><span style="color: #007700">) {</span></span></code></ span></pre><pre class="stack-trace">AppController::notSSL() - APP\Controller\App Controller.php, line 155AppController::beforeFilter() - APP\Controller\AppController.php, line 89 call_user_func - [internal], line ??CakeEventManager::dispatch() - CORE\Cake\Event\CakeEventManager.php, line 246 Controller::startupProcess() - CORE\Cake\Controller\Controller.php, line 669 ExceptionRenderer::_getController() - CORE\Cake\Error\ ExceptionRenderer.php, lin e 153ExceptionRenderer::__construct() - CORE\Cake\Error\ ExceptionRenderer.php, line 9 3ErrorHandler::handleException() - CORE\Cake\Error\ErrorHandler. php, line 125 [main] - [internal], line ??</pre></div></pre><pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById(' cakeErr51062ce5cf80f-trace ').style.display = (document.getElementById('cakeErr51062ce5cf80f-trace'). style. display == 'none' ? '' : 'none');"><b>Notice</b> (8)</a>: Undefined index: SERVER_NAME [<b>APP\Controller\AppController.php</b>, line <b>156</b>]<div id="cakeEr r51062ce5cf80f-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById(' cakeErr51062ce5cf80f-code' ).style.display = (document.getElementById('cakeErr51062ce5cf80f-code'). style.di splay == 'none' ? '' : 'none')">Code</a> <a href="javascript:void(0);" onclick="document.getElementById('cakeErr51062ce5cf80f-context') .style.display = (documen t.getElementById('cakeErr51062ce5cf80f-context') .style.display == 'none' ? '' : 'none')">Context</a><pre id="cakeErr51062ce5cf80f-code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">private f unction </span><span style="color: #0000BB">notSSL</span><span style="color: #007700">() {</span></span></code> <code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">if( </s pan><span style="color: #0000BB">$_SERVER</span><span style="color: #007700">[</span><span style="color: #DD0000">'SERVER_PORT'</span><span style="color: #00770 0">] != </span><span style="color: #DD0000">'80' </span><span sty le="color: #007700">) {</span></span></code> <span class="code-highlight"><code><span style="color: #000000"><span style="col or: #0000BB"> & nbsp; & nbsp;$this</span><span style="color: #007700">-></span><span style="color: #0000BB">redirect</span><span style="color: #007700">( </span><span style="color: #DD0000">'http://www.' </span><span style="color: #007700">. </sp an><span style="color: #0000BB">$_SERVER</span><span style="color: #007700">[</span><span style="color: #DD0000">'SERVER_NAME'</span><span style="color: #007700 ">] . </span><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">here </span><span sty le="color: #007700">);</span></span></code></span></pre><pre class="stack-trace" >AppController::notSSL() - APP\Controller\AppController.php, line 156 AppController::beforeFilter() - APP\Controller\AppController.php, line 89 call_user_func - [internal], line ??CakeEventManager::dispatch() - CORE\Cake\Event\CakeEventManager.php, line 246 Controller::startupProcess() - CORE\Cake\Controller\Controller.php, line 669 ExceptionRenderer::_getController() - CORE\Cake\Error\ ExceptionRenderer.php, lin e 153ExceptionRenderer::__construct() - CORE\Cake\Error\ ExceptionRenderer.php, line 9 3ErrorHandler::handleException() - CORE\Cake\Error\ErrorHandler. php, line 125 [main] - [internal], line ??</pre></div></pre>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake...@googlegroups.com.
To unsubscribe from this group, send email to cake-php+u...@googlegroups.com .
Visit this group at http://groups.google.com/group/cake-php?hl=en .
For more options, visit https://groups.google.com/groups/opt_out .
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment