Thanks for sifting thru all that J

 

Will correct it and try again.

 

Good looking out, greatly appreciated.

 

Dave

 

From: [email protected] [mailto:[email protected]] On Behalf
Of euromark
Sent: Monday, January 28, 2013 6:33 AM
To: [email protected]
Subject: Re: Bake Plugin Issues

 

line 155, your ssl method, there you try to access an array key SERVER_PORT
without checking if it actually exists in the array.



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: [email protected] <javascript:>
[mailto:[email protected] <javascript:> ] On Behalf Of euromark
Sent: Monday, January 28, 2013 4:51 AM
To: [email protected] <javascript:> 
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.getEleme
ntById('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.getEleme
ntById('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="cakeErr51062ce5c9
4b0-code" class="cake-code-dump" style="display: none;"><code><span
style="color
: #000000"><span style="color: #0000BB">&nbsp;&nbsp;&nbsp;&nbsp;</span><span
sty
le="color:
#007700">************************************************************
/</span></span></code>
<code><span style="color: #000000"><span style="color:
#0000BB">&nbsp;&nbsp;&nbs
p;&nbsp;</span><span style="color:
#007700">private&nbsp;function&nbsp;</span><s
pan style="color: #0000BB">notSSL</span><span style="color:
#007700">()&nbsp;{</
span></span></code>
<span class="code-highlight"><code><span style="color: #000000"><span
style="col
or: #0000BB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
style=
"color: #007700">if(&nbsp;</span><span style="color:
#0000BB">$_SERVER</span><sp
an style="color: #007700">[</span><span style="color:
#DD0000">'SERVER_PORT'</sp
an><span style="color: #007700">]&nbsp;!=&nbsp;</span><span style="color:
#DD000
0">'80'&nbsp;</span><span style="color:
#007700">)&nbsp;{</span></span></code></
span></pre><pre class="stack-trace">AppController::notSSL() -
APP\Controller\App
Controller.php, line 155
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 153
ExceptionRenderer::__construct() - CORE\Cake\Error\ExceptionRenderer.php,
line 9
3
ErrorHandler::handleException() - CORE\Cake\Error\ErrorHandler.php, line 125
[main] - [internal], line ??</pre></div></pre><pre class="cake-error"><a
href="j
avascript:void(0);"
onclick="document.getElementById('cakeErr51062ce5cf80f-trace
').style.display =
(document.getElementById('cakeErr51062ce5cf80f-trace').style.
display == 'none' ? '' : 'none');"><b>Notice</b> (8)</a>: Undefined index:
SERVE
R_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="j
avascript: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" s
tyle="display: none;"><code><span style="color: #000000"><span style="color:
#00
00BB">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:
#007700">private&nbsp;f
unction&nbsp;</span><span style="color: #0000BB">notSSL</span><span
style="color
: #007700">()&nbsp;{</span></span></code>
<code><span style="color: #000000"><span style="color:
#0000BB">&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color:
#007700">if(&nbsp;</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">]&nbsp;!=&nbsp;</span><span style="color: #DD0000">'80'&nbsp;</span><span
sty
le="color: #007700">)&nbsp;{</span></span></code>
<span class="code-highlight"><code><span style="color: #000000"><span
style="col
or:
#0000BB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;$this</span><span style="color: #007700">-&gt;</span><span
style="color: #0
000BB">redirect</span><span style="color: #007700">(&nbsp;</span><span
style="co
lor: #DD0000">'http://www.'&nbsp;</span><span style="color:
#007700">.&nbsp;</sp
an><span style="color: #0000BB">$_SERVER</span><span style="color:
#007700">[</s
pan><span style="color: #DD0000">'SERVER_NAME'</span><span style="color:
#007700
">]&nbsp;.&nbsp;</span><span style="color: #0000BB">$this</span><span
style="col
or: #007700">-&gt;</span><span style="color: #0000BB">here&nbsp;</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 153
ExceptionRenderer::__construct() - CORE\Cake\Error\ExceptionRenderer.php,
line 9
3
ErrorHandler::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 [email protected] <javascript:>
.
To unsubscribe from this group, send email to [email protected]
<javascript:> .
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 [email protected].
To post to this group, send email to [email protected].
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to