Hi Bakers!
I've got a challenging issue.
I've trying to setup my htaccess to redirect all non https and non www
traffic to https://www.
However all my tries did not succeed and unfortunatley my understanding of
htaccess files is limited.
The cake project is in: http://www.domain.com/staff-inc
I found the solution to this as it appears Schema doesn't manage the
Model's database config setting.
Add $shoe->useDbConfig = $this->connection;
On Tuesday, August 13, 2013 7:43:50 PM UTC+2, Roosevelt P wrote:
>
> Hi,
>
> I generated a Schema file. And the schema file creates records for two
No replies? :( I hope the post is understandable. Does anyone have any
input or comments on the idea?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related
Hi Bakers,
It has been a while since I've been working with CakePHP, sad I know, but
had other projects on the go. I've been working out for a while a different
and more consistent method of routing requests and serving up pages. I
would enjoy your response and thoughts on this.
The objective
Ok, looking at the Mongo DB source code, it doesn't do any association
queries. So i'm written a behavior to solve it.
On Jul 18, 4:55 pm, LordG wrote:
> Hello Bakers,
>
> I'm busy testing Models with MongoDB. I have two Models: Recipe and
> Tag.
>
> class Re
Hello Bakers,
I'm busy testing Models with MongoDB. I have two Models: Recipe and
Tag.
class Recipe extends AppModel {
var $name = 'Recipe';
var $mongoSchema = array(
'name' => array('type' => 'string'),
'description' => array('type' => 'string'),
You could try the isset function. isset($this->data['Ingredient']
[$value['In']['ingredientname']]). But if $this->data['Ingredient']
[$value['In']['ingredientname']] is null, it will also return false.
isset checks if variable exists and is not null.
--~--~-~--~~~---~-
Ok, I solved my problem partially be adding to a custom AppError
class...
function __construct()
{
ob_clean();
parent::__construct();
}
I still had some output coming out from the view that called the
requested action, but I moved that code into the elements/actions
being called.
However, n
Hi guys,
I have a scenario where we are using requestAction which hits a fatal
error internally. The following actions happen correct, and the system
displays a costom error page. However, the View contents still have
the contents from the view the RequestAction was called from.
How do we clear
Ok, the solution in the end was to start the installation from
scratch, using the php.ini-recommended as a base template, following
the guide at
http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/
and bring the php.ini settings up slowly to where I needed them.
N
Hi All,
I just recently switched my php over to fastcgi from isapi as we are
introducing the new sqlsrv (mssql) driver for php.
But outside of this driver, php (maybe cakephp) is running extreamly
slow. literrally 15 seconds to render a page. I have tried the
solution provided at http://forums.i
Hi Guys,
Thought I'd just make a post to say thank you for creating CakePHP.
It's been a superb framework and has allowed me to grow in my
programming skills over the years. I look forward to seeing it grow
further and become more of a kick-ass environment! Well done!
G
--~--~-~--~~-
Hi Guys,
I have read a few articles for changing the layout for error messages.
However, I was wondering if anyone knows of enhancements coming that
actually solve the problem in a simple way.
For example, it would make sense perhaps to have the AppError class
have a class variable of layout, wh
Hi Guys,
Does any know if there is an graph of process flow of how Cake loads
itself? This would be really helpful.
Thanks.
G
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, s
Hi guys,
I have stubbled apon a wierd problem, maybe someone can shed some
light.
The situation: Log a user out using Session->Destroy(), then setFlash,
then redirect.
Under isapi, the flash message displays and is assigned to the new
session that Destroy creates. however, under CGI mode, the n
Hi Miles, thanks, what you have said makes sense. Ok. thanks for the
suggestion. ;)
G
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To
Does anyone have any feedback or comments on this?
Much Appreciated.
G
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe f
Ok, this has been fixed in the latest release 1.2.3.8166.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group,
Hi Guys,
Does anyone know of a method to delete/destroy any sessions created by
a user when they "re" login? I.E. If 2 people login using the same
login, the first person should get "kicked" out (session destroyed)
when the second person logs in.
>From looking at the Session base class, __regene
Well, looking at the __start and parent:destroy, it makes sense that
they are in the order they are. However, I am still lost as to why the
setFlash dissapears.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP
Hi Guys,
I have a slight issue and I suspect its related to how Session-
>destroy works.
If I destroy a session, and then set a flashmessage, it never appears
or exists in the page after I redirect. For example, when a use logs
out, I set a message after Session->destroy to "you have been logged
Hi Guys,
This discussion has not been resolved yet. Could someone elaborate on
the issue being experienced. For example, possible an reason why ajax
sessions which are seen as bare === 1, cause the session not to start.
Thanks,
Greg
On Jan 18, 12:04 pm, lordG <[EMAIL PROTECTED]> wrote:
&
Nate, Could you elaborate on this?
On Jan 17, 5:42 pm, nate <[EMAIL PROTECTED]> wrote:
> Dude, you're confusing some very unrelated things.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to
Could you elaborate on this? Which unrelated things?
I traced the issue to the __start function of the Session Component.
function __start(){
if ($this->__started === false) {
if ($this->__bare === 0) {
if (!$this->id() && parent::start()) {
Hey Chris,
Thanks for the input. I did review that, but could not find valid
cause that it was that. The cake Route class if it finds that the url
is Ajax, sets the $params['bare'] value to 1. As a result, the session
component when checking if it should start the session checks if
$params['bare'
Hi Guys,
Does anyone know why the webservices or ajax calls have not been
maintained across sessions? Will they be, or am I missing something?
Thanks,
Greg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP"
Hi Guys,
Started a new discussion as the old ones title was incorrect, this
disccussion continues the one at:
http://groups.google.com/group/cake-php/browse_thread/thread/c83fa8bd7071cefa/a1cd792d45a45a24#a1cd792d45a45a24
Here is a summary (although reading the last posts may be important):
The
ok... does anyone know why the following the the router are being
deprecated?
00503 /**
00504 * Deprecated
00505 *
00506 */
00507 $_this->connect('/bare/:controller/:action/*',
array('bare' => '1'));
00508 $_this->connect('/ajax/:controller/:acti
Ok, traced it down to the bare variable and these lines in the session
component:
00295 function __start(){
00296 if ($this->__started === false) {
00297 if ($this->__bare === 0) {
00298 if (!$this->id() && parent::start()) {
00299 $this
I mean wouldn't
On Jan 15, 11:05 am, lordG <[EMAIL PROTECTED]> wrote:
> Ok, yeah, the print_r would work as the session has not been started
> yet.
>
> However, there does appear to be a difference between when sessions
> start for normal
Ok, yeah, the print_r would work as the session has not been started
yet.
However, there does appear to be a difference between when sessions
start for normal requests and ajax requests.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Does anyone have any further suggestions on this?
I cake 1.1 my ajax calls would work 100% with a session security set
to medium. With Cake 1.2 however they are no longer working.
It seems to have something to do with the $_SESSION array being
undefined when the response is received.
Shouldn't
Hey Chris, yeah I had a similar problem before with 1.1 and did then
and now downscaled the security to medium.
What is the difference between the 3 levels though, other than the
timeout scale time?
Chris Hartjes wrote:
> On Jan 13, 2008 6:24 PM, lordG <[EMAIL PROTECTED]> wrote:
> &
Hi guys,
I'm experiencing a problem with the redirects when I destroy the
session, set a flash message and then redirect.
When it gets to the redirect page, the flash no longer exists and the
session is clean of any custom session data they may have been set
after the destroy call.
Does the red
One thing that was true with this error was ensuring that all you
models are correctly called, so ensuring all the plugins requested
their models by PluginName.ModelName seemed to have addressed the
problem.
I also restored the model names and $name to the cake format, which
yes (perhaps studip f
e? :)
P.S. Apologies Nate and Chris for the immediate suggestions, a bit
hasty, defintely! LOL. You guys have done a good job! :D
nate wrote:
> On Jan 12, 3:07�pm, lordG <[EMAIL PROTECTED]> wrote:
> > My suggestion would be at least to assign a variable to the model like
> > $a
Chris, Nate, your 100% correct, I will take your suggestions. :)
nate wrote:
> On Jan 12, 3:07�pm, lordG <[EMAIL PROTECTED]> wrote:
> > My suggestion would be at least to assign a variable to the model like
> > $assignDefaults = true/false, which can control if the save grab
My suggestion would be at least to assign a variable to the model like
$assignDefaults = true/false, which can control if the save grabs the
defaults or not.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP"
Hey Robby,
I miss read that function, you are correct... how can one disable the
defaults though because this saveAll is an update to a bunch of
records and fields that I don't want to be saved are being saved by
the defaults.
For example, a table would be:
id(autonumber), name, group_id(default
What makes things even more wierd is if goto this address in my
browser (once logged in):
http://localhost/pages/pages/manage - I get the page and correct
session
and then in the same window i got to:
http://localhost/ajax/pages/pages/manage - I dont get the page because
the session went missing!
Er, um... does anyone have an idea as to why whilst running a session
successfully, one would get the error:
"Undefined variable: _SESSION"
In particular, I get this on all my ajax calls, but not normal ones.
In addittion, it seems that all ajax calls for some reason cant see
the session.
Any i
ps. i;m running latest 1.2 release.
On Jan 12, 4:08 pm, lordG <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I have a problem happening with the with plugin components.
>
> I have a plugin called cms, which holds a component called
> iAuthenticate. This component in term re
ok, i sourced the problem down to...
1) the subsomponent does get loaded.
2) the reference to subcomponents is miss calculated if a sub
component is a PluginName.ComponentName... It tries to make the object
$PluginName.ComponentName, but natuarally in the $loaded array it only
exists as $Componen
Hi guys,
I have a problem happening with the with plugin components.
I have a plugin called cms, which holds a component called
iAuthenticate. This component in term requires another component
called iLanguage. Both these components are located within the plugins
components directory.
Now if I
Hey Guys,
The saveAll function was not saving my data. I had a look at the code
of the saveAll...
Noticed the saveAll function seems to not be saving the data...
lines 1365 to 1370 was:
--
foreach ($data as $record) {
if (!($this->create($record) && $this->save($null,
$options['vali
Hey Han,
Yeah, that takes a little work. I have a similar scenario where I drag
menu items (in li tags) in to and from different ul's within on large
ul. I'l do my best to give you some points of direction to go.
My suggestion would be review the demo at
http://wiki.script.aculo.us/scriptaculous
Sorry, I mean in a component had a name of... (not controller)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this
Ok, I find the problem...
line 125 in the Registry class had:
$options = array('id' => $id, 'table' => $table, 'ds' => $ds, 'alias'
=> $alias, 'name' => $class);
which is now bee modded to:
$options = array('id' => $id, 'table' => $table, 'ds' => $ds, 'alias'
=> $alias);
it was the name that wa
ortModel" ... ???
>
> On Jan 10, 11:02 pm, lordG <[EMAIL PROTECTED]> wrote:
>
> > unfortunately not, if (!$type), then it defaults to 'Model'...
>
> > lines...
> > 00089 if (!$type) {
> > 00090 $type = 'Model';
unfortunately not, if (!$type), then it defaults to 'Model'...
lines...
00089 if (!$type) {
00090 $type = 'Model';
00091 }
as far as i can establish, it is related to the $options that are
getting passed the the models contructor.
On Jan 10, 11:55 pm, francky06l <[
Yeah, I agree with what your saying on the performance... yet it is a
slight inconvenience... this is what I have now cusomtised the
generateList to be in my AppModel
function generateList($conditions = null, $order = null, $limit =
null, $keyPath = null, $valuePath = null, $groupPath = n
Hey Guys,
There is something wrong happening with the init calls ont he class
reg.
$this->PermitModel =& ClassRegistry::init('Cms.PermitModel');
$this->PermitModel->findAll();
and the sql call comes out like...
SELECT FROM AS `PermitModel` WHERE 1 = 1
which is missing the * and the table name
l that
> stuff you need to make 2 calls:
>
> $foo = $this->find('all');
> $list = Set::extract($foo, '{n}.');
>
> On Jan 10, 2008 3:31 PM, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jan 10, 10:26 pm, lordG <[EMAIL PROTECTED]>
Hey AD,
Yeah, just worked out one like that. Me being stupid! lol
This is what I have done,
function generateList($conditions = null, $order = null, $limit =
null, $keyPath = null, $valuePath = null, $groupPath = null, $page =
1, $recursive = 0)
{
//get the data
If it is possible to do the above though using the find('list'..., how
would one suggest it be done?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@goog
Hey Guys,
One of the great features i liked about the generateList was that you
could make a list of data that the id was the key and the data was the
value... e.g. generateList(null, null, null, '{n}.Model.id', '{n}')
Why remove generateList, why not just leave it and give the option of
both? B
Ok, I have no duplicate aliases in the models... any other
suggestions? Whatever has gone wrong is because of a difference in the
2 releases, and I think to suspect the new App::import related items
and how it is functioning.
On Jan 10, 10:19 pm, lordG <[EMAIL PROTECTED]> wrote:
> Th
The problem was not solved by changing the $ext!
AD, i'll check on what you are suggesting. Is this because Cake loads
all the models or something? Why would the duplicate aliases solve the
problem?
--~--~-~--~~~---~--~~
You received this message because you are su
nope, I think I was wrong about that!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMA
though, whilst looking through the code of the constructor function of
the model, there is no way around this...
model class:
00349 if ($table === false) {
00350 $this->useTable = false;
00351 } elseif ($table) {
00352 $this->useTable = $table;
00353
Ok, I found the problem... In my controller I opted to switch the $ext
value back to '.thtml' so I didn't have to rename hundreds of view
files.
Now this is interesting though becasue what does the $ext of the
controller have to do with the App::import()? When debugging, I always
got to the ${$cl
Yeah, sorry about the code error, I forgot about the Plugin.ModelName
here. This has not fixed the problem though.
I've updated the code to:
if (!is_object($this->MenuModel)) {
if (!ClassRegistry::isKeySet('MenuModel')) {
$MenuModel =& ClassRegistry::init('Cms.MenuModel',
nope, if I remove the code, i dont get the error. The error only
appears to be occuring when either running $MenuModel =&
ClassRegistry::init('MenuModel'); or $menuModel =& new MenuModel();
Some further notes, this model is within a plugin call Cms. Could the
error be related to how Cake is hanld
Yeah, still not. This is the updated code.
if (!is_object($this->MenuModel)) {
if (!ClassRegistry::isKeySet('MenuModel')) {
//get the language model
if (!class_exists('MenuModel')) {
App::import('Model','cms.MenuModel');
Yeah, i've been trying that, but I am not sure if that is or isn't
related to the error.
The code I have that seems to get nailed is as soon as I do the
"$MenuModel = new MenuModel();":
if (!is_object($this->MenuModel)) {
if (!ClassRegistry::isKeySet('Menu
Even tried the ini setting at 512MB, and still no luck...!
Like I mentioned, the app was working 100% before the update, and I
used to use loadModel, and switched it to the App::import... could
this be part of the memory usage error?
On Jan 10, 6:08 pm, lordG <[EMAIL PROTECTED]> wrote:
Hey Chris,
Thanks, but mine is already set to 128M, which is far too high anyway.
My app was working 100% with release 1.2.0.5875, but now with the new
one, I get this error above.
Any further ideas?
G
--~--~-~--~~~---~--~~
You received this message because you
Also, when I hit refresh when this happens, I get this error:
"Fatal error: Cannot redeclare paths() (previously declared in D:
\webserver\cake.1.2\dev.2\cake\cake\basics.php:60) in D:\webserver
\cake.1.2\dev.2\cake\cake\basics.php on line 100"
Er, um, what? I haven't even redeclared it.
Seriou
Hi Guys,
I just updated my core site to the latest 1.2.0.6311 release and I
keep getting this error on every second or third request:
"PHP has encountered a Stack overflow"
Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
Hi Conankun,
Did you get a solution to this? Sounds like the App class is not being
loaded (sorry for stating the obvious i think). Have you gotten the
latest release and ensured all the correct files are in the right
places?
G
--~--~-~--~~~---~--~~
You received t
This does also tend to be related to my post on naming conventions in
http://groups.google.com/group/cake-php/browse_thread/thread/35318b04d8a93144/fcffe0e17499f82c?lnk=st&q=#fcffe0e17499f82c
if the class name and the $name value are to be the same, why is this
not the case with Controllers? Is t
Hi guys,
There seems to be something incorrectly happening with model
association calls and the naming of the resulting record arrays. If I
have a Model called LayoutModel with $name = 'Layout', then naturally
all the findAll calls etc will give me a resultset with the array keys
as 'Layout'.
Ho
Yeah, correct ideas guys, thanks for the feedback.
The intention though of the discussion is in review of the purpose of
the naming conventions so as to obtain clarity and maybe shared
thought on the current consistency of the classes and names. I moved
away from this scenary a while ago, I am no
Ah, right... well if I load the class Model and create an object
called Model to work with, then it would naturally complain that the
table was missing... in 1.1.x this worked 100% for me, but in 1.2 not.
AD7six wrote:
> On Dec 20, 1:34 pm, lordG <[EMAIL PROTECTED]> wrote:
> >
AD7six, thanks for your feedback. below are some further thoughts.
> The above sounds rather over complex to me. What is the benefit of
> making several 'models' for one model? (The fact that I ask should
> imply that I don't percieve any of the above reasons as a benefit).
Here is another examp
Adam, I think your idea of the alias naming is good. It would help
considerably.
Adam Royle wrote:
> var $uses = array('Image' => 'ImageModel');
> var $helpers = array('Image' => 'ImageHelper');
>
> or
>
> var $uses = array('Image' => array('alias' => 'ImageModel'));
> var $helpers = array('Image
Ok, it seems the problem with the model names and the form element
names is not as I previously experienced in 1.1, my guess is that I
was probably doing something wrong. hahahaha!
Anyway, my questions still remain with regards to the naming
conventions. :D
--~--~-~--~~~--
$name? are you refer to the other post. If so, I've posted another
message there.
AD7six wrote:
> On Dec 20, 11:54 am, lordG <[EMAIL PROTECTED]> wrote:
> > Hi Guys,
> >
> > Does anyone know how one can do a direct query to the db without the
> > model h
dr. Hannibal Lecter wrote:
> Hi lordG,
>
> I am no expert, but here is what I did on one occasion (without a
> model):
>
> $db = ConnectionManager::getInstance();
> $conn = $db->getDataSource('default');
>
> $conn->rawQuery($some_sql);
>
> Hope
Hi Guys,
Does anyone know how one can do a direct query to the db without the
model having a table?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake
Hi Guys,
I've got a question, and hopefully one of the cakephp guys can give an
answer.
First, the scenario...
I often will used more than one model file to represent the same data.
A common reason is to separate admin functions from normal ones, so
the normal model is less intensive to load. Th
Hi ProFire,
Just popped in. You're spot on there with reducing the security level
on your sessions. I have the exact same problem happening with me,
even posted a ticket with the cake guys, as I thought it was a bug,
yet it was just what was intended to happen when the security is set
to high.
G
ideas on this then?
Dr. Tarique Sani wrote:
> On 12/12/07, lordG <[EMAIL PROTECTED]> wrote:
> > Then, with the 1.2 branch release, does anyone know why in the
> > loadmodel function, they use require and not require_once? I've hit a
> > snack with this one, and ch
Hi guys,
First off, I've been working with cake for the past couple of months,
and what an awesome framework. 1.2 is also now a dream! Well done to
the cake boys!
Then, with the 1.2 branch release, does anyone know why in the
loadmodel function, they use require and not require_once? I've hit a
84 matches
Mail list logo