Re: downloading image from database

2006-09-19 Thread Evan
i keep getting 2 extra spaces before my data when i try to download my file, that's why i get a corrupted file. does anyone know how to solve this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To

Re: Html helper emits id attribute that i don't want

2006-09-19 Thread [EMAIL PROTECTED]
Okay okay guys, you made your point very clear. Offcourse i also enjoy the benefits of convention over configuration. and i never intented to fight that. I just didn't realise that people actually _need_ the id attribute. (because i never used ajax, dom,...)

Re: downloading image from database

2006-09-19 Thread Evan
problem solved. one of my files had a space after the ?. this caused the browser to output the spaces before the data stream, which corrupted the output. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP

Problems with webservices

2006-09-19 Thread Rik
Hello, As i said yesterday on the chat, I'm trying to use the built-in help for routing webservices. I've followed the manual http://manual.cakephp.org/chapter/configuration. But when I try to access my page, Cake was asking for an RSS component. Nobody was able to answer me on the chat so I

Re: DEBUG=2, text/xml and AJAX

2006-09-19 Thread admataz
Hi Markus, Did you ever find a solution to this? I have had the same problem with my JSON output, and added some customisations to my files to get around the debug code popping up in AJAX files . 1. In controller methods that use AJAX I define a constant DISABLE_TIMERWATCH to true. 2. In my

Re: Html helper emits id attribute that i don't want

2006-09-19 Thread [EMAIL PROTECTED]
No problems Dieter. Just seemed so weird to us that use the natural id and do AJAX daily with CakePHP. Seemed like a no brainer to us. You really should try AJAX. CakePHP makes it SO easy to implement. --~--~-~--~~~---~--~~ You received this message because

Re: DEBUG=2, text/xml and AJAX

2006-09-19 Thread [EMAIL PROTECTED]
Okay, maybe you could try a few things. First, the RequestHandler is a loaded by default CakePHP component in the release. It also automatically (without your explicity setting there) renders the view using AJAX layout. You should never send header() information in the controller, but rather

Controller-Controller call

2006-09-19 Thread [EMAIL PROTECTED]
Okay. When I first started using CakePHP you could make calls like $this-Photo-Album-read() without having to explicitly define the uses array. To do this you would have an association between Photos and Albums. Almost all the code I write now and see online doesn't make use of this. Is this

Re: DEBUG=2, text/xml and AJAX

2006-09-19 Thread nate
http://groups.google.com/group/cake-php/msg/d44b961cb7182c35 --~--~-~--~~~---~--~~ 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

Re: Controller-Controller call

2006-09-19 Thread nate
Unless you have a specific need to use requestAction (i.e. not wanting to duplicate a block of common controller logic), I consider what you are doing not only the recommended approach, but far less overhead than requestAction. --~--~-~--~~~---~--~~ You received

Re: DEBUG=2, text/xml and AJAX

2006-09-19 Thread [EMAIL PROTECTED]
Aren't those before filters wonderful? All those before and after callbacks are so wonderful and make CakePHP SO much more flexible than even before. Very elegant solution. I knew there had to be a way to set the fullDebug to false. Regardless with the release you shouldn't EVER have to hack

Re: Controller-Controller call

2006-09-19 Thread [EMAIL PROTECTED]
So utilizing the $this-Photo-Album from the assocation instead of putting Album in the uses array and calling it using $this-Album saves overhead and is recommended right? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Error: Unable to load controller LibsController

2006-09-19 Thread Syl
G'day - I'm still experiencing this problemand I cannot find anything on this anywhere. Does anyone have any ideas ? S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,

Scaffold Error

2006-09-19 Thread Syl
G'day - I am having trouble getting the scaffolding to work with my cake installation. Here is my code : class HelpCategoriesController extends AppController { public $name = HelpCategoriesController; var $scaffold; var $useDbConfig = wwa; } Pretty basic, nothing

Re: Controller-Controller call

2006-09-19 Thread nate
Well, unnecessary use of $uses is just bad form. Granted, Photo-Album takes a little extra typing, but it gives you the context of the object. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To

Re: Scaffold Error

2006-09-19 Thread nate
Try this: public $name = HelpCategories; Sorry if the name thing wasn't completely clear. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: Scaffold Error

2006-09-19 Thread Brian French
it should be: class HelpCategoriesController extends AppController { public $name = HelpCategories; var $scaffold; var $useDbConfig = wwa; } where $name doesnt have 'Controller' in the string. it should be named: app/controllers/help_categories_controller.php Syl

Re: Controller-Controller call

