Re: Cake and Traffic

2006-08-12 Thread Felix Geisendörfer




CakePHP can handle a lot of traffic and works very well with a lot of
hosts. 

I've always used it with cheap shared hosts - no problem. I saw it
being used on a couple high traffic sites and it handled that as well
too (up to the point where php reaches it's performance limits and you
either have to get more servers, use caching, or tweak your setup).

You should definitely have a better experience with it. But, as you
have already said: This is rather due to the widespread use of php. If
php was some new rising language you would probably have just as
difficult a time with CakePHP as you did with ruby (on rails). But
CakePHP really does a good job at being light weight and compatible. It
offers view caching, database caching, and persistent models (and maybe
some other tweaks I don't know about ^^). So welcome to the kitchen and
enjoy your baking ; ).

Best Regards,
Felix Geisendrfer
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



Rick wrote:

  Hi guys,
I recently took up using Ruby on Rails for web development, and was
rather impressed by it. However, finding hosts to support it properly
has turned out to be a nightmare.

I would like to move on to a different framework that can be supported
by a wider range of web hosts, and that doesn't require as much system
administration expertise as Rails does. At the same time, however, I
really don't want to lose the power of an MVC framework.

Enter CakePHP.

The only question I have is whether Cake can handle a lot of traffic.

Can anyone tell me either:
1) whether there are any high-traffic sites that use CakePHP (I've
looked at the CakePHP showcase and dug around for others, but I can't
tell whether they've really been able to take a pounding.)
or 2) whether I'm just being needlessly paranoid.

:-)

Many thanks,
Rick




  


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---





Re: Table names

2006-08-12 Thread Langdon Stevenson

Have answered my own question:

include:

 var $useTable = tblModules;

In the model file.

Regards,
Langdon


Langdon Stevenson wrote:
 Hi
 
 I have recently begun (at long last) working on a Cake app running on 
 IIS and SQL server.
 
 I am required to build this application working with a legacy database 
 that I cannot change.  I have specified the database connection to use 
 ADOBD as I could not get the mssql connector to work.
 
 There is only one legacy table that I need access to, it is called:
 
tblModules
 
 Therefore I have created a model for it:
 
 
 ?php
class TblModule extends AppModel
{
  var $name = 'TblModule';
}
 ?
 
 
 Cake however is looking for a table called tblmodules, which of course 
 it cannot find.
 
 I have scoured the documentation and mailing list for references to get 
 around this, but have found nothing.  Is there a way to specify the 
 table name that a model uses?  Or is there some other way around this 
 problem that someone can recommend?
 
 I absolutely cannot change the name of the table as that would break the 
 other application that uses it.
 
 Any suggestions would be greatly appreciated.
 
 Regards,
 Langdon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Broken view path problem with IIS

2006-08-12 Thread Langdon Stevenson

Hi

I am having a strange problem with displaying a view.  I am running:

- Cake 1.1.7.3363
- IIS 5
- MS SQL Server

I have the following model, controller, and view:

controllers/modules.php:

?php
   class Module extends AppModel
   {
 var $name = 'Module';
 var $useTable = tblModules;
   }
?


models/modules_controller.php:

?php
   class ModulesController extends AppController
   {
 var $name = 'Modules';

 function index() {

 }
}
?


views/module/index.thtml

pModules page/p



However when I try to open:  http://myserver/index.php/modules/

I get the following error:


Warning: overload() was unable to locate class 'modules' in 
c:\inetpub\wwwroot\cake\basics.php on line 74

CakePHP Rapid Development
Missing view

You are seeing this error because the view 
cinetpubwwwrootappviewsmodulesindex.thtml for action index in controller 
Modules could not be found.

Notice: this error is being rendered by the 
app/views/errors/missing_view.thtml view file, a user-customizable error 
page for handling missing/invalid views during rendering.

Fatal: Unable to load view file 
cinetpubwwwrootappviewsmodulesindex.thtml for action 
ModulesController::index()


What interests me most is the path to the missing view:

cinetpubwwwrootappviewsmodulesindex.thtml

It should be: c:\inetpub\wwwroot\app\views\modules\index.thtml

If cinetpubwwwrootappviewsmodulesindex.thtml is the path Cake is trying 
to open then there is no surprise that it fails.  The question is why is 
it dropping the directory separator?

