Cake PHP Help

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Cake PHP Help

Gayathiri Balachandran

Hello!

Please help me in finding answer to this.

I am new to Cake PHP. I have downloaded the Cake PHP and worked out the example show in the site http://www.sitepoint.com/article/application-development-cakephp. I had done all the coding as per in the example,

             -    Create a table (notes),

-           database.php (app/config),

-           note.php (app/models),

-           notes_controller.php (app/controllers).
 

Creating *.thtml leads to an error. I just copy the code and save it as index.thtml (app/views/notes) and run in the browser (http://localhost/cake/app/views/notes ), it simply displays the coding.

 

The database is configured correctly. http://localhost/cake/ shows

"Your database configuration file is present.

Cake is able to connect to the database."


Cake Version: 3632

PHP Version: PHP5

Database: MySQL

 
Thanks in advance for all your help!!                  

Regards,
Gayathiri.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cake PHP Help

Eric C Blount
Your URL should be http://localhost/cake/notes (I think...without actually seeing your setup). What webserver are you using? If it's not Apache, you might try http://localhost/cake/index.php/notes (right guys? correct me if I'm wrong).
 
HTH,
Eric

 
On 10/31/06, Gayathiri Balachandran <[hidden email]> wrote:

Hello!

Please help me in finding answer to this.

I am new to Cake PHP. I have downloaded the Cake PHP and worked out the example show in the site <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.sitepoint.com/article/application-development-cakephp" target="_blank"> http://www.sitepoint.com/article/application-development-cakephp. I had done all the coding as per in the example,

             -    Create a table (notes),

-           database.php (app/config),

-           note.php (app/models),

-           notes_controller.php (app/controllers).
 

Creating *.thtml leads to an error. I just copy the code and save it as index.thtml (app/views/notes) and run in the browser (<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://localhost/cake/app/views/notes" target="_blank"> http://localhost/cake/app/views/notes ), it simply displays the coding.

 

The database is configured correctly. <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://localhost/cake/" target="_blank">http://localhost/cake/ shows

"Your database configuration file is present.

Cake is able to connect to the database."


Cake Version: 3632

PHP Version: PHP5

Database: MySQL

 
Thanks in advance for all your help!!                  

Regards,
Gayathiri.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cake PHP Help

Gayathiri Balachandran

Hi!
Thanks for your reply.
I am using Apache webserver.
Need to configure index.php in the app/webroot/ directory?  i.e. to
change

- define ('ROOT', dirname (dirname (dirname (__FILE__))));
- define ('APP_DIR', basename (dirname (dirname (__FILE__))));
- define ('CAKE_CORE_INCLUDE_PATH', ROOT);

Which file is to be run in the browser to view the output either the
http://localhost/cake/app/webroot  or
http://localhost/cake/app/views/notes/ ?



Eric C Blount wrote:

> Your URL should be http://localhost/cake/notes (I think...without actually
> seeing your setup). What webserver are you using? If it's not Apache, you
> might try http://localhost/cake/index.php/notes (right guys? correct me if
> I'm wrong).
>
> HTH,
> Eric
>
>
> On 10/31/06, Gayathiri Balachandran <[hidden email]> wrote:
> >
> > Hello!
> >
> > Please help me in finding answer to this.
> >
> > I am new to Cake PHP. I have downloaded the Cake PHP and worked out the
> > example show in the site
> > http://www.sitepoint.com/article/application-development-cakephp. I had
> > done all the coding as per in the example,
> >
> >              -    Create a table (notes),
> >
> > -           database.php (app/config),
> >
> > -           note.php (app/models),
> >
> > -           notes_controller.php (app/controllers).
> >
> >
> > Creating *.thtml leads to an error. I just copy the code and save it as
> > index.thtml (app/views/notes) and run in the browser (
> > http://localhost/cake/app/views/notes ), it simply displays the coding.
> >
> >
> >
> > The database is configured correctly. http://localhost/cake/ shows
> >
> > "*Your database configuration file is present. *
> >
> > *Cake is able to connect to the database*."
> >
> >
> > Cake Version: 3632
> >
> > PHP Version: PHP5
> >
> > Database: MySQL
> >
> >
> > Thanks in advance for all your help!!
> >
> > Regards,
> > Gayathiri.
> >
> > >
> >
>
> ------=_Part_3921_17049280.1162285848585
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 4174
>
> <div>Your URL should be <a href="http://localhost/cake/notes">http://localhost/cake/notes</a> (I think...without actually seeing your setup). What webserver are you using? If it's not Apache, you might try <a href="http://localhost/cake/index.php/notes">
> http://localhost/cake/index.php/notes</a> (right guys? correct me if I'm wrong).</div>
> <div>&nbsp;</div>
> <div>HTH,</div>
> <div>Eric<br><br>&nbsp;</div>
> <div><span class="gmail_quote">On 10/31/06, <b class="gmail_sendername">Gayathiri Balachandran</b> &lt;<a href="mailto:[hidden email]">[hidden email]</a>&gt; wrote:</span>
> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
> <p><span style="FONT-WEIGHT: normal">Hello! <br></span></p>
> <p><span style="FONT-WEIGHT: normal">Please help me in finding answer to this.</span></p>
> <p><span style="FONT-WEIGHT: normal">I am new to Cake PHP. I have downloaded the Cake PHP and worked out the example show in the site <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.sitepoint.com/article/application-development-cakephp" target="_blank">
> http://www.sitepoint.com/article/application-development-cakephp</a>. I had done all the coding as per in the example,</span></p>
> <p><span style="FONT-WEIGHT: normal">&nbsp;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- <span>&nbsp;&nbsp; </span>Create a table (notes), </span></p>
> <p style="MARGIN-LEFT: 0.75in; TEXT-INDENT: -0.25in"><span style="FONT-WEIGHT: normal"><span>-<span style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal; font-size-adjust: none; font-stretch: normal">
>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-WEIGHT: normal">database.php (app/config),</span></p>
> <p style="MARGIN-LEFT: 0.75in; TEXT-INDENT: -0.25in"><span style="FONT-WEIGHT: normal"><span>-<span style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal; font-size-adjust: none; font-stretch: normal">
>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-WEIGHT: normal">note.php (app/models),</span></p>
> <p style="MARGIN-LEFT: 0.5in"><code><span style="FONT-WEIGHT: normal; FONT-FAMILY: Arial"><span>-<span style="FONT-WEIGHT: normal; FONT-SIZE: 7pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal; font-size-adjust: none; font-stretch: normal">
>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="2"> </font></span></span></span></code><code><span style="FONT-WEIGHT: normal; FONT-FAMILY: Arial"><font size="2">notes_controller.php (app/controllers).</font><br>&nbsp;</span></code></p>
> <p><span style="FONT-WEIGHT: normal">Creating *.thtml leads to an error. I just copy the code and save it as index.thtml (app/views/notes) and run in the browser (<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://localhost/cake/app/views/notes" target="_blank">
> http://localhost/cake/app/views/notes</a> ), it simply displays the coding. </span></p>
> <p><span style="FONT-WEIGHT: normal">&nbsp;</span></p>
> <p><span style="FONT-WEIGHT: normal">The database is configured correctly. <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://localhost/cake/" target="_blank">http://localhost/cake/</a> shows</span></p>
>
> <p>&quot;<b><span style="FONT-FAMILY: Arial">Your database configuration file is present. </span></b></p>
> <p><b><span style="FONT-FAMILY: Arial">Cake is able to connect to the database</span></b>.&quot;</p>
> <p><br></p>
> <p><span style="FONT-WEIGHT: normal">Cake Version: 3632</span></p>
> <p><span style="FONT-WEIGHT: normal">PHP Version: PHP5</span></p>
> <p><span style="FONT-WEIGHT: normal">Database: MySQL</span></p>
> <p><span style="FONT-WEIGHT: normal">&nbsp;<br>Thanks in advance for all your help!!<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="FONT-WEIGHT: normal"></span></p>
> <p><span style="FONT-WEIGHT: normal">Regards,<br>Gayathiri.</span></p><br>
> ------=_Part_3921_17049280.1162285848585--


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

RE: Cake PHP Help

Adrian Godong
In reply to this post by Gayathiri Balachandran

More information about the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Gayathiri Balachandran
Sent: 31 Oktober 2006 13:43
To: [hidden email]
Subject: Cake PHP Help

 

Hello!

Please help me in finding answer to this.

I am new to Cake PHP. I have downloaded the Cake PHP and worked out the example show in the site http://www.sitepoint.com/article/application-development-cakephp. I had done all the coding as per in the example,

             -    Create a table (notes),

-           database.php (app/config),

-           note.php (app/models),

-           notes_controller.php (app/controllers).
 

Creating *.thtml leads to an error. I just copy the code and save it as index.thtml (app/views/notes) and run in the browser (http://localhost/cake/app/views/notes ), it simply displays the coding.

 

The database is configured correctly. http://localhost/cake/ shows

"Your database configuration file is present.

Cake is able to connect to the database."

 

Cake Version: 3632

PHP Version: PHP5

Database: MySQL

 
Thanks in advance for all your help!!                  

Regards,
Gayathiri.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cake PHP Help

Eric C Blount
Okay, one more time:
Cake automagically routes requests to your controllers/views. So when your controller is "notes" and you have /app/views/notes/index.thtml, then going to http://localhost/notes/ will automatically run the notes controller, method index, and display index.thtml view. Likewise, if you run http://localhost/notes/edit/, that will run the notes controller, method edit, and display edit.thtml from /app/views/notes/.
 
Get it?
 
HTH,
Eric

 
On 10/31/06, Adrian Godong <[hidden email]> wrote:

More information about the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Gayathiri Balachandran
Sent: 31 Oktober 2006 13:43
To: [hidden email]
Subject: Cake PHP Help

 

Hello!

Please help me in finding answer to this.

I am new to Cake PHP. I have downloaded the Cake PHP and worked out the example show in the site <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.sitepoint.com/article/application-development-cakephp" target="_blank"> http://www.sitepoint.com/article/application-development-cakephp. I had done all the coding as per in the example,

             -    Create a table (notes),

-           database.php (app/config),

-           note.php (app/models),

-           notes_controller.php (app/controllers).
 

Creating *.thtml leads to an error. I just copy the code and save it as index.thtml (app/views/notes) and run in the browser (<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://localhost/cake/app/views/notes" target="_blank"> http://localhost/cake/app/views/notes ), it simply displays the coding.

 

The database is configured correctly. <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://localhost/cake/" target="_blank">http://localhost/cake/ shows

"Your database configuration file is present.

Cake is able to connect to the database."

 

Cake Version: 3632

PHP Version: PHP5

Database: MySQL

 
Thanks in advance for all your help!!                  

Regards,
Gayathiri.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Cake PHP Help

Chris Hartjes

On 11/1/06, Eric C Blount <[hidden email]> wrote:
> Okay, one more time:
> Cake automagically routes requests to your controllers/views. So when your
> controller is "notes" and you have /app/views/notes/index.thtml, then going
> to http://localhost/notes/ will automatically run the notes controller,
> method index, and display index.thtml view. Likewise, if you run
> http://localhost/notes/edit/, that will run the notes controller, method
> edit, and display edit.thtml from /app/views/notes/.
>

To also add to Eric's comments...

Once again, all this information is actually covered on the web site.
Server configuration is also critical, and that is clearly explained
on the site as well.  Sounds like you haven't properly configured your
webserver so that it will serve up Cake applications properly.

Read this first
http://manual.cakephp.org/chapter/installing

Then read this
http://manual.cakephp.org/chapter/configuration

If you've done that and actually follow the instructions in there and
it still doesn't work, I'm sure the members of the list will be more
than happy to help you out.

If all you try to do is follow the tutorial without understanding how
to (a) actually configure your webserver to run Cake applications or
(b) understanding how Cake actually works at the MVC level (all
information that is in the manual) then I guarantee that your stuff
will not work, or it will work by accident without you understanding
what is going on.

Yes, I am cranky this morning.

Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---