2006-09-19 Thread Brian French
Hey could one of you show what the controller would look like when using Photo-Album? Im not sure im following :-p nate wrote: Well, unnecessary use of $uses is just bad form. Granted, Photo-Album takes a little extra typing, but it gives you the context of the object.

Re: Scaffold Error

2006-09-19 Thread Brian French
nate beat me :-p nate wrote: Try this: public $name = HelpCategories; Sorry if the name thing wasn't completely clear. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this

Re: Scaffold Error

2006-09-19 Thread Syl
Wow ! You guys are fast :-) Thanks !! That did it :-) 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

Re: Copying a db record

2006-09-19 Thread Cheeze
Very interesting indeed! Is this considered a bug? Maybe it ought to be tracked? If correction of this bug isn't possible, maybe it should be placed in somewhere obvious? Will help save a lot of headaches for those unaware - even the veterans.

Form validation

2006-09-19 Thread Edu
Hi, None of the samples in the docs work if I want to display an error message using $form-generateInputDiv('User/name', 'User name:', true, 'username required'); What do I have to write in the Controller ? --~--~-~--~~~---~--~~ You received this message

Re: Controller-Controller call

2006-09-19 Thread nate
For example: $this-Photo-Album-findAll(); --~--~-~--~~~---~--~~ 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

Re: DEBUG=2, text/xml and AJAX

2006-09-19 Thread admataz
Ah, that is an elegant solution, and another gem.. Note a caveat worth mentioning again - (I've mentioned this in the past on this list) RequestHandler-isAjax() tests the value of the HTTP_X_REQUESTED_WITH header, which is non-standard (specific to the Prototype.js library - and not used in

Re: Error: Unable to load controller LibsController

2006-09-19 Thread [EMAIL PROTECTED]
When CakePHP is trying to load your application there is a call to a $this-Lib somewhere or something similiar and it is looking to load in that controller \ model. It is telling you that the file doesn't exist. When is it you receive this error? I don't use PHPEclipse. I use text editor,

Re: Copying a db record

2006-09-19 Thread nate
This isn't a bug in the framework per se. Cake will intercept any HTTP request for a file that doesn't exist in app/webroot, including things like favicons. See here: http://withcake.com/posts/view/watch_your_paths --~--~-~--~~~---~--~~ You received this

Re: Runniing application in different Time zones.

2006-09-19 Thread Cheeze
Appreciate the update. It'll help other people as well. Just wanna check with you - by 'setting the cookie to domain wide root path' do you mean you set the cookie in AppController? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Error: Unable to load controller LibsController

2006-09-19 Thread Syl
Hmmm.well, I had not created any other classes. I was just navigating through the different PHP pages, and when I got to the cake directory, that's when the error kept coming up. Eventually, I gave up and installed an older version of cake and started from scratch. And, it seems to be

Re: Future of the Internet

2006-09-19 Thread guitarclap
I guess I went off on sort of a tangent with some of my post but the basics of my post, IMO, are quite applicable to this group since our existance as a community is based on the net and our main tool (Cake) is web-based development. Any small change in the net can affect us all ... with some

Re: Controller-Controller call

2006-09-19 Thread [EMAIL PROTECTED]
In my Photo model it uses Album in part of the association. So, as using it in the association it is already loading it up. So, you can gain access to the model functions by calling it like Nate showed. I just wanted to make sure that was still something done and valid in CakePHP so I can stop

Re: DEBUG=2, text/xml and AJAX

2006-09-19 Thread nate
Yes, most of the Ajax-related code in Cake is specific to Prototype. We have plans to branch out a bit, but unfortunately, other libraries are a bit lax in the header-setting department, which makes guarenteed detection methods somewhat difficult to come by.

Re: DEBUG=2, text/xml and AJAX

2006-09-19 Thread [EMAIL PROTECTED]
Thanks for the heads up. People need to remember that CakePHP is like buying a new car. Sure you can put a different aftermarket engine in it, but you are responsible for making sure it works again. This is one of those cases of what you need to do to change out the defacto AJAX to whatever

Re: Html helper emits id attribute that i don't want

2006-09-19 Thread [EMAIL PROTECTED]
nate wrote: Yes, you're right: the usual, dumb, wasteful approach to coding is that you have to explicitly specify every little thing you want your program to do. If that's how you want to write your code, you should not, I repeat *not* use CakePHP. ... Nate, The above message from you

Re: Security Exploit.

2006-09-19 Thread [EMAIL PROTECTED]
Is there any chance that the security expert would be willing to put together a brief overview of security concerns within Cake? I get overwhelmed with the number and variety of exploits and exploiters out there now. Everywhere I look there seems to be a chink in the armor of every online system.

Re: Security Exploit.

2006-09-19 Thread John David Anderson (_psychic_)
On Sep 19, 2006, at 11:01 AM, [EMAIL PROTECTED] wrote: Is there any chance that the security expert would be willing to put together a brief overview of security concerns within Cake? I get overwhelmed with the number and variety of exploits and exploiters out there now. Everywhere I look

Re: Html helper emits id attribute that i don't want

2006-09-19 Thread nate
The above message from you to the list is almost a flame. Well, it is a flame. I disagree. On purely neutral grounds -- as I would tend to agree with your opinion on this topic -- I've found that things work out better in a mailing list if people refrain from writing flames and

Re: Problem of using ereg_replace before saving data to database

2006-09-19 Thread Andrew Assarattanakul
If you must use ereg_replace though I don't recommend for this situation you need to define that the variable is a string by using strval function. if (!empty($this-data)) { $this-ereg_replace( , _, strval($this-data['Category']['cat']))); $this-save($this-data)); }

Fatal error: Cannot redeclare class object

2006-09-19 Thread [EMAIL PROTECTED]
Greetings, I have just downloaded and installed CakePHP 1.1.7.3363 on my SuSe 10 box (running Apache2, PHP5 and MySQL5) and am receiving this error when I try to run the webroot/index.php page: Fatal error: Cannot redeclare class object in /srv/www/cake/cake/libs/object.php on line 39 I pulled

Re: Html helper emits id attribute that i don't want

2006-09-19 Thread [EMAIL PROTECTED]
I don't think Nate was flaming Dieter. So, it shouldn't be a problem. Nate was flaming all those people that want to configure and reconfigure over and over again. Those are the same people with spaghetti code. And even the ones that don't have spaghetti code, that have studied well and make

Bake Error

2006-09-19 Thread Syl
Hey all, I've been trying to use the bake script. For some reason, it is having a tough time with my directories, error below. Any ideas ? Thanks guys, you're the best :-D Syl --- The following database configuration will be

Should I always define all associations?

2006-09-19 Thread Shutter
In a bigger application, there can be many tables with many associations. In this example, there are Forums with Posts. Some of the database associations might not be used; for example, a User hasMany Posts, but I will rarely need or want the Posts to be fetched when I just have a User. That

Re: Should I always define all associations?

2006-09-19 Thread Martin Schapendonk
On 9/19/06, Shutter [EMAIL PROTECTED] wrote: My main concern is optimization. It would seem easier to only enable certain associations during queries...but perhaps my thinking is off-base. How can this be optimized so that the application can scale well? I think your thinking is off base ;-)

