Re: Safari losing session...

2013-03-01 Thread John Hardy
This is most likely caused by error or warning being output in the 'output_buffer' before the page/fragment is finished rendering. Turn on debugging and make sure there are no warnings and/or errors occurring. On Dec 3, 2012, at 5:49 PM, Benjamin Allison b...@roestudios.com wrote: So I've

Re: CakePHP 2.2.5 HABTM Edit view not showing previously selected values as selected.

2013-01-26 Thread John Hardy
print_r your request data and ensure that the schema is matching your intended inputs == print_r($this-request-data); == On Jan 26, 2013, at 6:42 PM, Penny Coders dtk...@gmail.com wrote: Please note, it DOES show the options, but NOT the previously selected values, compared to another

Re: Need help with file uploads

2013-01-23 Thread John Hardy
Check your PHP configuration and ensure that your file upload settings are appropriate for the use-case. Also, print out the _FILES array to also check to see if PHP is accepting your upload. On Jan 23, 2013, at 3:09 PM, Shahruk Khan shahruksem...@gmail.com wrote: Nope. debug($this-data)

Re: Vendor Help

2013-01-22 Thread John Hardy
Your argument position is wrong App::import('Vendor','Dummy',array(file=file.php)); Sent from my iPad On Jan 22, 2013, at 7:36 PM, Advantage+ movepix...@gmail.com wrote: I am trying to simply add a dummy class to get me started. Make sure I am actually doing it correct/ clearly something is

Re: Routing help

2013-01-17 Thread John Hardy
You would be best served by triggering your route using a conditional statement in your routes file then using a custom route class to verify the username passed in and returning the correct controller/action to dispatch. On Jan 17, 2013, at 12:39 PM, gonzela2006 gonzela2...@gmail.com wrote:

Re: Routing help

2013-01-17 Thread John Hardy
if(preg_match('/*FILTER*/',$_SERVER['HTTP_HOST'])) { Router::connect()…... } On Jan 17, 2013, at 1:04 PM, gonzela2006 gonzela2...@gmail.com wrote: Hello ibejohn818, How can I make conditional statement in routes.php file? On Thursday, January 17, 2013 10:43:17 PM UTC+2, ibejohn818

Re: Detecting SSL from behind a proxy

2013-01-14 Thread John Hardy
I use a setup with NGINX forwarding my port 443 traffic to HAPROXY. Have NGINX pass the scheme in the headers like so: nginx.conf proxy_set_header SCHEME $scheme; You will them be able to access this parameter in your $_SERVER array. On Jan 14, 2013, at 9:51 AM, sophistry phlo...@gmail.com

Re: Detecting SSL from behind a proxy

2013-01-14 Thread John Hardy
My assumption is that you wish to terminate SSL requests on your load balancer. In my setup, I use HAPROXY as my LB, and use NGINX to terminate my ssl requests. In your NGINX configuration that is binding port 443. you can have it set headers to proxy over to HAPROXY. IE: location / {

Re: API Help / Component / Vendor / Plugin?

2013-01-14 Thread John Hardy
Just think, how many ways are there to cook steak? Broil, Fry, Smoke, BBQ etc. and they all taste equally as good. For example, I have the Facebook Graph API packaged as a vendor file, and the actual interaction with the object is handled as a Singleton. ( Tight Deadline on that ) Another

Re: Architecture ideas how to summarize values from a large database with multiple conditions

2012-12-05 Thread John Hardy
Aside from your storage engine you should make a Job Queue System ( Reference the 'Command' design pattern ) Queue up a report request, then notify when the report is finished. I process traffic reports with over a billion rows in scope ( I use Google Big Query for my storage engine ) If that's

Re: WebHosting Suggestion needed

2012-11-22 Thread John Hardy
I just saw the name rackspace and just had to chime in. I've been a loyal customer, I and the companies i've worked for have dumped hundreds of thousands ( Maybe millions ) on rackspace service, and now more exclusively the cloud. for the past 3 days there have been major latency and network

Re: how can i route /size to /size.html

2012-10-17 Thread John Hardy
Mod Rewrite /size to 301 to size.html No need to be hosting duplicate content. On Oct 17, 2012, at 8:42 PM, Vanja Dizdarević lex.non.scri...@gmail.com wrote: +1 on that. An example: Move it from app/webroot/size.html to app/View/Pages/size.ctp Add Router::connect('/size',

Re: Logged in users seeing other users profiles

2012-10-15 Thread John Hardy
Sounds like people are getting the same session id's Database sessions? If so, debug:2 and check the sql. Php Sessions? check diskspace, server health etc. I had a problem before where I was passing sessions to and from swf files and was setting a session id of undefined due to a javascript

Re: Logged in users seeing other users profiles

2012-10-15 Thread John Hardy
environmental that code. Could it be something to do with cookie settings in their environment? Jeremy Burns Class Outfit http://www.classoutfit.com On 16 Oct 2012, at 05:25:01, John Hardy john.c.ha...@gmail.com wrote: Sounds like people are getting the same session id's Database

Re: How to show latest comments (sitewide)?

2012-08-16 Thread John Hardy
Get and Set the data in your app_controller On Aug 16, 2012, at 12:12 PM, Nvp leh...@gmail.com wrote: Hi! I need to have a sitewide sidebar which will contain 5 latest comments to articles. Should I use elements with requestAction + cache in default layout or it can be achieved in more

Re: Which is the best platform for develop with cakephp in team?

2012-08-15 Thread John Hardy
Straight from the person who created GIT. http://www.youtube.com/watch?v=4XpnKHJAok8 Should be a no brainer after viewing that. On Aug 15, 2012, at 9:42 AM, Carachi carach...@gmail.com wrote: Anyone use GIT ? I have read that GIT is better than SVN... On Tuesday, August 14, 2012

Re: Fat CakePHP

2012-08-08 Thread John Hardy
Wow, size is a non-issue. You can lease a server instance from rackspace with 10GB of disk for 15 dollars a month. Tell your clients to forgo their lattes for 3 days or bum change in front of their office. Do you put plastic covers over your floor mats? On Aug 8, 2012, at 12:43 PM,

Re: Facebook PHP SDK, session_regenerate_id

2012-07-12 Thread John Hardy
Set session security to low in core. It's the only way to make it work with the OAUTH redirect. At least the only way I was able to get it working. On Jul 11, 2012, at 9:03 PM, Afif Abu Bakar wrote: Hi all. I'm having some problems working with authenticate users that login via Facebook.

Re: Session variables are PHP_Incomplete_Class, throwing errors

2012-07-10 Thread John Hardy
The class Team is not in the scope of PHP. ( IE: the class has not been declared as a symbol ) You will need to overload the __autoload function and have the file where the class is declared included. http://php.net/__autoload On Jul 10, 2012, at 5:01 PM, Wendall wrote: Hi all, I've set

Re: Did you know?

2012-07-09 Thread John Hardy
False, I hav an ETL written with a cake model and it transforms 10,000 records with each pass. Been running for over a year and has processed over 2 billion records. On Jul 7, 2012, at 10:38 AM, zuha wrote: Did you know that CakePHP has a limit of 1,254 records to be returned in an array?

Re: Looking for MVC CakePHP Best practice doc, examples for Med to large sites

2012-06-06 Thread John Hardy
/6/2012 11:41 AM, John Hardy [via CakePHP] wrote: A computer architect should just look at what cake does. It bootstraps request into and MVC architecture. It has a built in ORM, and some injection points to customize and manipulate data throughout the request. Cake is not gonna make you

Re: custom model validation question

2012-06-05 Thread John Hardy
Write your own validation routine. On Jun 5, 2012, at 5:45 PM, Michael Gaiser wrote: I have a Domain Model that has 4 has Many relationships with 4 different join models (Character, Clan, Covenant, Coterie). When creating a new record, the user is presented with 4 option boxes, each filled

Re: Question

2012-06-05 Thread John Hardy
http://www.webreference.com/html/tutorial1/index.html On Jun 5, 2012, at 6:42 PM, Michael Gaiser wrote: table /table Just like any other .html file. ~Michael On Tue, Jun 5, 2012 at 9:40 PM, ying yang yingyang99...@gmail.com wrote: My question is how i can make a table in

Re: Looking for MVC CakePHP Best practice doc, examples for Med to large sites

2012-06-05 Thread John Hardy
That book is four years old and probably covers a revision of the code that is long passed it's prime. Focus on the integrity of your data, you can always rewrite bad code, but it's much more difficult to transform shitty data. Read the bottom of this post by Torvalds, Words to engineer by….

Re: Looking for MVC CakePHP Best practice doc, examples for Med to large sites

2012-06-03 Thread John Hardy
Fat model, skinny controller. Separation of presentation and data A couple Core concepts in building a mote maintainable app. However nothing is ever 100 perfect for all situations, learn from writing your own shitty code and do not get caught in the spiral of over engineering. Keep it simple and

Re: Logout user on browser close

2012-05-31 Thread John Hardy
Use a session cookie vs a cookie set to expire at a future date. This will clear the cookie every time the browser closes On May 31, 2012 7:48 AM, Andrés Manikis andresmani...@gmail.com wrote: Hello, i'm trying to force logout after I close the browser but I don't know how to do it. If I close

Re: Logout user on browser close

2012-05-31 Thread John Hardy
PHP uses a browser cookie to store the visitors session id. The only other way is to daisy chain the ID on the URL... you don't want that trust me :-) On May 31, 2012 8:02 AM, Andrés Manikis andresmani...@gmail.com wrote: Another thing to note. In the cookbook explains that the user data is

Re: Logout user on browser close

2012-05-31 Thread John Hardy
Set the session cookie timeout to 0 Zero in core. http://en.wikipedia.org/wiki/HTTP_cookie#Session_cookie Google: Very common application used by web developers. On May 31, 2012, at 12:41 PM, Andrés Manikis wrote: I don't know if the data itself is stored in a cookie or in a session. But

Re: Using PHP's Interface as Extension Point

2012-05-31 Thread John Hardy
Over engineering. Second system effect? The Mythical Man Month http://en.wikipedia.org/wiki/The_Mythical_Man_Month#The_second-system_effect On May 31, 2012, at 1:39 PM, Jamie wrote: I suggest that you use the event system to accomplish this, as it does exactly what you're describing:

Re: ImageMagick Cake Ver 2.0.4

2012-05-21 Thread John Hardy
Use the pecl library imagick. It is more than capable and has a very good interface http://pecl.php.net/package/imagick On May 21, 2012 7:25 AM, bluesclues9 bluesclu...@gmail.com wrote: Hi Just curious about this question as I have a similar need. Did you ever get an answer or figured out

Re: CakePHP Session lost / Facebook SDK / Cookies

2012-05-16 Thread John Hardy
Set your session security to low in config. It the referrer check that's generating a new session On Apr 19, 2012 5:55 PM, Ralf Rottmann ralf.rottm...@grandcentrix.net wrote: Hi there, I'm using the official Facebook PHP SDK but it seems as if this messes with the Session. Any idea? --

Re: Is there a way to test if on localhost ?

2012-05-12 Thread John Hardy
Use the uname method to test the machines name Http://php.net/php_uname On May 12, 2012 11:27 AM, Daniel danwgr...@gmail.com wrote: Hi, I want to write some code along the lines of: if (on localhost) // site is being tested: do something else // site is live: do something

Re: Using Oracle

2012-05-12 Thread John Hardy
IMO with a cluttered schema i would rely on stored procedures for the abstraction and keep the code complexity at a minimum On May 11, 2012 11:54 PM, rihad ri...@mail.ru wrote: Most tables in our Oracle database are huge with tens of columns, have no single-column primary keys, or have

Re: Many database requests - Cake is to slow

2012-05-07 Thread John Hardy
While code optimization should be done, i would be more interested in your network, database setup/tuning and your hardware specs. Test your algorithm outside of the cake framework to compare speeds On May 7, 2012 7:48 AM, supp...@deep-coding.net supp...@deep-coding.net wrote: Hey, I have a

Re: Failed Deployment

2012-03-02 Thread John Hardy
Try clearing your sites schema cache. It's located in the tmp directory of your app folder. On Mar 2, 2012, at 10:04 PM, Michael Gaiser wrote: So I have been working on a site for a while now on my laptop (localhost) and things pretty much worked the way I would expect. But when I tried to

Re: Load balance CakePHP between 2 EC2 instances

2012-02-15 Thread John Hardy
, 2012 at 12:08 AM, John Hardy john.c.ha...@gmail.com wrote: Yes. I have a cluster of 6 nodes serving my site. Screen Shot 2012-02-15 at 8.08.20 AM.png On Feb 14, 2012, at 5:19 PM, kyutums wrote: We are currently using CodeIgniter in another project. To handle large traffic (we get

Re: Disappointed with the training.

2012-01-04 Thread John Hardy
I'm not trying to flame. However learning to program is not like learning pottery… There are certain fundamentals that need to be in place first. http://en.wikipedia.org/wiki/Computer_science On Jan 4, 2012, at 7:34 AM, Nate wrote: Well it looks like the CakePHP training came available for

Re: Cake optimization

2011-12-31 Thread John Hardy
Use a dedicated memcached server for your caching. On Dec 31, 2011, at 8:59 AM, Phang Mulianto wrote: you should also consider to optimize your web server and os layer, javascript caching in your app and also the image caching in user browser...it will make a difference for the effort...

Re: Cake optimization

2011-12-30 Thread John Hardy
cache your queries using a dedicated memcached server. Sent from my iPhone On Dec 30, 2011, at 12:45 PM, Dee Johnson devario...@gmail.com wrote: Hi guys. I have a optimization question. I have already used $persistModel = true, optimized by queries with containable and made sure all

Re: Router::connect wildcard?

2011-12-12 Thread John Hardy
I would suggest using mod rewrite and send 301 headers Sent from my iPhone On Dec 12, 2011, at 12:06 PM, heohni heidi.anselstet...@consultingteam.de wrote: Hi, I often get an 404 error as the google bot try to reach a irl like this:

Re: Same Old?

2011-12-01 Thread John Hardy
perhaps all the positions are filled. at my company, we use cake. would you want a job working on drupal modules anyway?!? yuk! and wordpress? leave that for the rookies. we build web apps ;) Perhaps you need to search for 'MVC' show your mastery of the meta-pattern and transition everything

Re: existing code base - worth importing to cakePHP in order to apply best practices?

2011-09-21 Thread John Hardy
Cake will do just fine for you. The most important thing about the longevity of any application is the strength of your data models. As long as you keep the data clean and follow strict conventions, you be fine. Cakephp promotes a very clean and normalized data model. Code with confidence.

Re: Facts

2011-09-11 Thread John Hardy
Cakphp Website: http://theberrics.com Serve over 1.5 million pages per day….. Wordpress couldn't keep up….. ;-) On Sep 11, 2011, at 12:47 PM, Jeremy Burns | Class Outfit wrote: If you are that dissatisfied, just go away. Thanks for worrying about us, but we'll be fine without you.

Re: saveAll not working

2011-09-02 Thread John Hardy
Are you calling Model::create() before you atempt to save the record? Is your parent model validating? I use save all a bunch and make it a habbit of checking these things. Saveall works a-ok ;) Sent from my iPhone On Sep 2, 2011, at 9:29 AM, Stephen Latham ste.lat...@gmail.com wrote: If

Re: CAKEPHP Email component not working in live server.. how to get the error response why that mail is not going

2011-08-29 Thread John Hardy
Can you send an email VIA command line (sendmail or postfix)? On Aug 29, 2011, at 4:42 AM, Gmail Support wrote: Hi Thanx for your response. But my controller has 4 mail functions but none of the mails are going in Live server only. Still I try to find a solution. When a third party

Re: Help with query (or subquery?)

2011-08-09 Thread John Hardy
You need to look into cross-tablualtion / Pivot Tables. There is a good article on mysql.com http://dev.mysql.com/tech-resources/articles/wizard/print_version.html On Aug 9, 2011, at 8:04 AM, Anna P wrote: Hello. It's maybe not such a CakePHP question, but rather regarding a rather

Re: SQL Error: ORA-02289: sequence does not exist.

2011-07-27 Thread John Hardy
Access rights error. Make sure your user/domain have sufficient privileges to perform the query On Jul 27, 2011, at 8:43 AM, Hanif wrote: Dear all, I am facing this error while insert data into oracle database form cakephp application. Full error message Warning (512): SQL Error:

Re: COMPLEX Query

2011-07-18 Thread John Hardy
$this-Model-query('SELECT PersonIndentification.id,PersonIndentification.name FROM ( SELECT person_indentification_id, MAX(end_date) as edate FROM trainings group by person_indentification_id ) as x RIGHT JOIN person_indentifications AS PersonIndentification ON

Re: custom routes slow down my application

2011-07-02 Thread John Hardy
It's a design issue with your application. There's no need to be instantiating 100's of routes for a single request. What you should do, is use a custom route class to bind the request to a controller/action. http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp On Jul 2,

Re: CakePHP + Apache Load Balancer

2011-06-24 Thread John Hardy
Have you ensured that you setup your proxy to pass the HTTP_X_FORWARDED_FOR header with the clients IP address You can dump the _SERVER var to check if that value is being passed in the header. Also, I would suggest using HAPROXY as a software based proxy, it's built specifically for such

Re: What editor?

2011-06-20 Thread John Hardy
eclipse PDT Sent from my iPhone On Jun 19, 2011, at 6:27 PM, Robert sigz...@gmail.com wrote: What editor or IDE do you find has the best CakePHP integration? -- Robert -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP

Re: You favorite IDE/ Dev Setup?

2011-04-06 Thread John Hardy
I use Eclipse for my code editing and Rackspace Cloud for my dev environment. IMO, cloud hosing services have increased my productivity, time to live and stability of all of my apps 10 fold :-) On Apr 6, 2011, at 12:27 PM, Angel wrote: Curious if anyone is accessing servers etc.. using a

Re: Is there a better way?

2011-02-13 Thread John Hardy
http://php.net/date with http://php.net/strtotime Sent from my iPhone On Feb 13, 2011, at 8:02 PM, Krissy Masters naked.cake.ba...@gmail.com wrote: When using selects for years 19xx - 20xx in different places on the site I found in the new year I had to go thru sites and set the max year to