MainelyDesign.com Blog

Showing articles 61 - 70 (140 total)

CakePHP 1.3 Improvements Over CakePHP 1.2

Posted on 09/09/2010 at 02:01 pm | Viewed 9,847 times | 0 comments

I've been working on upgrading my CakePHP application to cake version 1.3.  It's a lot of work.  I find myself constantly consulting the CakePHP manual/book for answers.  There are many places to look for all of the improvements that were rolled into CakePHP 1.3 (at least coming from the 1.2 version).  For my own reference, I'm creating a list...

CURL on Windows Doesn't Work in PHP 5.2.14 ISAPI

Posted on 09/07/2010 at 08:17 pm | Viewed 10,108 times | 0 comments

Just a quick post to let everyone know what I just found out- the version of CURL (php_curl.dll) that ships with PHP 5.2.14 for Windows ISAPI doesn't work!  That's right- it doesn't work.  I tried the MSI PHP installer package, manual installs, moving dll files into Windows and System32 directories all to no avail.  The culprit: a bad version...

Global Mysql Find and Replace with CakePHP

Posted on 08/31/2010 at 09:03 am | Viewed 9,612 times | 0 comments

I'm moving my Content Management System over to CakePHP 1.3.  I'll post an article about my experiences later.  Today I will focus on one and only one issue with the migration from Cake 1.2 to 1.3: the change of webroot/theme/ to webroot/theme/ to serve static content.  At first I was a little disapointed/scared at the prospects of making...

Difference Between Truncate and Empty (Delete From) in Mysql

Posted on 06/23/2010 at 02:30 pm | Viewed 20,357 times | 1 comment

I use Navicat for administering all of my MySQL databases.  It has a command that I always use- empty table.  I noticed today that all along there has been a command right below it for truncate table.  Hmmm.  I figured this would result in the same outcome and wondered what the difference is between emptying a mysql table and truncating the...

Best Approach to Dynamic Javascript in CakePHP Views

Posted on 05/29/2010 at 12:36 pm | Viewed 17,175 times | 5 comments

I always knew in the back of my mind that there was a better way of creating dynamic javascript than the method I was using.  CakePHP has a great function as part of the $View controller:  $View->addScript($jscript, false) will add a script block to your template header.  This is the command I use to send javascript created in a Cake view up to...

Speeding Up Cakephp's ACL Component

Posted on 05/28/2010 at 12:12 pm | Viewed 12,979 times | 1 comment

I came across a posting today that changed the performance of my application tremendously and reinforced a concept I had forgotten about- mysql indices. I didn't realize my app was running slow until I implemented the mysql indexes below- no formal benchmark testing, but I would say speed improved by about 300%.  The improvement was most...

Best Free Mysql Zip code Database

Posted on 04/20/2010 at 04:42 pm | Viewed 15,505 times | 0 comments

I'm sure every developer reaches a point when they will need to use a mysql database of zip codes in the United States.  Say you want to make a store locator and show how many miles a customer is from your store, or if you have some custom php logic that uses zip codes, you will inevitably need a mysql database of zipcodes.  The Best Free Mysql...

Controlling CakePHP Error Handling When Debug = 0

Posted on 04/19/2010 at 04:27 pm | Viewed 21,837 times | 1 comment

I finally had a client request a piece of functionality that required me to program CakePHP so I could better control the default error handling when the site is in production mode (i.e. debug is set to 0).  By default, CakePHP will throw a 404 page not found header whenever ANY errors occur on a production site with debug equal to zero.  This...

Cache Results from Query in CakePHP

Posted on 03/24/2010 at 11:18 am | Viewed 10,336 times | 0 comments

I have a HUGE query that I wanted to cache.  I love CakePHP's caching functionality out of the box, but one thing is missing- you can't cache the results of a query.  Let me clarify.  You can cache the reults of a query, but only for that instance of a page load.  Using $this->cacheQueries only caches the query to memory, which only lasts for...

Setting Envelope-From in CakePHP's Email Component

Posted on 03/22/2010 at 05:56 pm | Viewed 12,301 times | 1 comment

I've setup a form that allows customers to sign up for an email newsletter and receive a coupon. I wanted to be able to track the bounced messages in case a legitimate customer's coupon was bounced for whatever reason. As I've learned, setting up the "return-path" for an email message isn't as simple as setting $this->Email->return =...

    3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11   

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design