My core.php file has the following settings enabled for IIS:

   define ('BASE_URL', env('SCRIPT_NAME'));
   define('SERVER_IIS', true);  

Does anyone have any ideas what might be going on here?

Any advice greatly appreciated.

Regards,
Langdon






--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Cake and Traffic

2006-08-12 Thread georgeL

@rick
i made exactly the same way, which was pretty good since i learned some
good techniques from RoR.
But you need your own server and all the knowledge around to host  it.
RoR also has it´s performance issues where you have to come up with
clustering to load balance high traffic site´s.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Broken view path problem with IIS

2006-08-12 Thread Langdon Stevenson

Small update.  The model in question should have been called: 
module.php.  Renaming it has removed the first error in the page:

Warning: overload() was unable to locate class 'modules' in 
c:\inetpub\wwwroot\cake\basics.php on line 74

Now I only have the view path to sort out.

Regards,
Langdon


Langdon Stevenson wrote:
 Hi
 
 I am having a strange problem with displaying a view.  I am running:
 
 - Cake 1.1.7.3363
 - IIS 5
 - MS SQL Server
 
 I have the following model, controller, and view:
 
 controllers/modules.php:
 
 ?php
class Module extends AppModel
{
  var $name = 'Module';
  var $useTable = tblModules;
}
 ?
 
 
 models/modules_controller.php:
 
 ?php
class ModulesController extends AppController
{
  var $name = 'Modules';
   
  function index() {
   
  }
 }
 ?
 
 
 views/module/index.thtml
 
 pModules page/p
 
 
 
 However when I try to open:  http://myserver/index.php/modules/
 
 I get the following error:
 
 
 Warning: overload() was unable to locate class 'modules' in 
 c:\inetpub\wwwroot\cake\basics.php on line 74
 
 CakePHP Rapid Development
 Missing view
 
 You are seeing this error because the view 
 cinetpubwwwrootappviewsmodulesindex.thtml for action index in controller 
 Modules could not be found.
 
 Notice: this error is being rendered by the 
 app/views/errors/missing_view.thtml view file, a user-customizable error 
 page for handling missing/invalid views during rendering.
 
 Fatal: Unable to load view file 
 cinetpubwwwrootappviewsmodulesindex.thtml for action 
 ModulesController::index()
 
 
 What interests me most is the path to the missing view:
 
 cinetpubwwwrootappviewsmodulesindex.thtml
 
 It should be: c:\inetpub\wwwroot\app\views\modules\index.thtml
 
 If cinetpubwwwrootappviewsmodulesindex.thtml is the path Cake is trying 
 to open then there is no surprise that it fails.  The question is why is 
 it dropping the directory separator?
 
 My core.php file has the following settings enabled for IIS:
 
define ('BASE_URL', env('SCRIPT_NAME'));
define('SERVER_IIS', true);
   
 Does anyone have any ideas what might be going on here?
 
 Any advice greatly appreciated.
 
 Regards,
 Langdon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Table names

2006-08-12 Thread Langdon Stevenson

Thanks for your reply stuckshut :-)

Langdon


stuckshut wrote:
 just put this in your model:
 
 var $useTable = 'tblModules';

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Table names

2006-08-12 Thread nate

What problems were you having with the MS SQL driver?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Cake and Traffic

2006-08-12 Thread nate

I do administer my own server, and I still prefer Cake ;-)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Table names

2006-08-12 Thread Langdon Stevenson

Hi Nate

It was a login problem.  The login string looked like it was being 
constructed correctly, but the MS SQL Server was returning a login error.

As the ADODB driver worked I didn't bother to pursue it.

Regards,
Langdon


nate wrote:
 What problems were you having with the MS SQL driver?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Cake and Traffic

2006-08-12 Thread [EMAIL PROTECTED]

Felix,
I do agree that its easy to setup on shared hosts.

Do you have any links of high traffic sites?

regards,
clayton


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: $ajax-link() causes Mozilla to crash

2006-08-12 Thread [EMAIL PROTECTED]

Update:
Its working already. Just updated it with the latest prototype.js
version

Regards,
clayton


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Broken view path problem with IIS

2006-08-12 Thread [EMAIL PROTECTED]

I've seen the same issue with the slashes missing, I think that
stripslashes() is being run over that text before it gets output to the
screen. But I'm not sure if it's affecting the internals, and I'm not
running on IIS (although I am running on Windows).


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Cake assumption with params

2006-08-12 Thread Gonza

In controller.php line 262 Cake make this assumption:

259 function constructClasses() {
260 if (empty($this-params['pass'])) {
261 $id = false;
262 } else {
263 $id = $this-params['pass']['0'];
264 }

this means that ALWAYS the first param received by GET is the model Id,

is this a bug?

Because i want to use the first param for other thing but cake loads my
model with
the id so i update my data instead of inserting a new one.

Would be nice if this assumption is configurable.

Any ideas?
Thanks in advance!


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Cake assumption with params

2006-08-12 Thread nate

This is required for scaffold and some other things.  We may make it
configurable at some point.  If it's causing you problems with updating
data, call $this-Model-create() on your model before setting data or
using it.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



How can I get cake to stop parsing my queries?

2006-08-12 Thread Aramisbear

Right now, if I call query($sql) from a model and it's joining against
multiple tables I get a result that looks like this (assume tables a
and b).

[0] = array(
   [a] = array(
  columns for a
   ),
   [b] = array(
  columns for b
),
[1]...

I want to get the results back flat for my result set so how do I go
about doing that without cake parsing them out by table?  There has to
be SOME function that will do 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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: How can I get cake to stop parsing my queries?

2006-08-12 Thread nate

Since the whole point of Cake's model is to *not* do that, you won't
find much support for it.  However, you can grab a reference to the
database itself by doing the following:

$db = ConnectionManager::getDataSource('default');

And do a little against-the-rules stuff like this:

$db-execute('select * from posts');
// $db-_result will contain the actual MySQL result resource of the
query.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: How can I get cake to stop parsing my queries?

2006-08-12 Thread georgeL

i´m wondering to... i have a query like this in one of my controllers:

$id = $this-query('SELECT MAX(id) as id FROM '.$this-table.' WHERE
user_id ='.$user_id);
this get´s the highest record id from one table for the specific user.
I would have expected the result to come back as $id - 34 but instead
it is deeply nested in an 3 dimensional array like this:
$id['0']['0']['id'] - 34

strange thing.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Ajax helper observeForm

2006-08-12 Thread majna

Is there any way to get focus on element?

exmpl:

$ajax-observeForm('MyForm',array(

'frequency'=2,'url'='/admin/news/index','update'='content',
'loading'=Element.show('ajax_loading');,
'loaded'=Element.hide('ajax_loading'); 
Field.focus('search');

Problem: There is input field (with id=search ) wich filter results
in table, using observeForm.
After each ajax request, input field lost focus.
How to get it back?

tnx.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Cake assumption with params

2006-08-12 Thread Gonza

ok thanks for response
i was looking for something like create(), but i dont have the time to
read the api documentation yet.

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-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: How can I get cake to stop parsing my queries?

2006-08-12 Thread nate

First of all, you can also do that as $this-Model-find(null, 'MAX(id)
as id'), which would give you $id[0]['id'] - 34 (only 2 levels).  But
the reason the array shows up as [0] instead of the model name is
because of how MySQL returns query results.  Actual fields (like id)
are associated with a particular table, whereas calculated results
(like MAX(...)) aren't.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Table names

2006-08-12 Thread Langdon Stevenson

Hi Nate

 What problems were you having with the MS SQL driver?

Problem solved.  Turns out that SQL Server 7 doesn't like having the 
port specified.  I added:

'port' = '',

To my database configuration and everything worked fine.

Thanks for your effort a while back on putting this driver together (and 
to anyone else who may have contributed).  It is going to make my life a 
lot easier being able to use Cake on this project.

Regards,
Langdon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Cake and Traffic

2006-08-12 Thread guitarclap

www.pokerinside.com ... 100% CakePHP ...


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Validation: Futureproof / Accepted Technique?

2006-08-12 Thread Shutter

There are several validation routines floating out there; the built-in
cake stuff, the Advanced Validation, the Advanced Validation with
Parameters...

Cake's built-in validation is not as feature-filled as I'd like, but in
order to get things like the FormHelper working properly with custom
validation I need to change a lot of internal-ish code, particularly in
the helpers. (I can replace the helpers and such in my own app
directories, but that's a very ugly solution.)

What do you use for validation--the default, builtin scheme, or one of
the custom mods?

Thanks,

Shutter


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---