Making AJAX play nice with $this->model->validates()

2009-09-19 Thread young.steveo

First, a big "Thank You" to this group, it's helped me a lot by
reading posts here.

I'm using ajax to pre-validate a form while the user types data into
the form's fields.  So, if the user types a username that is too
short, or already in use, etc., they are notified by the script as
they type.  You know the drill.  ;)

I'm using cakePHP's model validation to test if the data is valid.  If
I include only one field in the $validate array, for exaple:
'username', and then I put the following logic in my controller:

$this->MyModel->set($this->data);
if ($this->MyModel->validates()) {
  $this->render('validate', 'ajax');
else {
  $this->render('invalidate', 'ajax');
}

everything works fine.  However, if I include muliple fields in the
model's $validate array, like password, email, etc., then when I try
to validate only the username (the user has not typed anything into
the password or email field yet), it does not validate (presumably
because the logic I have written for validating a password states that
the password field cannot be empty), and the code renders the
invalidate.ctp.

I'm seperating the controller actions into username_validate,
password_validate, etc. for the ajax calls, so how do I get cakephp to
only check if the username is valid, when password and email data is
not present?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: AJAX

2009-09-19 Thread schneimi

Hi,

I think what you need is to set 'evalScripts' => true in the ajax
options of your button.

On 19 Sep., 21:00, Dave  wrote:
> Hi,
> I'm trying to load additional content to my page using the ajax
> helpers. I have got it to work once, loading the data for the next
> page but I'm at a loss as to how i can then set another ajax button to
> load the next page.
> It appears that I need the javascript included in the ajax template to
> enable another button to be created but when simply pasting the
> javascript file includes within the ajax layout it does not appear to
> include the files, in fact they vanish.
> Anyone had any idea of a good way to have a button be created within
> the new ajax content?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to copy a deep database hierarchy?

2009-09-19 Thread Nancy

I have used saveAll but it doesn't seem to really handle very deep
associations well.  I'm afraid it might not work for this because
we're talking about 40+ tables all linked!

On Sep 18, 11:07 pm, Bert Van den Brande  wrote:
> I haven't done this before, but I think this can be accomplished by using
> the saveAll() function :http://book.cakephp.org/view/75/Saving-Your-Data.
> Have a look at the saveAll() documentation, and also at this section 
> :http://book.cakephp.org/view/75/Saving-Your-Data#Saving-Related-Model...
>
> My approach would be to
> * load the Recipe with it's Ingredients and Tags from database
> * manipulate the data by removing the 'id' information from the models
> * pass the manipulated data to the saveAll() method
>
> Friendly greetings,
> Bert
>
> On Fri, Sep 18, 2009 at 9:16 PM, Nancy  wrote:
>
> > Maybe this is more of a database question than a Cakephp question
> > but...
>
> > I have a database with about 40 tables all related and I'm going to
> > need to make copies of a whole deeply nested database structure, just
> > changing id's be coming the interconnections.  Does anyone know of a
> > reasonable way to do this?
>
> > I'm using MySQL.
>
> > Many thanks!
>
> > Nancy
>
> > Simple Example:
>
> > Recipe -> Ingredients
> >           -> Tags
>
> > Lets say I want to copy the Apple Pie recipe and all it's related
> > records to a new structure but none of the data are shared between the
> > two copies.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



What is wrong with this code?

2009-09-19 Thread Dave Maharaj :: WidePixels.com

Call to undefined function loadmodel() when Im logged in as admin.

I re-ran buildACL, init DB, cleared cache (server and browser) emptied ACOS,
ACOS_AROS, ran buildACL and initDB again Same thing. Cant figure out
what is going on here. 

- Invoices db has data in it.
- Admin routing works for the other controllers
- actions are in AROS table after running buildACL

I can not bring up anything in the invoices controller
 
invoices_controller.php
 
Auth->autoRedirect = false;
  $this->Auth->allowedActions = array();
  }
   
 

 function admin_index() {   
  $this->Invoice->recursive = 0;
  $this->set('invoices', $this->paginate());
 }
 
  function admin_view($id = null) {
  if (!$id) {
   $this->Session->setFlash(__('Invalid Invoice.', true));
   $this->redirect(array('action'=>'index'));
  }
  $this->set('invoices', $this->Invoice->read(null, $id));
 }
 
  function admin_add(){
$this->redirect(array('admin' => true, 'action' => 'edit')); 
 }
 
  function admin_edit($id = null) {
  if (!empty($this->data)) {
   if ($this->Invoice->save($this->data)) {

$this->redirect(array('action'=>'index'));
   } else {
$this->redirect(array('action'=>'index'));

   }
  }
  if ($id && empty($this->data)) {
   $this->data = $this->Invoice->read(null, $id);
  }
 }
 
  function admin_delete($id = null) {
  if (!$id) {
   $this->redirect(array('action'=>'index'));
  }
  if ($this->Invoice->del($id)) {
   $this->redirect(array('action'=>'index'));
  }
 }
}
?>
 
invoice.php
 

 
Ideas whats missing? Wrong?
 
Dave


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Saving / Finding from app_controller

2009-09-19 Thread Dave Maharaj :: WidePixels.com
I have set up the PayPal IPN Notification tool. Send test IPN saved to my
db, and then I get sent an email saying there was a transaction. 
But no matter what I try I can not update the user who made the transaction
from the app_controller
I can extract the user_id from the transaction and since there is no view I
just pass it as a variable to the email so I can see it for testing.
 
I have tried different functions to get the users current credits but
nothing work.
 
Tried the following in:
app_model or user_model or app_controller
public function getCredits($user_id) {
  $params = array(
'conditions' => array(
'user.id' => $user_id),
'contain' => false, 
'fields' => array('User.id',
   'User.credits') 
);
  $q = $this->User->find(first', $params);
  return $q['User']['credits'];
  }
 
Tried calling it from app_controller
$credits = $this->User->getCredits($employer);
 
or
 
$credits = $this->getCredits($employer);
 
and
 
$credits = getCredits($employer);
 
But nothing is ever returned, there must be an error because no email is
sent whenever I try any of the function variations. The ipn shows up in the
dbbut noemail sent tome saying new transaction.
 
Is there a way to debug a function in the app_controller or how do I get the
users credits and updatethe credits  field?
 
Dave 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake App grail?

2009-09-19 Thread Simon


Yea there is alot get the folder called base go to docs and open
readme.txt  and follow the instruction
On Sep 19, 1:13 pm, CoolCourt  wrote:
> hey i downloaded the files but i am hving trouble installing them, do
> i install all of the files on my server or do i just install one of
> the folders ?
>
> i just wanna get some basic set up so i can control my menu, maybe
> create static pages and a simple user table or something to work with
> including the admin stuff.
>
> Thanks for the link, i just need a lil bit of a nudge to get it right.
>
> thanks
>
> On Sep 18, 12:31 pm, Sion  wrote:
>
>
>
> > here some to look at
> > Mi-Base the AD7six's creationhttp://svn.assembla.com/svn/mi
> > and try this too there is alothttp://cakeforge.org/
>
> > On Sep 18, 12:10 pm, CoolCourt  wrote:
>
> > > Hello i was taking a look at cakeapps and i was wondering if there
> > > were any particular cake apps that had a fairly good stable scheme
> > > that could be used as a starting point for any project?
>
> > > Hope someone came across and found a few gems, there are just soo many
> > > i have a hard time looking through and finding them if theres no
> > > screenshot
>
> > > Any help will do thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to automatic add value to user_id

2009-09-19 Thread kicaj

Hehe

Sorry, I just was logged;p



On 19 Wrz, 08:18, Marcelo Andrade  wrote:
> On Fri, Sep 18, 2009 at 10:25 AM, kicaj  wrote:
> > (..)
> > My first try was setting $this->data[$this->modelClass']['user_id'] =
> > 4this->Auth->user('id'); but when I use $this->data in App_Controller
> > my Add action automated works...
>
> If your on controller, I think $this->modelClass is an
> undefined variable.  Try to write the proper model
> name to the $this->data key.
>
> Best regards.
>
> --
> MARCELO DE F. ANDRADE
> Belem, PA, Amazonia, Brazil
> Linux User #221105
>
> http://mfandrade.wordpress.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake App grail?

2009-09-19 Thread CoolCourt

hey i downloaded the files but i am hving trouble installing them, do
i install all of the files on my server or do i just install one of
the folders ?

i just wanna get some basic set up so i can control my menu, maybe
create static pages and a simple user table or something to work with
including the admin stuff.

Thanks for the link, i just need a lil bit of a nudge to get it right.

thanks

On Sep 18, 12:31 pm, Sion  wrote:
> here some to look at
> Mi-Base the AD7six's creationhttp://svn.assembla.com/svn/mi
> and try this too there is alothttp://cakeforge.org/
>
> On Sep 18, 12:10 pm, CoolCourt  wrote:
>
> > Hello i was taking a look at cakeapps and i was wondering if there
> > were any particular cake apps that had a fairly good stable scheme
> > that could be used as a starting point for any project?
>
> > Hope someone came across and found a few gems, there are just soo many
> > i have a hard time looking through and finding them if theres no
> > screenshot
>
> > Any help will do thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: PayPal Help

2009-09-19 Thread Dave Maharaj :: WidePixels.com

Thanks guys...sounds good. Will work on it and see how it goes.

Thanks

Dave 

-Original Message-
From: brian [mailto:bally.z...@gmail.com] 
Sent: September-19-09 9:22 AM
To: cake-php@googlegroups.com
Subject: Re: PayPal Help


I agree with Bert. Just display the PP button after the form is validated
and saved. Once the payment is processed, update your DB to reflect that.

On Sat, Sep 19, 2009 at 1:52 AM, Bert Van den Brande 
wrote:
> Requiring our users to provide all the information for a valid login 
> isn't really a 'Pay Now' option imho.
>
> Since it's required anyway to have a site login, I would show the Pay 
> button only when you have validated the account creation form and the 
> new account is created in your database.
>
> As a visual trick maybe you can display a 'Pay Now' button that not 
> links to PayPal but only submits your own account creation form.
>
>
> On Sat, Sep 19, 2009 at 12:12 AM, Dave Maharaj :: WidePixels.com 
>  wrote:
>>
>> I managed to figure out the harder PayPal Pro website gateway 
>> integration but cant seem to figure out the simple Pay Now buttons.
>>
>> Basic scenario is if the User is not logged in they have to create an 
>> account and pay in 1 shot. Pay Pal has a requirement that you offer 
>> customers the option to use Pay Now / Express Checkout  without 
>> logging into your site I need to figure this out.
>>
>> So the form appears with "Create your account" username,password, 
>> confirm password so submit the form if it validates the user is 
>> created, take the newly created User.id and pass that to PayPal in 
>> [custom] key value => $id but how do I then send the info to PayPal?
>>
>> If I click on the PayPal buy now button it sends the user to PayPal 
>> to log into their PayPal account but at this point its too late 
>> because I sent no info. One or the other but I cant seem to figure out
how to do both at once.
>>
>> Should I create a regular registration form but point it to PayPal 
>> $url, run validation before sending on the User.fields. If validates 
>> creates the user , grab the id and then pass that to the info that gets
sent to PayPal?
>> But once the form is validated wont it just send off ?
>>
>> Clueless.
>>
>> Can someone who has done something like this point me in the right 
>> direction, tips, suggestions.
>>
>> Greatly appreciated.
>>
>> Dave
>>
>
>
> >
>



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



AJAX

2009-09-19 Thread Dave

Hi,
I'm trying to load additional content to my page using the ajax
helpers. I have got it to work once, loading the data for the next
page but I'm at a loss as to how i can then set another ajax button to
load the next page.
It appears that I need the javascript included in the ajax template to
enable another button to be created but when simply pasting the
javascript file includes within the ajax layout it does not appear to
include the files, in fact they vanish.
Anyone had any idea of a good way to have a button be created within
the new ajax content?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Undefined property, Fatal Error trying to get database

2009-09-19 Thread Victor Castellanos

Hey everyone,

I've been having a lot of troubles trying to set a CakePHP project. My
hosting service has PHP 5.2.9.

My problem is basically this:

Notice (8): Undefined property: AppModel::$Categoria [APP/controllers/
items_controller.php, line 297]

Fatal error: Call to a member function find() on a non-object in /home/
neverminded/public_html/projectname/app/controllers/
items_controller.php on line 297

The code for that is:

class ItemsController extends AppController {

var $name = 'Items';

...
function catalogo($id = NULL) {

// Llenar los selects del formulario.
// this is line 297 :
$this->set('categorias', $this->Item->Categoria->find('list') );

}
...
}

Item model:

class Item extends AppModel {

var $name = 'Item';

var $primaryKey = 'id';

var $useTable = 'items';

var $belongsTo = array(
'Categoria' => array(
'className' => 'Categoria',
'foreignKey' => 'id_categoria'
),
);
}

Categoria model:

class Categoria extends AppModel {

var $name = 'Categoria';

var $primaryKey = 'id';

var $useTable = 'categorias';

var $hasMany = array(
'Item' => array(
'className'=> 'Item',
'foreignKey'=> 'id_categoria'
)
);
}

-
Another thing that happens is I get this error:


Missing Database Table

Error: Database table contactos for model Contacto was not found.

Notice: If you want to customize this error message, create app/views/
errors/missing_table.ctp

But my Contacto model has
class Contacto extends AppModel {

var $name = 'Contacto';

var $useTable = false;

}

Notice the $useTable= false.

Weird thing is that locally, the project works fine, but when I run it
on my production server, which has same specs as my local PC, it gives
me all this errors, plus sessions are not being saved, don't know why.

Hope someone can help me out with this.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: some newbie questions

2009-09-19 Thread lorenx

that's exactly what i wanted to know,
thank you.



On Sep 19, 6:35 pm, Hols Kay  wrote:
> Yes - because it's coming from the URL it's not *strictly* necessary
> to redefine it in your controller, but defining it in the controller
> is generally better coding style because the explicit relationship is
> easier to see at-a-glance. It also means that you're better able to do
> checks on the id number, for example:
>
>         function index($id = null){
>                 if (!$id) {
>                         $this->set('model', $this->Model->read(null, '1'));
>                 } else {
>                         if(!is_numeric($id)) {
>                                 $this->set('model', $this->Model->read(null, 
> '1'));
>                         } else {
>                                 $this->set('model', $this->Model->read(null, 
> $id));
>                         }
>                 }
>         }
>
> It's really just a style of coding that increases clarity (or not, as
> the case may be ;) ).
>
> On Sep 19, 4:49 pm, lorenx  wrote:
>
>
>
> > > 1. Cake's reading the id from the url. You're saying, in the url,
> > > 'show me the Post controller / the View method / and record number
> > > #n', and Cake's handling that for you automatically.
>
> > sure but... what if i comment out all the $id reference?
> > this cleaned code:
> > function view() {
> >         $this->set('post', $this->Post->read());}
>
> > continues to work properly; it seems that the $this->Post->id=$id
> > assignment is not necessary...
>
> > > 2. Post/Somefunction only becomes a valid URL if you make a
> > > corresponding view file for it. You can, if you want, use private
> > > methods by marking a method with a preceding underscore, so:
>
> > > _method() { //code }
>
> > > That'll make the method only accessible to other methods within the
> > > controller. You can also use routes to redirect users around if they
> > > try to access a method through the url that they shouldn't be using.
>
> > perfect.
>
> > thanks...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: some newbie questions

2009-09-19 Thread Hols Kay

Yes - because it's coming from the URL it's not *strictly* necessary
to redefine it in your controller, but defining it in the controller
is generally better coding style because the explicit relationship is
easier to see at-a-glance. It also means that you're better able to do
checks on the id number, for example:

function index($id = null){
if (!$id) {
$this->set('model', $this->Model->read(null, '1'));
} else {
if(!is_numeric($id)) {
$this->set('model', $this->Model->read(null, 
'1'));
} else {
$this->set('model', $this->Model->read(null, 
$id));
}
}
}

It's really just a style of coding that increases clarity (or not, as
the case may be ;) ).

On Sep 19, 4:49 pm, lorenx  wrote:
> > 1. Cake's reading the id from the url. You're saying, in the url,
> > 'show me the Post controller / the View method / and record number
> > #n', and Cake's handling that for you automatically.
>
> sure but... what if i comment out all the $id reference?
> this cleaned code:
> function view() {
>         $this->set('post', $this->Post->read());}
>
> continues to work properly; it seems that the $this->Post->id=$id
> assignment is not necessary...
>
> > 2. Post/Somefunction only becomes a valid URL if you make a
> > corresponding view file for it. You can, if you want, use private
> > methods by marking a method with a preceding underscore, so:
>
> > _method() { //code }
>
> > That'll make the method only accessible to other methods within the
> > controller. You can also use routes to redirect users around if they
> > try to access a method through the url that they shouldn't be using.
>
> perfect.
>
> thanks...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: some newbie questions

2009-09-19 Thread lorenx

> 1. Cake's reading the id from the url. You're saying, in the url,
> 'show me the Post controller / the View method / and record number
> #n', and Cake's handling that for you automatically.

sure but... what if i comment out all the $id reference?
this cleaned code:
function view() {
$this->set('post', $this->Post->read());
}
continues to work properly; it seems that the $this->Post->id=$id
assignment is not necessary...


> 2. Post/Somefunction only becomes a valid URL if you make a
> corresponding view file for it. You can, if you want, use private
> methods by marking a method with a preceding underscore, so:
>
> _method() { //code }
>
> That'll make the method only accessible to other methods within the
> controller. You can also use routes to redirect users around if they
> try to access a method through the url that they shouldn't be using.

perfect.


thanks...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: some newbie questions

2009-09-19 Thread Hols Kay

1. Cake's reading the id from the url. You're saying, in the url,
'show me the Post controller / the View method / and record number
#n', and Cake's handling that for you automatically.

2. Post/Somefunction only becomes a valid URL if you make a
corresponding view file for it. You can, if you want, use private
methods by marking a method with a preceding underscore, so:

_method() { //code }

That'll make the method only accessible to other methods within the
controller. You can also use routes to redirect users around if they
try to access a method through the url that they shouldn't be using.

3. Be careful with that - the $form->something syntax is used only by
the form helper. Cake will automatically build your form inputs so
long as you name them properly, so if you've got $form->input
('Model.fieldname'); then Cake will work its magic on that field and
model. In your edit example, $this->data is the array that's retrieved
from the form - in the edit.ctp file itself, the form should work like
$form->input('Model.fieldname');

If you want to just display your data without the form helper, then
you can use the set method in the controller:

$this->set(array('mytitle'=>$this->data['Post']['title']));

This makes a variable called $mytitle available to the view template
with the contents of $this->data['Post']['title'] in it.


On Sep 19, 3:27 pm, lorenx  wrote:
> thanks to all!
> ...but i still have some doubts.
>
> 1.
> if i write:
> function view() {
>         $this->set('post', $this->Post->read());}
>
> then the urls post/view/1 and post/view/2 continue to show
> respectively post n.1 and post n.2, i cannot understand how (maybe i
> have to look depper in the code)
>
> 2.
> ok but... if i have two identical pieces of code and i extract them in
> someFunction() then post/someFunction becomes a valid url?
> if so, how to avoid this behaviour?
>
> 3.
> ok. so $this->data in the controller becomes $form->data in the
> respective ctp file.
>
> thanks again to all!
>
> On Sep 18, 9:13 pm, Hols Kay  wrote:
>
> > 1. $this->Post->id = $id sets the model id field to whatever the id is
> > that you've passed in the URL. That's retained for the $this->Post->read(); 
> > underneath it. You can also say things like $this->set
>
> > ('post', $this->Post->read(null, $id)); to read all the fields for
> > record $id, for example, instead of assigning the id and then reading
> > it.
>
> > 2. Every function in the controller IS a method, and every method IS
> > an action ;) They're all synonyms for the same thing. You don't need a
> > view for every controller method, only the ones that you'll logically
> > want a view for, which is what I think you're meaning to ask.
>
> > 3. $this->data is handled automagically by Cake. It consists of an
> > array of the data that you're moving from one place to another, so you
> > can act on specific fields by calling $this->data['Model']['field'].
>
> > Hope this helps!
>
> > On Sep 17, 7:05 pm, lorenx  wrote:
>
> > > hi all,
> > > i'm new to cakephp and, mentioning the blog tutorial, i have some
> > > simple questions.
>
> > > 1.
> > > in the sample controller, there is the view action:
>
> > > function view($id = null) {
> > >         $this->Post->id = $id;
> > >         $this->set('post', $this->Post->read());
>
> > > }
>
> > > to better understand, i did some tests.
> > > i tried to comment out the passed parameter $id and the 
> > > $this->Post->id=$id assignment... and the code seems to work as before.
>
> > > i also printed_r the Post object, before and after that line, but no
> > > change appeared.
> > > so... what exactly do the assignment? and passing the $_GET parameter
> > > is necessary?
>
> > > 2.
> > > does every function in the controller involve the creation of a
> > > method, of an action?
>
> > > 3.
> > > in the edit action, there is the $this->data variable.
> > > i presume that this variable is going to populate the edit form. how
> > > is this handled?
>
> > > thanks to all!
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Unable to view Cake Start Page

2009-09-19 Thread Simon

Here some open source software for your development

Msys => here is the URL to download make sure to install it c:/msys
this good for cake bake when
http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/Current%20Release_%20MSYS-1.0.11/MSYS-1.0.11.exe/download

hiedisql => this is better then php my admin. Easy to create databse
and tables
 http://www.heidisql.com/?

Thanks
Simon


On Sep 19, 4:11 am, Selva manickaraja  wrote:
> Great, it works. I'm attaching the screenshot. It's all green!!! Thanks a
> lot Simon. Will update you on further development.
>
> Thank you.
>
> Warmest Regards,
>
> Selvam
> On Sat, Sep 19, 2009 at 5:57 PM, John Andersen wrote:
>
>
>
>
>
> > In your database.php file, swap the default and the test
> > configuration! The default is used, as it says, it is the default one,
> > and it is currently defined with MySQL :)
>
> > Enjoy,
> >   John
>
> > On Sep 19, 12:20 pm, Selva manickaraja  wrote:
> > > Hi
>
> > > I tried setting up the database file in app/config/database.php. FYI I am
> > > using PostgreSQL 8.4. I went through all the references in the internet
> > and
> > > come to understand that the pgsql library php_pgsql.dll should be
> > available
> > > and enabled in php.ini in addition to the libpq.dll file. Did that all
> > and
> > > loaded the phpinfo() page. It show that pgql is set up. However in the
> > Cake
> > > Start Page there is still the message that Cake is NOT able to connect to
> > > the database. I am attaching the files database.php, php.ini and the
> > > screeshot for postgresql admin console, phpinfo() and cake start page.
> > > Please guide me as to where should I make the changes in order to get it
> > > working.
>
> > > Thank you.
>
> > > Warmest Regards,
>
> > > Selvam
> > [snip]
>
>
>
>  cake_start6.GIF
> 83KViewDownload
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Highlight Author Comment

2009-09-19 Thread Simon

Thanks for the reply  I'm confuesd  here my post table dosent got
user_Id user don't have to login and post  the only thing the login to
comment now here is I give full details

User hasMany comments
comment belongs to user

Post hasMany comments
comments belongs to post

Now here's my comment table structure

Id
user_id
post_id
comment
active
created

here's user table structure
id
username
firstname
lastname
group = default is user
email
created

here is my post

id
comment_id
content
comment_count
created
modified


And I made function in my post controller
called function comment()

So when some one comment it's like

post/comment/1234

I hope this help you slove my problem thank you all




On Sep 19, 4:54 am, "j0n4s.h4rtm...@googlemail.com"
 wrote:
> Use cake bake. On the output of cake bakes comments/index.ctp find the
> table loop and within that table loop you have to do that comparison
> like $post['Post']['user_id'] == $comment['Comment']['author_id']
>
> On Sep 18, 3:29 pm, Simon  wrote:
>
>
>
> > is there sombody help here please   thank you im really waiting for
> > someone to help here
>
> >  > if($this->$comment['User'[['Group']['admin']){
> > echo'';
> > echo $comment['Comment']['comment'];
> > echo'';
>
> > }else{
>
> > echo'
> > echo $comment['Comment']['comment'];
> > echo'';
>
> > }
>
> > ?>
>
> > On Sep 17, 1:24 pm, Simon  wrote:
>
> > > thank you for this can i do it  this way correct me if i'm worng
>
> > >  > > if($this->$comment['User'[['Group']['admin']){
> > > echo'';
> > > echo $comment['Comment']['comment'];
> > > echo'';}else{
>
> > > echo'
> > > echo $comment['Comment']['comment'];
> > > echo'';}
>
> > > ?>
>
> > > On Sep 17, 1:00 pm, Pablo Viojo  wrote:
>
> > > > Something like this:
>
> > > >  > > > if ($post['Post']['user_id']==$comment['Comment']['user_id']){
> > > >     $commentClass='author';} else {
>
> > > >     $commentClass='non-author';}
>
> > > > ?>
> > > > 
>
> > > > Change your variable names  appropiately.
>
> > > > Regards,
>
> > > > Pablo Viojo
> > > > pvi...@gmail.comhttp://pviojo.net
>
> > > > ¿Que necesitas?http://needish.com
>
> > > > On Thu, Sep 17, 2009 at 3:55 PM, Simon  wrote:
>
> > > > > un exemple will be appreciated
>
> > > > > On Sep 17, 11:14 am, Nectom  wrote:
> > > > > > Could do a match based on the Post user_id and the comment user_id 
> > > > > > and if
> > > > > > they match set a author class
>
> > > > > > On Thu, Sep 17, 2009 at 6:36 PM, Simon  
> > > > > > wrote:
>
> > > > > > > Hi all is there any way i could Highlight Author's aka admin's
> > > > > > > comments and a reply function on my comment section
>
> > > > > > > here is my comment table
>
> > > > > > > id
> > > > > > > post_id
> > > > > > > user_id
> > > > > > > comment
> > > > > > > modified
> > > > > > > active
>
> > > > > > > i have users groups = admin / users
>
> > > > > > > thank you- Hide quoted text -
>
> > > > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: some newbie questions

2009-09-19 Thread lorenx

thanks to all!
...but i still have some doubts.

1.
if i write:
function view() {
$this->set('post', $this->Post->read());
}
then the urls post/view/1 and post/view/2 continue to show
respectively post n.1 and post n.2, i cannot understand how (maybe i
have to look depper in the code)

2.
ok but... if i have two identical pieces of code and i extract them in
someFunction() then post/someFunction becomes a valid url?
if so, how to avoid this behaviour?

3.
ok. so $this->data in the controller becomes $form->data in the
respective ctp file.

thanks again to all!



On Sep 18, 9:13 pm, Hols Kay  wrote:
> 1. $this->Post->id = $id sets the model id field to whatever the id is
> that you've passed in the URL. That's retained for the $this->Post->read(); 
> underneath it. You can also say things like $this->set
>
> ('post', $this->Post->read(null, $id)); to read all the fields for
> record $id, for example, instead of assigning the id and then reading
> it.
>
> 2. Every function in the controller IS a method, and every method IS
> an action ;) They're all synonyms for the same thing. You don't need a
> view for every controller method, only the ones that you'll logically
> want a view for, which is what I think you're meaning to ask.
>
> 3. $this->data is handled automagically by Cake. It consists of an
> array of the data that you're moving from one place to another, so you
> can act on specific fields by calling $this->data['Model']['field'].
>
> Hope this helps!
>
> On Sep 17, 7:05 pm, lorenx  wrote:
>
>
>
> > hi all,
> > i'm new to cakephp and, mentioning the blog tutorial, i have some
> > simple questions.
>
> > 1.
> > in the sample controller, there is the view action:
>
> > function view($id = null) {
> >         $this->Post->id = $id;
> >         $this->set('post', $this->Post->read());
>
> > }
>
> > to better understand, i did some tests.
> > i tried to comment out the passed parameter $id and the $this->Post->id=$id 
> > assignment... and the code seems to work as before.
>
> > i also printed_r the Post object, before and after that line, but no
> > change appeared.
> > so... what exactly do the assignment? and passing the $_GET parameter
> > is necessary?
>
> > 2.
> > does every function in the controller involve the creation of a
> > method, of an action?
>
> > 3.
> > in the edit action, there is the $this->data variable.
> > i presume that this variable is going to populate the edit form. how
> > is this handled?
>
> > thanks to all!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PayPal Help

2009-09-19 Thread brian

I agree with Bert. Just display the PP button after the form is
validated and saved. Once the payment is processed, update your DB to
reflect that.

On Sat, Sep 19, 2009 at 1:52 AM, Bert Van den Brande  wrote:
> Requiring our users to provide all the information for a valid login isn't
> really a 'Pay Now' option imho.
>
> Since it's required anyway to have a site login, I would show the Pay button
> only when you have validated the account creation form and the new account
> is created in your database.
>
> As a visual trick maybe you can display a 'Pay Now' button that not links to
> PayPal but only submits your own account creation form.
>
>
> On Sat, Sep 19, 2009 at 12:12 AM, Dave Maharaj :: WidePixels.com
>  wrote:
>>
>> I managed to figure out the harder PayPal Pro website gateway integration
>> but cant seem to figure out the simple Pay Now buttons.
>>
>> Basic scenario is if the User is not logged in they have to create an
>> account and pay in 1 shot. Pay Pal has a requirement that you offer
>> customers the option to use Pay Now / Express Checkout  without logging into
>> your site I need to figure this out.
>>
>> So the form appears with "Create your account" username,password, confirm
>> password so submit the form if it validates the user is created, take the
>> newly created User.id and pass that to PayPal in [custom] key value => $id
>> but how do I then send the info to PayPal?
>>
>> If I click on the PayPal buy now button it sends the user to PayPal to log
>> into their PayPal account but at this point its too late because I sent no
>> info. One or the other but I cant seem to figure out how to do both at once.
>>
>> Should I create a regular registration form but point it to PayPal $url,
>> run validation before sending on the User.fields. If validates creates the
>> user , grab the id and then pass that to the info that gets sent to PayPal?
>> But once the form is validated wont it just send off ?
>>
>> Clueless.
>>
>> Can someone who has done something like this point me in the right
>> direction, tips, suggestions.
>>
>> Greatly appreciated.
>>
>> Dave
>>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACO save and create, does it matter where I put the data as params?

2009-09-19 Thread brian

I believe it amounts to the same thing. You could try each and check the DB.

On Fri, Sep 18, 2009 at 10:03 PM, Rawna  wrote:
>
> when doing a $aco->create(); $aco->save(); does it matter where I put
> the array containing the data to be saved?
>
> e.g. do i do a
> $aco->create(array( ..));
> $aco->save();
> or
> $aco->create();
> $aco->save(array(..)) ?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Highlight Author Comment

2009-09-19 Thread j0n4s.h4rtm...@googlemail.com

Use cake bake. On the output of cake bakes comments/index.ctp find the
table loop and within that table loop you have to do that comparison
like $post['Post']['user_id'] == $comment['Comment']['author_id']

On Sep 18, 3:29 pm, Simon  wrote:
> is there sombody help here please   thank you im really waiting for
> someone to help here
>
>  if($this->$comment['User'[['Group']['admin']){
> echo'';
> echo $comment['Comment']['comment'];
> echo'';
>
> }else{
>
> echo'
> echo $comment['Comment']['comment'];
> echo'';
>
> }
>
> ?>
>
> On Sep 17, 1:24 pm, Simon  wrote:
>
> > thank you for this can i do it  this way correct me if i'm worng
>
> >  > if($this->$comment['User'[['Group']['admin']){
> > echo'';
> > echo $comment['Comment']['comment'];
> > echo'';}else{
>
> > echo'
> > echo $comment['Comment']['comment'];
> > echo'';}
>
> > ?>
>
> > On Sep 17, 1:00 pm, Pablo Viojo  wrote:
>
> > > Something like this:
>
> > >  > > if ($post['Post']['user_id']==$comment['Comment']['user_id']){
> > >     $commentClass='author';} else {
>
> > >     $commentClass='non-author';}
>
> > > ?>
> > > 
>
> > > Change your variable names  appropiately.
>
> > > Regards,
>
> > > Pablo Viojo
> > > pvi...@gmail.comhttp://pviojo.net
>
> > > ¿Que necesitas?http://needish.com
>
> > > On Thu, Sep 17, 2009 at 3:55 PM, Simon  wrote:
>
> > > > un exemple will be appreciated
>
> > > > On Sep 17, 11:14 am, Nectom  wrote:
> > > > > Could do a match based on the Post user_id and the comment user_id 
> > > > > and if
> > > > > they match set a author class
>
> > > > > On Thu, Sep 17, 2009 at 6:36 PM, Simon  wrote:
>
> > > > > > Hi all is there any way i could Highlight Author's aka admin's
> > > > > > comments and a reply function on my comment section
>
> > > > > > here is my comment table
>
> > > > > > id
> > > > > > post_id
> > > > > > user_id
> > > > > > comment
> > > > > > modified
> > > > > > active
>
> > > > > > i have users groups = admin / users
>
> > > > > > thank you- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $model->find("list") and concatenated fields

2009-09-19 Thread j0n4s.h4rtm...@googlemail.com

In general, you can use displayField for some magic.

1. In your afterFind you can create a virtual field of those 3 values
2. You can set your displayField to that

3. If you want a more low level solution, try SQL VIEWS and CONCAT
(for mysql)

Disclaimer: I did not try the latter, but it should work.

On Sep 19, 7:55 am, Marcelo Andrade  wrote:
> On Wed, Sep 16, 2009 at 10:51 AM, Ernesto  wrote:
>
> > i have a model that's using a simple 3-columns table
>
> > item_id
> > code
> > description
>
> > i want to obtain a select box that shows the fields "code" and
> > "description" concatenated.
>
> > right now i'm using a foreach loop
>
> > foreach ($items as $key => $item) $selectArray[$key] = $item["code"] .
> > " - " . $item["description"];
>
> > is there any way to do this directly in the "find" call?
>
> In the find call no, there isn't.  But take a look at
> Set::format.
>
> http://book.cakephp.org/view/672/format
>
> Best regards.
>
> --
> MARCELO DE F. ANDRADE
> Belem, PA, Amazonia, Brazil
> Linux User #221105
>
> http://mfandrade.wordpress.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Unable to view Cake Start Page

2009-09-19 Thread John Andersen

In your database.php file, swap the default and the test
configuration! The default is used, as it says, it is the default one,
and it is currently defined with MySQL :)

Enjoy,
   John

On Sep 19, 12:20 pm, Selva manickaraja  wrote:
> Hi
>
> I tried setting up the database file in app/config/database.php. FYI I am
> using PostgreSQL 8.4. I went through all the references in the internet and
> come to understand that the pgsql library php_pgsql.dll should be available
> and enabled in php.ini in addition to the libpq.dll file. Did that all and
> loaded the phpinfo() page. It show that pgql is set up. However in the Cake
> Start Page there is still the message that Cake is NOT able to connect to
> the database. I am attaching the files database.php, php.ini and the
> screeshot for postgresql admin console, phpinfo() and cake start page.
> Please guide me as to where should I make the changes in order to get it
> working.
>
> Thank you.
>
> Warmest Regards,
>
> Selvam
[snip]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: problem with facebook-like ajax windows submitting forms

2009-09-19 Thread 浪漫様

Thanks for your comment Mukhamad, but... i never said anything of
uploading files... i was talking about sending simple forms :P also
facebook never upload files in ajax popups... they use java applets or
simple forms.

Rohman

On Sep 19, 12:19 pm, Mukhamad Ikhsan  wrote:
> recently my friends explore about how to upload file via AJAX, but he founds
> that AJAX can't upload a file (look the on the W3C description about
> XMLHTTPRequest). about upload file without creating iframe, we need other
> mechanism like using java applet or flash, and for facebook my friend tell
> me that facebook using java for uploading the file, but i'm not checked
> before about that.
>
>
>
> On Sat, Sep 19, 2009 at 10:16 AM, 浪漫様  wrote:
>
> > "cheating by using an iframe doesn't mean you're submitting your
> > dialog-forms by ajax"
> > -> well, i didn't say i was using an iFrame to do ajax :P i know it
> > doesn't work like that... i only said that as i couldn't do the
> > ajaxForm on the popup window, the solution i found was using an iFrame
> > to send the form as a normal form... but as you may think, i didn't
> > like that solution... that's why i asked how to do it with ajax
> > instead of iFrame :P hehe
>
> > thanks anyway,
>
> > Rohman
>
> > On Sep 19, 2:05 am, AD7six  wrote:
> > > On 18 sep, 15:13, 浪漫様  wrote:
>
> > > > no problem. thank you anyway
>
> > > > Rohman
>
> > > Walter and Bert have already given you your answer (yes, I've read
> > > your question and no, cheating by using an iframe doesn't mean you're
> > > submitting your dialog-forms by ajax)
>
> > > Seehttp://
> > docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
> > > to understand why your ajaxforms work when they are in the first http
> > > request, but don't if they are part of an ajax response.
>
> > > hth,
>
> > > AD
> > > PS. why, especially if you're using jquery, are you using a helper to
> > > write such ugly js :)?
> > > Something you might want to use as a comparison:
> >http://trac.assembla.com/mi/browser/branches/mi_js/jquery.mi_dialogs
> > > Which, is the same js code (more or less) on book.cakephp.org - which
> > > will probably serve as a useful example to follow
>
> --
> Mukhamad Ikhsan
> +6281572181283
> Y!id:ikhsan.onlyhttp://www.diodachi.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Subdomains for userpages

2009-09-19 Thread Bert Van den Brande
I believe this is what you're looking for :
http://bakery.cakephp.org/articles/view/subdomaining-with-cake

On Fri, Sep 18, 2009 at 11:40 AM, Matt  wrote:

>
> I'm searching for a way to make subdomains in cakephp ussable for
> profilepages of users.
>
> Ofcourse I need a wildcard in my DNS and Apache config, which is
> already done.
>
> Because I want to keep this way of subdomains flexible, I don't want
> to use a .htaccess file so I need to do something with a route that
> recognizes the subdomain and does something magic.
>
> Something like this could work I think:
>
> $usernamehost = explode(’.', $_SERVER['HTTP_HOST'], 2);
>
> where I should need to change the router.php for sure ?
>
> I have found an example for CodeIgniter, but I like the CakePHP way of
> programming more, so... this way is that I wanna go, but I need some
> help here.
>
> The CI example is shown here:
>
> http://andy.sinaptix.com/2007/08/22/username-as-subdomain-in-codeigniter/
>
> Any help is welcome !
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



auth with backend and fron end

2009-09-19 Thread nhtechip

my controller i write function for admin and function for frond end:

ex:

public function admin_index(){
}
public function fo_index(){
}
and




i want only check auth with admin in controller and not check with
function fo

how can i do?

thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Unable to view Cake Start Page

2009-09-19 Thread Selva manickaraja
Thank you so much for the advice. I will keep you posted.

Selvam

On Sat, Sep 19, 2009 at 1:07 PM, Simon  wrote:

>
> Don't worry About now that you see cake page with style The problem is
> solved
>
> On Sep 18, 9:17 pm, Selva manickaraja  wrote:
> > Hi,
> >
> > I downloaded XAMPP and installed it fresh. Of course I uninstalled the
> > previous version on Apache and PHP in my machine. As advised by you I
> copied
> > the cake holder under the htdocs in XAMPP and
> typedhttps://localhost/ims/.
> > The legendary much anticipated Cake Start page had loaded successfully. I
> > have attched the screen for reference. However I tested this URL without
> > copying over the code you gave into httpd.conf. But I am not sure if this
> is
> > ok for me to proceed? Please advice.
> >
> > Thank you.
> >
> > Warmest Regards,
> >
> > Selvam
> >
> >
> >
>  > On Sat, Sep 19, 2009 at 3:00 AM, Simon  wrote:
> >
> > > hi selva if your using Xampp start over create a folder in your htdocs
> > > whatever you wanna name it
> > > then  copy this whole code below  and paste it in your httpd.conf in
> > > apache and your good
> >
> > > #
> > > # This is the main Apache HTTP server configuration file.  It contains
> > > the
> > > # configuration directives that give the server its instructions.
> > > # See http://httpd.apache.org/docs/2.2/> for detailed
> > > information.
> > > # In particular, see
> > > # http://httpd.apache.org/docs/2.2/mod/directives.html>
> > > # for a discussion of each configuration directive.
> > > #
> > > # Do NOT simply read the instructions in here without understanding
> > > # what they do.  They're here only as hints or reminders.  If you are
> > > unsure
> > > # consult the online docs. You have been warned.
> > > #
> > > # Configuration and logfile names: If the filenames you specify for
> > > many
> > > # of the server's control files begin with "/" (or "drive:/" for
> > > Win32), the
> > > # server will use that explicit path.  If the filenames do *not* begin
> > > # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
> > > # with ServerRoot set to "C:/xampp/apache" will be interpreted by the
> > > # server as "C:/xampp/apache/logs/foo.log".
> > > #
> > > # NOTE: Where filenames are specified, you must use forward slashes
> > > # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
> > > # If a drive letter is omitted, the drive on which Apache.exe is
> > > located
> > > # will be used by default.  It is recommended that you always supply
> > > # an explicit drive letter in absolute paths, however, to avoid
> > > # confusion.
> > > #
> >
> > > # ThreadsPerChild: constant number of worker threads in the server
> > > process
> > > # MaxRequestsPerChild: maximum  number of requests a server process
> > > serves
> > > ThreadsPerChild 250
> > > MaxRequestsPerChild  0
> >
> > > #
> > > # ServerRoot: The top of the directory tree under which the server's
> > > # configuration, error, and log files are kept.
> > > #
> > > # Do not add a slash at the end of the directory path.  If you point
> > > # ServerRoot at a non-local disk, be sure to point the LockFile
> > > directive
> > > # at a local disk.  If you wish to share the same ServerRoot for
> > > multiple
> > > # httpd daemons, you will need to change at least LockFile and
> > > PidFile.
> > > #
> > > ServerRoot "C:/xampp/apache"
> >
> > > #
> > > # Listen: Allows you to bind Apache to specific IP addresses and/or
> > > # ports, instead of the default. See also the 
> > > # directive.
> > > #
> > > # Change this to Listen on specific IP addresses as shown below to
> > > # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
> > > #
> > > #Listen12.34.56.78:80 
>  > >  Listen 80
> >
> > > #
> > > # Dynamic Shared Object (DSO) Support
> > > #
> > > # To be able to use the functionality of a module which was built as a
> > > DSO you
> > > # have to place corresponding `LoadModule' lines at this location so
> > > the
> > > # directives contained in it are actually available _before_ they are
> > > used.
> > > # Statically compiled modules (those listed by `httpd -l') do not need
> > > # to be loaded here.
> > > #
> > > # Example:
> > > # LoadModule foo_module modules/mod_foo.so
> > > #
> > > LoadModule actions_module modules/mod_actions.so
> > > LoadModule alias_module modules/mod_alias.so
> > > LoadModule asis_module modules/mod_asis.so
> > > LoadModule auth_basic_module modules/mod_auth_basic.so
> > > LoadModule auth_digest_module modules/mod_auth_digest.so
> > > LoadModule authn_alias_module modules/mod_authn_alias.so
> > > LoadModule authn_anon_module modules/mod_authn_anon.so
> > > LoadModule authn_dbd_module modules/mod_authn_dbd.so
> > > LoadModule authn_dbm_module modules/mod_authn_dbm.so
> > > LoadModule authn_default_module modules/mod_authn_default.so
> > > LoadModule authn_file_module modules/mod_authn_file.so
> > > #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
> > > Load