Re: ckaephp 2.0 using Configure::read in model construct method

2011-09-09 Thread Dr. Loboto
If you write into Configure in AppController::beforeFiler() it happens after models creation in most cases (at least prior Cake 2.0). So you better create some init function in model for this and call it manually after Configure set. In init function re-attach behavior with new params because chang

Re: phpinfo displayed

2011-09-09 Thread Ryan Schmidt
On Sep 9, 2011, at 18:50, Prabha vathi wrote: > In my cakephp site, if i type > domainname.com/index.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C1 > > It displays phpinfo > > How to stop this? Set expose_php = off in your php.ini. -- Our newest site for the community: CakePHP Video Tutoria

phpinfo displayed

2011-09-09 Thread Prabha vathi
Hi, In my cakephp site, if i type domainname.com/index.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C1 It displays phpinfo How to stop this? -- 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 h

Re: Unable to install CakePHP

2011-09-09 Thread Yves S. Garret
Ok, now it works. XAMPP did it. On Fri, Sep 9, 2011 at 1:52 PM, Chris wrote: > Why don't you just uninstall those things and run something like WAMP > which is auto setup or the like? XAMPP is another good one which I > think is a little easier than WAMP, I'm not sure since I haven't used > it,

Re: 'Site under maintenance' option

2011-09-09 Thread Xoubaman
Ip ranges is my B plan, but could be a problem with non-tech skilled admin users login from dinamic ips. I will come to this point later, so thanks for the answers, hope I can find a good solution. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out

Re: Using $this->set in view doesn't set the var

2011-09-09 Thread Xoubaman
http://api13.cakephp.org/class/view#method-Viewset http://book.cakephp.org/view/1086/set Someone of the core team answered that Var::set could be used to solve a similar issue in a post I here found when searching to my question. Don't remember the search subject now :( I mean cleaner in the se

Re: joining strings in model

2011-09-09 Thread gremlin
You can't do that in *any* php class - you have to already have the class constructed before $this->name is set - so how would your class know how to set $this->name inside a property before instantiation? You *can* do this in the __construct( ... ) function. On Sep 9, 10:28 am, lyba wrote: > An

Re: Unable to install CakePHP

2011-09-09 Thread Yves S. Garret
About to do install XAMPP. On Fri, Sep 9, 2011 at 1:52 PM, Chris wrote: > Why don't you just uninstall those things and run something like WAMP > which is auto setup or the like? XAMPP is another good one which I > think is a little easier than WAMP, I'm not sure since I haven't used > it, and I

Re: Unable to install CakePHP

2011-09-09 Thread Yves S. Garret
http://localhost/ gives me a "It works!" message. http://localhost/index.php spews out all sorts of PHP relevant stuff (like version, build, etc.) On Fri, Sep 9, 2011 at 1:20 PM, Teddy Zeenny wrote: > Does http://localhost/ give the same page as http://localhost/index.php ? > > On Fri, Sep 9, 20

Re: Unable to install CakePHP

2011-09-09 Thread Chris
Why don't you just uninstall those things and run something like WAMP which is auto setup or the like? XAMPP is another good one which I think is a little easier than WAMP, I'm not sure since I haven't used it, and I also THINK it's updated more regularly http://www.wampserver.com/en/ http://www.

Re: Cake 2.0: Session

2011-09-09 Thread mark_story
Sessions start as soon as you first use them in 2.0. If you don't use the session on a request the session is not started. But if you want to force the session open what Tarique suggested would work. -Mark On Sep 9, 12:18 am, "Dr. Tarique Sani" wrote: > Guess you can use the ini to pass an arr

Re: Unable to install CakePHP

2011-09-09 Thread Teddy Zeenny
Does http://localhost/ give the same page as http://localhost/index.php ? On Fri, Sep 9, 2011 at 6:56 PM, Yves S. Garret wrote: > Changed all overrides to All (some places where I've read it's a no-no to > do), still nothing. > > > On Fri, Sep 9, 2011 at 11:48 AM, Sam Sherlock wrote: > >> I see a

Re: Unable to install CakePHP

2011-09-09 Thread Yves S. Garret
Changed all overrides to All (some places where I've read it's a no-no to do), still nothing. On Fri, Sep 9, 2011 at 11:48 AM, Sam Sherlock wrote: > I see an > > AllowOveride None > > change this to > > AllowOverride All > > restart apache :) > > - S > > > > > On 9 September 2011 16:25, Yves S.

Re: Unable to install CakePHP

2011-09-09 Thread Sam Sherlock
I see an AllowOveride None change this to AllowOverride All restart apache :) - S On 9 September 2011 16:25, Yves S. Garret wrote: > I tried the following without success: > > > DirectoryIndex index.php > > > > DirectoryIndex index.html index.php > > > The PHP page still wor

Re: Blog Tut help

2011-09-09 Thread Sam Sherlock
I added the code from prev post to your code below. as you add more controllers you'd be better off adding general comps & helpers to the app_controller - S On 9 September 2011 16:21, Jeremy Williams wrote: > this is my controller. > > > class PostsController extends AppController { >

Re: Using mPDF

2011-09-09 Thread LunarDraco
You might want to review this article in the bakery: http://bakery.cakephp.org/articles/Casmo/2010/06/26/creating-pdf-files-with-html2ps-html2pdf As mPDF is based on html2fpdf perhaps the techniques in that article could help you get started. On Sep 8, 12:34 pm, Uziel Barbosa wrote: > anyone? >

Re: Unable to install CakePHP

2011-09-09 Thread Yves S. Garret
I tried the following without success: DirectoryIndex index.php DirectoryIndex index.html index.php The PHP page still worked, but I couldn't get the CakePHP page up. On Fri, Sep 9, 2011 at 10:43 AM, Sam Sherlock wrote: > I think your issue is that directory index should be php (yo

Re: Blog Tut help

2011-09-09 Thread Jeremy Williams
this is my controller. set('posts', $this->Post->find('all')); } function view($id) { $this->Post->id = $id; $this->set('post', $this->Post->read()); } function add() { if (!(empty($this->data))) {

Re: Blog Tut help

2011-09-09 Thread Sam Sherlock
have you got helpers array in the controller? you may have various helpers in the array. check the app_controller too var $helpers = array( 'Html' ); - S On 9 September 2011 15:17, Jeremy Williams wrote: > I did the blog tut on: "http://book.cakephp.org/view/1528/Blog"; and i > h

Re: How safe is CakePhps auth component and other ..

2011-09-09 Thread Thomas Ploch
1.) The Auth component is safe. It uses a salted SHA1 encrypted pw by default. It auto-escapes the fields already, so you don't have to bother with it. Just use SSL to encrypt the connection to sensitive parts of the application to be on the (very) safe side. 2.) Well, if you use the Apache we

How safe is CakePhps auth component and other ..

2011-09-09 Thread Miloš Vučinić
Hi, I have two questions and I hope someone can help me.. I am making application which needs to be relatively safe. So here are questions I have for you: 1. I am using auth component from cakephp , but I cannot escape the login fields because login component works for itself and I cannot edit it

Re: Unable to install CakePHP

2011-09-09 Thread Sam Sherlock
I think your issue is that directory index should be php (your config was set to html) DirectoryIndex index.php - S On 9 September 2011 14:01, Yves S. Garret wrote: > Is it possible to make attachments in this mailing list or should I upload > the files somewhere and then throw a link

joining strings in model

2011-09-09 Thread lyba
Any suggestions why it is not possible to join strings in a model file: $foo = 'A'.'B'; this produces error: Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in .\app\models\event.php on line 7 A real life scenario: I have a model Event that has a self reference and

Blog Tut help

2011-09-09 Thread Jeremy Williams
I did the blog tut on: "http://book.cakephp.org/view/1528/Blog"; and i have an error: "Notice (8): Undefined property: View::$Html [APP\views \posts\index.ctp, line 4]" basically i am too new to cakephp to understand what this means or how to fix it. Here is some other information it gives me, hop

Re: Unable to install CakePHP

2011-09-09 Thread Yves S. Garret
Is it possible to make attachments in this mailing list or should I upload the files somewhere and then throw a link? On Thu, Sep 8, 2011 at 7:31 PM, Sam Sherlock wrote: > Your server is not configured correct. > > Is php set? Can you display php info? > Is mod rewrite setup? > > - S > On 8 Sep

Re: ckaephp 2.0 using Configure::read in model construct method

2011-09-09 Thread badben
Thanks. I have tried this and I still get the same issue unfortunately. any ideas of where to start looking if it is a problem with my setup? On Sep 9, 10:23 am, Thomas Ploch wrote: > Hi, since you are setting Model::actsAs before the parent Model is > initialized this is doomed to fail. > > Tr

Re: ckaephp 2.0 using Configure::read in model construct method

2011-09-09 Thread Thomas Ploch
Hi, since you are setting Model::actsAs before the parent Model is initialized this is doomed to fail. Try the following: function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); $this->actsAs['Revision']['limit'] =Configure::read('S

ckaephp 2.0 using Configure::read in model construct method

2011-09-09 Thread badben
I am building a new application in cakephp 2.0 and am struggling using the configure function. I have a function in AppModel beforeFilter that load the settings from db into Configure using configure::write. I also have the following in my User Model: function __construct($id = false, $table

Re: Problems loading page

2011-09-09 Thread AD7six
On Sep 7, 4:48 pm, dminder wrote: > I purchased a script that uses cake and i cannot seem to get any > support from the person whom I got it from.  SOOO...Here is the > error(s) that I seem to be receiving: > > Warning (512): SQL Error: 1064: You have an error in your SQL syntax; > check the man

Re: Problems loading page

2011-09-09 Thread WebbedIT
It certainly is a database issue .. did the original developer ever have it working on your server, if not did he have it working elsewhere? HTH, Paul. On Sep 8, 2:31 pm, dminder wrote: > Thanks for your response, > > I got it lock, stock and barrel. I had never heard of cake prior to > this and

Re: custom validation rules - custom message

2011-09-09 Thread WebbedIT
Google is your friend. A search for 'cakephp return link in validation error': http://www.google.co.uk/search?q=cakephp+return+link+in+validation+error&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a To me to: http://stackoverflow.com/questions/6972061/using-htmlhelper-on-m

Re: Cake 2.0: Creating an helper accessible in layouts

2011-09-09 Thread WebbedIT
All helpers are available in the layout of created and called correctly. Look at how much the HtmlHelper is used in the default layout. See if Tilen's tips help, if not go back to the book and make sure your following the conventions correctly. HTH, Paul On Sep 8, 7:10 pm, Tilen Majerle wrote: