Blog posts tagged "php" – Posts 1..5 of 14 posts found:

2014-05-09: PHP: Why might session_start fail, claiming "no such file or directory"?

Posted at 2014-05-09 15:49:30 by SHD

Here's a little problem that bit me after an OS upgrade to a webserver. Whenever session_start was called, PHP would throw a warning message and not actually start the session:

2013-11-13: Making use of Magento's cache

Posted at 2013-11-13 01:07:28 by SHD

Popular open source e-commerce solution Magento can be quite slow, but there are ways of improving its performance. Caching is one very effective way and Magento supports various caching backends out of the box, including Memcached. If you write your own Magento extensions, be they plugins or templates, you might benefit from using the cache for things that might otherwise tie up a lot of resources to recompute. This is quite easy to do, but information on caching is surprisingly rare. So how do you do it?

2013-05-23: Tip: Getting rid of the warning "The column name 'start' is a MySQL reserved keyword."

Posted at 2013-05-23 15:20:39 by SHD

Version 4 and later of popular database management tool phpMyAdmin "helpfully" displays warnings when a column name in a database conflicts with a reserved word in MySQL. This may or may not be an actual problem. If you are in the habit of enclosing table names in your SQL queries in `backticks`, it shouldn't be a problem at all. For others, it may depend on the actual column name. In the example provided below, "start" and "end" can safely be SELECTed unquoted, whereas "group" needs the backticks. At any rate, having the warnings show up the whole time rather than just at table creation time is annoying. Here's how to disable them.

2013-04-14: Magento & Memcached - Fix "Unknown number format type 'boolean'."

Posted at 2013-04-14 16:26:59 by SHD

Recently, I posted a guide to speed up Magento using Memcached. If you've followed another guide that has incomplete information, Magento may fail to work, greeting you with a rather unhelpful error message "Unknown number format type 'boolean'. Format '' must be a valid number format string.". The fix for this is simple.

2013-04-12: Speed up Magento with Memcached

Posted at 2013-04-12 16:49:25 by SHD

Magento is a highly flexible, open source e-commerce solution. Unfortunately, it can also be dog-slow, especially on servers with modest hardware specifications. Throwing extra hardware at the problem is not a great solution. There is a lot of tweaking that can be done, though. Very significant speedups may be realised through the use of Memcached. Magento supports this out of the box, but it is not enabled by default. Here's how to set that up.