Re: Access associations array

2006-09-19 Thread Mikee Freedom
Thanks for your response Troy. Good to know I'm not recording unecessary data. As to the second question, there are some associations that I will need to remove when a record is deactivated. am i able to access the CakePHP Model associations array via the controller, and should I be doing this

Re: Bake Error

2006-09-19 Thread gwoo
Are you passing the directory you want to write to? ie: php bake.php -app C:\wamp\www\WebWantAds\ not sure, but they may be the cause of the problem. Bake on. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: Bake Error

2006-09-19 Thread [EMAIL PROTECTED]
I had problems inititally with the bake script as well. Turned out I just had to properly format my -app switch. The way I have my application defined with cake in the app_dir, I actually just make the switch call and don't give it anything. Be nice if you could show us the command line you

Re: Should I always define all associations?

2006-09-19 Thread [EMAIL PROTECTED]
The only advice I can give is know the three tools you have. 1. Define the assocation in the model file. 2. Define associations on the fly with $this-ModelName-bindModel 3. Set the recursive parameter from 0 to whatever depending on how many levels deep you want to retrieve (the manual only

File

2006-09-19 Thread [EMAIL PROTECTED]
CakePHP's built in file (?component?). How do I use that?? Basically I am wanting to create brand new files, read files, create directories and set their permissions. I saw the File thing in CakePHP, but looking at just the api couldn't quite figure out how to make it do what it does. Thanks.

Re: Fatal error: Cannot redeclare class object

2006-09-19 Thread [EMAIL PROTECTED]
I figured it out, had an auto include setup in apache that I forgot about. (d'oh) --~--~-~--~~~---~--~~ 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

Shared Components

2006-09-19 Thread aidan
Hello, I could not find the answer searching, so if anyone has a solution, I'd greatly appreciate it. I'm using cake for many different applications on our web server. I have a shared directory where I keep the core cake files and then for each new application, I bring over the app files and go

Re: query and group by

2006-09-19 Thread DJ Spark
hya, Funny thing, i'm having the same problem now :) Which PHP/MYSQL/APACHE version are you using ? spark On 9/5/06, Ámon Tamás [EMAIL PROTECTED] wrote: Hello, I try the next query: SELECT workers.nev, worker_id, item_id, sum(pays.amount) as amount FROM pays, workers

Re: query and group by

2006-09-19 Thread DJ Spark
and if you are using windows/*nix spark On 9/19/06, DJ Spark [EMAIL PROTECTED] wrote: hya, Funny thing, i'm having the same problem now :) Which PHP/MYSQL/APACHE version are you using ? spark On 9/5/06, Ámon Tamás [EMAIL PROTECTED] wrote: Hello, I try the next query:

Re: Shared Components

2006-09-19 Thread nate
You can set $componentPaths as an array of alternate loading paths in app/config/bootstrap.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Call to undefined function mysql_connect()

2006-09-19 Thread greg
Hi, I'm running Windows XP, and have installed CakePHP(latest stable), Apache2.2, MySQL, and PHP5. In the cake\app\config\database.php file I have the following defined. var $default = array('driver' = 'mysql', 'connect' =

Re: Fatal error: Cannot redeclare class object

2006-09-19 Thread [EMAIL PROTECTED]
That just seems odd. Obviously it is possible since you have it working, but what is your reasoning for this arrangment of directories? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to

Re: Call to undefined function mysql_connect()

2006-09-19 Thread Mikee Freedom
seems like a stupid question, but are the mysql extensions installed? http://nz.php.net/manual/en/ref.mysql.php On 20/09/06, greg [EMAIL PROTECTED] wrote: Hi, I'm running Windows XP, and have installed CakePHP(latest stable), Apache2.2, MySQL, and PHP5. In the

Re: Re: Shared Components

2006-09-19 Thread Samuel DeVore
in my world my components and helper directories are kept in a seperate svn repository and then checked out as externals to the deployment and test applications. This way I share them all with all my client applications, and it helps me define ownership of those as seperate entities from the

Re: Shared Components

2006-09-19 Thread [EMAIL PROTECTED]
So Nate when he defines that in the bootstrap will it still look in the cake/libs/controllers/components, the app/controllers/components/ and the $componentPaths he defines? I think what you are saying is that will link up all the applications to use one shared component directory. Now, whether

Re: Call to undefined function mysql_connect()

2006-09-19 Thread Samuel DeVore
you might want to check your php info and see if mysql support was built in. In php5 it is often not installed by default. See http://us3.php.net/manual/en/ref.mysql.php you can make a page in your webroot that contains ?php phpinfo() ? sam d On 9/19/06, greg [EMAIL PROTECTED] wrote: Hi,

Re: Call to undefined function mysql_connect()

2006-09-19 Thread [EMAIL PROTECTED]
Yeah sounds like the extensions aren't installed. I believe the default installation of PHP5 uses mysqli and not mysql by default. Instead of just grabbing all of them for Windows I SERIOUSLY recommend you install WAMP5. www.wampserver.com Quick alias definitions, PHPMyAdmin, PHP5, MySQL, and

Re: Access associations array

2006-09-19 Thread [EMAIL PROTECTED]
I had another post on this. You can use bindModel in the controller to define associations on the fly. I try to only do this when absolutely necessary. Also, you can leave the associations and just make generous use of $this-ModelName-recursive = 0.

Re: Access associations array

2006-09-19 Thread Mikee Freedom
i've played with bindModel and unbindModel and use them both in my app at the moment. what i'm more looking for, is a way to define a function in my main app_model that will be able to loop through it's current associations. so, when I'm deactiviating a record I'll be able to cascade that

Re: Shared Components

2006-09-19 Thread aidan
Wow, great community. Thank you very much for the responses. using $componentPaths was exactly what I needed. Also running some tests using the standard core components like Session also work so it seems that this just appends the paths to the default paths. This is great! I saw the

cacheAction and Sessions

2006-09-19 Thread warrenchua
when im using cacheAction, i cant seem to access my sessions. when i load a page first time, it works out fine. but the second time, it doesnt recognize the session in it, so it outputs errors. this is what looks like in my view template: cake:nocache ?php if (

Re: Bugs with DBO_Postgres ?

2006-09-19 Thread nate
Sorry to take so long getting back to you. This is fixed now. You can get them in the latest trunk, or in the next release, which will be forthcoming shortly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake