Re: Catching DB connection failure

2006-11-29 Thread AD7six
'default'); > > > $connected = @$DataSource->connect(); > > > if (!$connected) > > { > >echo 'COULD NOT CONNECT to database.'; > >echo 'Current Settings:'; > >echo ''; > >echo 'HOST: '

RE: Catching DB connection failure

2006-11-29 Thread Mariano Iglesias
7;'; > echo 'HOST: ' . $DataSource->config['host'] . ''; > echo 'USER: ' . $DataSource->config['login'] . ''; > echo 'DATABASE: ' . $DataSource->config['database'] . ''

Re: building a sample app with cake...

2006-11-29 Thread tekion
All, I believe I have the mod_rewrite on, if not I would not get the documentroot to work. For example the base url is http://myip/cake. This works. What else am I missing in the configurations. Do I have to add a mod_rewrite rules manually for the url http://myip/cake/notes to work? Thanks. -

Re: Catching DB connection failure

2006-11-29 Thread Brad Daily
Thanks Mariano, that did the trick. One change I had to make was commenting out this line in the else statement: > $DataSource->disconnect(); Mariano Iglesias wrote: > Edit your webroot/index.php file and look for the following lines: > > $Dispatcher=new Dispatcher(); > $Dispatcher->dispatch($u

RE: Catching DB connection failure

2006-11-29 Thread Mariano Iglesias
It seems like a good solution but you run into trouble if, like on my application, you use some components on AppController::beforeFilter(). Furthermore, since your view would be layed out on your layout, if your layout uses some content coming from database (through a component, because you s

Re: Catching DB connection failure

2006-11-29 Thread Felix Geisendörfer
I had this problem a while ago and came up with a way to handle it in the AppController: http://www.thinkingphp.org/2006/07/04/handling-database-connection-errors-in-cakephp/ -- Felix Geisendörfer aka the_undefined -- http://www.thinkingphp.org http://www.fg-webdesign.de

RE: Catching DB connection failure

2006-11-29 Thread Mariano Iglesias
Ok then good. How do you check DB connection failure on your code? Using ConnectionManager and getDataSource()? -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and sha

Re: Catching DB connection failure

2006-11-29 Thread Dr. Tarique Sani
On 11/30/06, mariano.iglesias <[EMAIL PROTECTED]> wrote: > > I think he was requesting more of a report of having DB CONNECTION > problems, not how to set up database.php I did not tell him how to just setup database.php either... the code I pointed out catches faulty connects to database and doe

Re: Catching DB connection failure

2006-11-29 Thread mariano.iglesias
I think he was requesting more of a report of having DB CONNECTION problems, not how to set up database.php But I might be wrong anyway. -MI --- Remember, smart coders answer ten questions for every question they ask. So

Re: what time is the new cakephp version?

2006-11-29 Thread Dr. Tarique Sani
On 11/29/06, nate <[EMAIL PROTECTED]> wrote: > > And when it comes out, I promise you'll be within the first 50,000 or > so people to know. We keep you informed here at the CakePHP project! Developers are hoping for a Christmas present from the Nutty Santa :P Tarique -- =

Re: Catching DB connection failure

2006-11-29 Thread Dr. Tarique Sani
On 11/30/06, Brad Daily <[EMAIL PROTECTED]> wrote: > > We are using Cake in a project that will eventually be distributed to > be installed on a user's server. One thing I am struggling with is how We have an installer of sorts in cheesecake photoblog, http://cakeforge.org/projects/cheesecake whi

RE: Catching DB connection failure

2006-11-29 Thread Mariano Iglesias
Edit your webroot/index.php file and look for the following lines: $Dispatcher=new Dispatcher(); $Dispatcher->dispatch($url); Just before these two lines try adding the following code: $ConnectionManager =& ConnectionManager::getInstance(); $DataSource = @$ConnectionManager->getDataSource('defa

RE: Replacing Html Helper

2006-11-29 Thread Mariano Iglesias
Try this: Create a file app/views/helpers/myhtml.php with the following code: --- --- Then on your controller add this helper: var $helpers = array(

Re: Blog tutorial view and edit post error

2006-11-29 Thread jacmgr
Well, I just deleted/uninstalled my old WAMP install and installed a new windows XAMPP. Configured it for php 4.4.Everything is now working fine on my local windows machine. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: Replacing Html Helper

2006-11-29 Thread Adrian Godong
No, you don't need to. You can call other function just like they belong to your controller. Say HtmlHelper has link(...) function, when you need to call it in your overloaded controller, just call $this->link(...). You don't need to override what you don't want to change. On 11/30/06, Rodrigo Ta

Re: HtmlHelper: Empty datetime fields being saved as 0000-00-00 00:00:00

2006-11-29 Thread Mikee Freedom
you could intercept using a beforeSave callback. If a date field is found to be empty set it to null. or remove it entirely from the array and make sure your field has default set to null. HTH, mikee On 30/11/06, Rodrigo Tassinari <[EMAIL PROTECTED]> wrote: > > Hello all, > > I'm using the Html

Catching DB connection failure

2006-11-29 Thread Brad Daily
We are using Cake in a project that will eventually be distributed to be installed on a user's server. One thing I am struggling with is how to catch when they have entered the wrong connection details for their particular database server in the configuration file. Is there an easy way to catch wh

HtmlHelper: Empty datetime fields being saved as 0000-00-00 00:00:00

2006-11-29 Thread Rodrigo Tassinari
Hello all, I'm using the HtmlHelper to generate selects to fill some datetime and time fields in my database. The problem is that when a form is saved with these fields set to empty (ie, nothing selected on the selects), Cake is inserting -00-00 00:00:00 in the datetime fields (and 00:00:00 o

XML Component (was CakePHP *native* webservices.)

2006-11-29 Thread Christoph
After reading Chris Hartjes post in my previous thread, I thought I'd take his empty xml component and add some code. Below is what I came up with and I'm wondering what you guys think and whether something like this fits within the cake paradigm. enabled || !( strtolower( $controller->params['w

Re: Replacing Html Helper

2006-11-29 Thread Rodrigo Tassinari
Adrian, I tried to do what you said, but I failed. I need to override the dateTimeOptionTag() function, which uses lots of other functions and public variables from thr HtmlHelper... how do I do that? Do I have to override all those functions too? --~--~-~--~~~---~--~

Re: Warning: htmlspecialchars() - selectTag HABTM

2006-11-29 Thread Aldemir Vieira
Model and Controle attached. Add.thtml -- Materiais: selectTag('Material/Material', $materials, null, array('multiple' => 'multiple'));?> tagErrorMsg('Material/Material', 'Error!');?> Pinturas: selectTag('Pintura/Pintura', $pinturas, null, array('multiple' => 'multiple'));?> tagErrorM

Re: cake session save

2006-11-29 Thread nate
Seems more likely that something is off in your installation. Start with a fresh install with the default settings, and just change one setting at a time. When you have set CAKE_SESSION_SAVE to 'database', make sure you merged in the proper SQL file from app/config/sql. --~--~-~--~

Re: Warning: htmlspecialchars() - selectTag HABTM

2006-11-29 Thread Erich C. Beyrent
I experienced the same issue, but refreshed the page and the error went away. It was really bizarre. -Erich- Mariano Iglesias wrote: > This seems like a Bug. Can you report it on the track? > > > > Follow instructions here: > > > > https://trac.cakephp.org/wiki/bugreport > > -MI > >

cake session save

2006-11-29 Thread Claudio Poli 
hi, I've just downloaded the latest nightly and set: define('CAKE_SESSION_SAVE', 'database'); define('CAKE_SESSION_TABLE', 'sessions'); of course I've created the table and got: Fatal error: Undefined class name 'connectionmanager' in /Users/kain/Sites//cake/libs/session.php on line 417 sou

RE: CakePHP *native* webservices.

2006-11-29 Thread Mariano Iglesias
Representational State Transfer (REST) strictly refers to a collection of architectural principles to describe any simple interface that transmits domain-specific data over HTTP without an additional messaging layer such as SOAP. http://en.wikipedia.org/wiki/Representational_State_Transfer -MI

RE: CakePHP *native* webservices.

2006-11-29 Thread Mariano Iglesias
Most probably because CakePHP's core team is very small, filled with work, and they need our help. When we find that we discover how to properly explain something we believe is important and missing from Cake's main documentation, then a good idea is to write an article on the Bakery. Just a th

RE: Warning: htmlspecialchars() - selectTag HABTM

2006-11-29 Thread Mariano Iglesias
This seems like a Bug. Can you report it on the track? Follow instructions here: https://trac.cakephp.org/wiki/bugreport -MI --- Remember, smart coders answer ten questions

Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Samuel DeVore
http://en.wikipedia.org/wiki/Representational_State_Transfer http://www.xml.com/pub/at/34 http://www-128.ibm.com/developerworks/java/library/j-cb08016/index.html?ca=dgr-lnxw07Rest4RubyOnRails On 11/29/06, Christoph <[EMAIL PROTECTED]> wrote: > > > here are the things I did to get it to work at

Re: CakePHP *native* webservices.

2006-11-29 Thread Christoph
> So, looks like I managed to get it working. I hope this helps people > out who are trying to figure out how to use CakePHP's built-in web > services. This helped me a great deal. Thank you very much. I just wonder why simple information like this is missing from the documentation... When I

Strange Kunden Controller Error with 1and1

2006-11-29 Thread BlenderStyle
I'm using the 1and1 hosting company and having problems with my CakePHP program. Originally I was receiving 500 Server Error. I figured my problem was related to mod_rewrite. After finding http://groups.google.com/group/cake-php/browse_thread/thread/74829e6c96bd3ba0 I changed my htaccess files lik

Re: CakePHP *native* webservices.

2006-11-29 Thread Christoph
> here are the things I did to get it to work at a bare minimum for a > REST style service What's a REST style service? > That's the basics of what I did, and heck it worked for me. I started > on an article in the bakery but I am just swamped with work right now > and can't seem to finish it.

Re: Re: Re: Re: Re: Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Samuel DeVore
But I did get the first comment on your page ;) On 11/29/06, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On 11/29/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > > > > and the like would be > > > > > >

Re: Warning: htmlspecialchars() - selectTag HABTM

2006-11-29 Thread clemos
hi aldemir you should probably post your code if you want help. we can't have any clue right now clemos On 11/29/06, Aldemir Vieira <[EMAIL PROTECTED]> wrote: > Hi, > > I have problem with relateds (selectTag) HABTM in my (thtml), but when use > scaffold, the problem does not happen. >

Re: Re: Re: Re: Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Chris Hartjes
On 11/29/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > > and the like would be > > > Hah! Beat you to it. :) -- Chris Hartjes "The greatest inefficiencies come from solving problems you will never

Re: Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Chris Hartjes
On 11/29/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > > My completely uneducated, uninformed guess is that you need to do the > bits with the helpers and components because the webservices stuff was > planned and built into 1.2 and back ported to 1.1 and some of the > parts didn't come along for

Re: Re: Re: Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Samuel DeVore
Ok here is a start for posterity and I promise I will finish the bakery article soon. If anyone wants a short gig helping me with a couple of cake projects for a school district contact me off list Sam D On 11/29/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > Another thing I forgot to mention i

Re: Re: Re: Re: Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Samuel DeVore
and the like would be damn this cranky old fart needs more sleep... On 11/29/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > Ok here is a start for posterity and I promise I will finish the > bakery ar

Re: Re: Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Samuel DeVore
Another thing I forgot to mention is that you can do stuff like this in the controller if ($this->params['webservices'] == 'Rest') { $this->set('order',$this->Order->read()); } else { $this->redirect('/orders/index'); } To have different effects after doing something as part of yo

Warning: htmlspecialchars() - selectTag HABTM

2006-11-29 Thread Aldemir Vieira
Hi, I have problem with relateds (selectTag) HABTM in my (thtml), but when use scaffold, the problem does not happen. : *Warning*: htmlspecialchars() expects parameter 1 to be string, array given in *..\htdocs\[approot]\cake\basics.php* on line *558* -- []´s, Aldemir Vieira

Re: Blank lines at top of XML rendering

2006-11-29 Thread NOSLOW
Dave Barter wrote: > Check you files for blank lines after ?> at the end of the file. Also check for blank lines at the TOP of php files, and possibly in the MIDDLE if you close and open your php tags. I noticed that I had a blank line at the very top of all my HTML output and it turned out to b

Re: Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Samuel DeVore
My completely uneducated, uninformed guess is that you need to do the bits with the helpers and components because the webservices stuff was planned and built into 1.2 and back ported to 1.1 and some of the parts didn't come along for the ride. When you get your basic post ready you should open a

Re: LiveSearch

2006-11-29 Thread justkez
Hi Alex, I developed it on top of CakePHP 1.1.10.3825 and scriptaculous.js is version 1.6.5. At what stage do you think it might be going wrong? Does the spinner appear but no results come up, or does nothing happen at all when you type into the textbox? Feel free to paste your controller code i

Re: What is a "Content Filter"?

2006-11-29 Thread nate
cgmartin wrote: > OK I see, so it is being deprecated and removed without a specified > replacement. HtmlHelper object, CakePHP 1.2, lines 700-701: * @deprecated * @see HtmlHelper::link --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: what time is the new cakephp version?

2006-11-29 Thread nate
And when it comes out, I promise you'll be within the first 50,000 or so people to know. We keep you informed here at the CakePHP project! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post

Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Chris Hartjes
On 11/29/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > > :) hey Chris one of us has better type faster to save the other some trouble > ;) > Heh. You did show me what I was doing wrong (putting content into default.thtml instead of index.thtml) so I'll fix that up and post the whole damn thing

Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Samuel DeVore
:) hey Chris one of us has better type faster to save the other some trouble ;) On 11/29/06, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On 11/29/06, Christoph <[EMAIL PROTECTED]> wrote: > > > > So after all of that, I'm very curious to find out if anyone has gotten > > this to work using CakePH

Re: CakePHP *native* webservices.

2006-11-29 Thread Chris Hartjes
On 11/29/06, Christoph <[EMAIL PROTECTED]> wrote: > > So after all of that, I'm very curious to find out if anyone has gotten > this to work using CakePHP *native* functionality, which it claims > (erroneously I think, based on all my tests and attempts to get it > working) to have. > I decided t

Re: Re: CakePHP *native* webservices.

2006-11-29 Thread Samuel DeVore
here are the things I did to get it to work at a bare minimum for a REST style service make a rest.php file in components make a rest.php file in views/helpers in views/layouts make a folder called 'rest' and put a default.thtml file in it for the controller that you want a rest service make

Re: What is a "Content Filter"?

2006-11-29 Thread cgmartin
OK I see, so it is being deprecated and removed without a specified replacement. I see now that the encoding method in linkEmail() is "insecure", and vulnerable to spam bots... I'm thinking thats what you meant in your earlier post. Here's a site I found which lists several methods, with their p

Re: CakePHP *native* webservices.

2006-11-29 Thread Christoph
> The manual says that there needs to be an "xml layout" for this to > work. This brings up several questions: how does the *layout* affect > the view? I would think that there needs to be seperate view files for > XML just as there are for the HTML. But that doesn't seem to be the > case becau

Re: rdSimpleAuth

2006-11-29 Thread Christoph
I'm not entirely sure how I did it but I was finally able to get it working, for which I am very happy. While I was mucking about in rdSimpleAuth to try and figure out how it works to try and figure out what I might be doing wrong, I did find a small bug in the perm() method. Where it checks if

CakePHP *native* webservices.

2006-11-29 Thread Christoph
Yes, I realize that there are things out there like NuSOAP and/or half a dozen other third party libraries that you can use to offer RSS/XML feeds, webservices, etc. But CakePHP claims to be able to handle this stuff natively. It even says so in the manual on http://manual.cakephp.org/chapter/co

Chinese Cake Blog For Beginner and Lovers!

2006-11-29 Thread ERic ZoU
Hi, everyone This is my blog about Cake in chinese. Hopes, it can give others basic information. It contains all the work I have done. http://hi.baidu.com/xeboy/blog --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: What is a "Content Filter"?

2006-11-29 Thread nate
Well no, it is deprecated, and has been for some time now. It will likely be removed in 1.2. --~--~-~--~~~---~--~~ 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@googlegr

Re: Re: Re: fake HABTM

2006-11-29 Thread Samuel DeVore
here's the thread on this http://groups.google.com/group/cake-php/browse_thread/thread/bef70558f7854732/865df96b0d8b2420?lnk=gst&q=hasmany+recursive+2+nate&rnum=1#865df96b0d8b2420 On 11/29/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > you also need to set var $recursive = 2; in the two primary

Re: Re: fake HABTM

2006-11-29 Thread Samuel DeVore
you also need to set var $recursive = 2; in the two primary models, and it should be noted that this will not work with scaffolding On 11/29/06, Jon Bennett <[EMAIL PROTECTED]> wrote: > > > > Before replying with possibly irrelavent info, what is it that a HABTM > > > doesn't do for you, and what

Re: how to produc site?

2006-11-29 Thread [EMAIL PROTECTED]
"ERic ZoU 写道: " > What is your cakephp in the address? > At that potision, it should be your controller. thks ,,, i fix by myself. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this

Drag hoverclass not effect, within my code

2006-11-29 Thread [EMAIL PROTECTED]
Drag Demo drag me true, ); echo $ajax->drag('product1', $options); ?> image('ajax-loader.gif') ?> 'products', 'hoverclass'=> "cart-active" ); $ajaxoptions = array( 'url' => '/drags/hello', 'update' =>

Re: fake HABTM

2006-11-29 Thread Jon Bennett
> > Before replying with possibly irrelavent info, what is it that a HABTM > > doesn't do for you, and what is it you want to achieve? > > nothing, just sitting here and can't remember what the trick was I think: • vanilla HABTM association ModelOne hasAndBelongsToMany ModelTwo ModelTwo hasAndBe

Re: fake HABTM

2006-11-29 Thread Claudio Poli 
AD7six ha scritto: > Before replying with possibly irrelavent info, what is it that a HABTM > doesn't do for you, and what is it you want to achieve? nothing, just sitting here and can't remember what the trick was > Did you try the webpage for IRC (see link below)? not yet > I would propose

Re: fake HABTM

2006-11-29 Thread AD7six
Before replying with possibly irrelavent info, what is it that a HABTM doesn't do for you, and what is it you want to achieve? Did you try the webpage for IRC (see link below)? I would propose that the associations get wiped becuase it's more intuitive to unlink all and define what you wanted, r

fake HABTM

2006-11-29 Thread Claudio Poli 
hi, I was reading, some times ago, an AD7Six statement in irc how to implement a "fake" HABTM with other kind of associations like hasMany. I cannot join irc from work, maybe somebody, or AD7Six, can explain in there? Plus I've a question, why when saving pure HABTM CakePHP wipes everything and w

Re: how to produc site?

2006-11-29 Thread ERic ZoU
What is your cakephp in the address? At that potision, it should be your 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

othAuth always load "noaccess_page"

2006-11-29 Thread jmassi
Hi, I've installed othAuth 0.5, login detection works fine, but when the redirect page have to been loaded it always load "no_access_page". The code of the models an controllers that I use is here: http://bin.cakephp.org/view/252913034 I have created a "admin" user that belong to group 1 and

ajax doubt

2006-11-29 Thread Fabio Esposito
Hi people! I'm loving cake-php but have some doubt can you help me? I cant understand very well how to use scriptaculous and prototype ajax libraries. How and where i define my own method for example? In my experience with mojavi framework I uses xajax as ajax library and seems to me very easy to

LiveSearch

2006-11-29 Thread @leX
Has anyone tried implementing this... http://www.justkez.com/cakephp-livesearch/ I tried it on one of my own tables but without any success. I'm not sure where I am going wrong. Also the tutorial does not mention what version of cakephp and scriptaculous it has been tested on. --~--~-~--

Re: what time is the new cakephp version?

2006-11-29 Thread Daniel Hofstetter
There is no official release date, it will be released when it is ready. -- Daniel Hofstetter http://cakebaker.42dh.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, sen

what time is the new cakephp version?

2006-11-29 Thread [EMAIL PROTECTED]
i wanna know --~--~-~--~~~---~--~~ 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

Re: problem when i product my site

2006-11-29 Thread [EMAIL PROTECTED]
i fix it by myself --~--~-~--~~~---~--~~ 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] Fo

how to produc site?

2006-11-29 Thread [EMAIL PROTECTED]
i set "DocumentRoot d:/xampp/xampp/htdocs/cakephp/app/webroot" in httpd.conf i see it ok when i goto http://dp.shttnet.com/jlcargos but when i click http://dp.shttnet.com/cakephp/jlcargos/view/66, it show me " CakePHP Rapid Development Missing controller You are seeing this error because cont