Re: CakePHP php5?

2007-05-29 Thread Nathan Garza
I for one have on at least 2 occasions had my hide saved by cakephp's php4
support.  On both occasions, I discovered that the target server was php4.
Before my cakephp days this kind of a thing could have taken days or weeks
to fix!  With cake, a quick search and replace and we were set.
-- 

Nathan Garza

AshLeaf Media | Director of Technology Innovations
_
www.ashleafmedia.com | [EMAIL PROTECTED] | 832.514.5726

On 5/29/07, Chris Hartjes [EMAIL PROTECTED] wrote:


 On 5/29/07, R. Rajesh Jeba Anbiah [EMAIL PROTECTED] wrote:
  That guy needs PHP4, this host needs PHP4, but no one is saying
  that I need a PHP4 support. This is the same scenario happened when
  PHP4 is released.  It's always better to move upwards whether it's PHP
  or CakePHP (how many people are going to stick to 1.1 for instance?)
 

 Again, you're missing the point.  CakePHP runs just fine on PHP 5.
 There is nothing stopping you from using PHP 5's new stuff with
 CakePHP.  Sadly, many people are reluctant to upgrade to PHP 4 for
 reasons to do with hosting (scared to switch) or comfort level (scared
 that they won't understand PHP 5).  My boss feels that CakePHP suffers
 because it has to support PHP 4 and that somehow it can't compete
 against Zend Framework because it's PHP 5 only.  This is, of course, a
 load of shit.

 So, I put the following to you:  provide an example of where CakePHP
 is being held back by having to support PHP 4 or shut the hell up
 about it.  Documented proof would be nice, not just personal opinion.

 Even if all you do is move your existing app to PHP 5, you will see a
 benefit in performance.  It has been my own personal experience that
 the only apps that might have to be tweaked to run under PHP are those
 doing weird stuff with PHP 4's object model.  I run WordPress for my
 blogs, which is supposedly a PHP 4 only application, with PHP 5.
 Haven't run into any problems yet.

 --
 Chris Hartjes

 My motto for 2007:  Just build it, damnit!

 @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 cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Help me set up cakephp on godaddy

2007-05-24 Thread Nathan Garza
I actually just wrote a blog post about getting cake working a godaddy
hosting.  Check it out!
http://nathan.ashleafmedia.com/2007/baking-cakephp-on-godaddy-hosting/

On 5/24/07, Samuel DeVore [EMAIL PROTECTED] wrote:

 I have client that I set up with a cake site about a year ago on godaddy
 but he changed the access so I can't see how I set it.  He is going to send
 me the new passwords today, I should be able to try to help you soon

 Sam D

 On 5/24/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
 
  css are all linked using $html-css
 
  Found out that if I edit webroot's .htaccess from
 
  RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
  to
  RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
 
  Images and flash will show up, but still controllers are a no-go
 
  On May 24, 11:11 am, John David Anderson (_psychic_)
  [EMAIL PROTECTED] wrote:
   On May 24, 2007, at 10:04 AM, [EMAIL PROTECTED] wrote:
  
  
  
John, I already downloaded and installed a brand new copy of cake
  and
uploaded it.
After that I tried working with internal urls but they worked only
  if
I typed /site/index.php?controller
  
   That's how internal URLs work.
  
   example.com/index.php?/controller/action
  
   or
  
   example.com/index.php?url=/controller/action
  
Btw, im using godaddy's linux hosting with is SUPPOSED to have
mod_rewrite enabled.
  
   Verify that. That seems to be the main issue here, and you'll save a
   lot of time double checking that rather than assuming it. If it has
   it, why are you not using it?
  
here is the link to the site:http://sportmarketingcenter.com
  
so far I've gotten the homepage to render the images and flash file
but thats it (try clicking on one of the menu options) it will just
  go
back to the start page with no layout defined.
  
   It was my understanding that this was a fresh cake install, but it
   seems you're running a complete site - which is it? How are you
   linking to your CSS in the layouts?
  
   -- John
 
 
 


 --
 (the old fart) the advice is free, the lack of crankiness will cost you

 - its a fine line between a real question and an idiot

 http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/
 



-- 

Nathan Garza

AshLeaf Media | Director of Technology Innovations
_
www.ashleafmedia.com | [EMAIL PROTECTED] | 832.514.5726

--~--~-~--~~~---~--~~
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 more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Help me set up cakephp on godaddy

2007-05-24 Thread Nathan Garza
Ooops, looks like you already figured it out.  Teach me to post before
reading to the end of a thread.  Well, congrats on getting it all worked
out!

On 5/24/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 Okay everone good news, got it set up and running.

 Here's what I did (This applies to godaddy's linux hosting which has
 rewrite enabled):

 1. Added a trailing slash '/' to every rewrite rule located in

 /.htaccess
 /app/.htaccess
 /app/webroot/.htaccess

 2.  Modified /webroot/index.php

 ...
 if (!defined('ROOT')) {
  //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP
 DIRECTORY IS
 LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
  //You should also use the DS define to seperate your
 directories
 // define('ROOT', dirname(dirname(dirname(__FILE__;
 define('ROOT', '/home/content/y/o/u/you/html/');

 }
 if (!defined('APP_DIR')) {
  //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION';
 //define('APP_DIR', basename(dirname(dirname(__FILE__;
 define ('APP_DIR', 'app');
 }
 ...

 Left line 41 on config/core.php commented (thus disabling internal
 rewrite)

 Thats it! everything worked fine right there. Even admin and routing
 were working right away.

 Thank you so much for all your help!


 On May 24, 11:49 am, Samuel DeVore [EMAIL PROTECTED] wrote:
  I have client that I set up with a cake site about a year ago on godaddy
 but
  he changed the access so I can't see how I set it.  He is going to send
 me
  the new passwords today, I should be able to try to help you soon
 
  Sam D
 
  On 5/24/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
 
 
 
 
   css are all linked using $html-css
 
   Found out that if I edit webroot's .htaccess from
 
   RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
   to
   RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
 
   Images and flash will show up, but still controllers are a no-go
 
   On May 24, 11:11 am, John David Anderson (_psychic_)
   [EMAIL PROTECTED] wrote:
On May 24, 2007, at 10:04 AM, [EMAIL PROTECTED] wrote:
 
 John, I already downloaded and installed a brand new copy of cake
 and
 uploaded it.
 After that I tried working with internal urls but they worked only
 if
 I typed /site/index.php?controller
 
That's how internal URLs work.
 
example.com/index.php?/controller/action
 
or
 
example.com/index.php?url=/controller/action
 
 Btw, im using godaddy's linux hosting with is SUPPOSED to have
 mod_rewrite enabled.
 
Verify that. That seems to be the main issue here, and you'll save a
lot of time double checking that rather than assuming it. If it has
it, why are you not using it?
 
 here is the link to the site:http://sportmarketingcenter.com
 
 so far I've gotten the homepage to render the images and flash
 file
 but thats it (try clicking on one of the menu options) it will
 just go
 back to the start page with no layout defined.
 
It was my understanding that this was a fresh cake install, but it
seems you're running a complete site - which is it? How are you
linking to your CSS in the layouts?
 
-- John
 
  --
  (the old fart) the advice is free, the lack of crankiness will cost you
 
  - its a fine line between a real question and an idiot
 
  http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/


 


--~--~-~--~~~---~--~~
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 more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cakephp written in php 4 or php 5

2007-05-21 Thread Nathan Garza
On 5/21/07, Pablo Godel [EMAIL PROTECTED] wrote:


 you should learn the PHP5 OO side regardless of what cake uses.

 Pablo


I agree with Pablo.  However, my understanding is that cake is written in
such a way that either way will work.  Just be consistent.

Nathan

--~--~-~--~~~---~--~~
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 more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: hasMany query question

2006-11-19 Thread Nathan Garza
Thanks for the reply.  Let me expand abit.  Model 'A' hasMany 'B' and
hasMany 'C'.  I want to find the instance of model 'A' that has a spicific
'B' AND a specific 'C'.  Now here's the part I left out.  Model 'D' hasMany
'B' and 'E' hasMany 'C'.  So, a given 'B' or 'C' belongs to only one 'A',
but also to only  one 'D' or 'E' (as apposed to many  'A', 'D'  'E's).
Basically, 'A' hasAndBelongsTo 'D' and 'E', but the join tables are too
complex for cake's standard habt relationship to work (there's more in there
than I've described).  So I created a model for the join tables and made the
change in the relationships.

So, one 'Ad' can have many 'Classifications', and many 'Locations', but I'm
looking for the specific 'Ad' that has a 'Classification' AND a 'Location'
containing the correct 'Category' and 'City' respectively.

However, the question remains, is it posible to use a feild from a table
associated with a hasMany relationship in the findAll($conditions) array?

What I've recently decided to try on monday is to do:
$var1 = $this-Ad-Location-findAll($conditions);
$var2 = $this-Ad-Classification-findAll($conditions);
$ads = array_intersect($var1, $var2);

Although that seems like a weird way to do it.  Then again, maybe my whole
concept is the weird way to do it in the first place.
--
ng

On 11/19/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 Hmmm... Me thinks you have a logic problem.

 If Classification belongsTo Ad  and Location belongsTo Ad then
 searching by both Location.id and Classification.id at the same time is
 redundant, since they would both share (at most) exactly one parent.

 So if Classification belongsTo Ad , then Classification has only one
 parent, and you can simply do this:
 $this-Ad-Classifications-recursive = 3;
 $data =
 $this-Ad-Classifications-findById($this-data['Classification']['id']);
 $ad = $data['Ad'];

 Or if Location belongsTo Ad , then Location has only one parent, and
 you can simply do this:
 $this-Ad-Location-recursive = 3;
 $data = $this-Ad-Location-findById($this-data['Location']['id']);
 $ad = $data['Ad'];

 Back to the logic problem... If one ad can have more than one
 classification, and many adds can share the same classification, then
 you are not using the correct relationships.  Based on your question, I
 suspect you should be using hasAndBelongsToMany. If you think this is
 possible, read the model chapter of the cake manual again:
 http://manual.cakephp.org/chapter/models   Otherwise, ignore my
 response.

 sc


 On Nov 19, 12:18 am, naryga [EMAIL PROTECTED] wrote:
  Ok, I have 3 models:
  Ad, Classification, Location
  Ad hasMany Classification,Location
  Location belongsTo Ad
  Classification belongsTo Ad
  I want to be able to search for Ads based on the associated
  Classifications and Locations.  I've tried using something like:
  code
   $this-Ad-findAll(Classification.id =
  {$this-data['Classification']['id']} AND Location.id =
  {$this-data['Location']['id']});
  /code
  But this results in: SQL Error in model Post: 1054: Unknown column
  'Classification.id' in 'where clause'
  Using Debug: 3, I found that the problem seems to be that when
  searching on a model with hasMany associations, an SQL alias is not
  created for the associated modles (ie, Classification as
  classifications).  However, changing my where statment to
  classifications.id = ... Doesn't seem to help.
 
  If I only wanted to use one of the associated models to limit the
  results, I would use
  $this-Ad-Classifications-findAll(Classification.id =
  {$this-data['Classification']['id']}); which works just fine.   Is
  there some other way I should be doing this?  Thanks in advance!


 



-- 

Nathan Garza

AshLeaf Media | Director of Technology Innovations
_
www.ashleafmedia.com | [EMAIL PROTECTED] | 832.514.5726


--~--~-~--~~~---~--~~
 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 more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---


Re: button element in forms

2006-10-07 Thread Nathan Garza

Thanks for the info, makes a lot of sense.  Button elements in theory
are cool because they can be both.  Unfortunately, the reality is
really quite a let down.  In the end I found that buttons are probobly
not going to work, even if I resolved this issue.  I decided to go
with ajaxified links instead.

On 10/7/06, Kjell Bublitz [EMAIL PROTECTED] wrote:
 Hi

 Well, a button usually has no value because it is a button and not a input.
 I suggest to simply add a hidden input-field to the form containing your
 row-ID and submit again.

 If i am wrong about the false attribute then make sure that your application
 is serializing the form data properly.. But i really suggest to use hidden
 fields for this (semantics).

 I dont know which ajax framework you are using but for prototype.js it will
 be most likely the case that the js-function Form.serialize is ignoring
 button-elements and thus the data is not posted to the action.

 Regards,
 Kjell aka m3nt0r.

 2006/10/7, Nathan Garza [EMAIL PROTECTED]:
 
 
  Any one know if you can't use a button element to submit an ajax form?
  I have a series of button elements, each containing an image.  When I
  click on one of the buttons, I want it to submit the form, using the
  value of the button element.  My button tags look like this:
 
  button type=submit name=data[Image][id]
  value=?=$row['id']??=$pic?/button
 
  When I use this set up with a normal form, it works just fine.  When I
  try it with an ajax form, the form is submited, but it doesn't submit
  any data (ie, it ignors the button's value attribute.) Origionally I
  thought that maybe my controller code was to blame, but the fact that
  no post data is being sent is making me think otherwise.  Any one have
  any ideas?
 
  --
 
  Nathan Garza
 
  AshLeaf Media | owner
  _
  www.ashleafmedia.com | [EMAIL PROTECTED] | 832.514.5726
 
 
 
   
 



-- 

Nathan Garza

AshLeaf Media | Director of Technology Innovations
_
www.ashleafmedia.com | [EMAIL PROTECTED] | 832.514.5726

--~--~-~--~~~---~--~~
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 more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



button element in forms

2006-10-06 Thread Nathan Garza

Any one know if you can't use a button element to submit an ajax form?
 I have a series of button elements, each containing an image.  When I
click on one of the buttons, I want it to submit the form, using the
value of the button element.  My button tags look like this:

button type=submit name=data[Image][id]
value=?=$row['id']??=$pic?/button

When I use this set up with a normal form, it works just fine.  When I
try it with an ajax form, the form is submited, but it doesn't submit
any data (ie, it ignors the button's value attribute.) Origionally I
thought that maybe my controller code was to blame, but the fact that
no post data is being sent is making me think otherwise.  Any one have
any ideas?

-- 

Nathan Garza

AshLeaf Media | owner
_
www.ashleafmedia.com | [EMAIL PROTECTED] | 832.514.5726

--~--~-~--~~~---~--~~
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 more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



delete rows on session experation

2006-10-04 Thread Nathan Garza

Is it posible to delete database rows whenever the session expires?

-- 

Nathan Garza

AshLeaf Media | Owner
_
 www.ashleafmedia.com | [EMAIL PROTECTED] | 832.514.5726

--~--~-~--~~~---~--~~
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 more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---