Archive for September, 2009
Creating a custom 404 error page in cakePHP
on September 22, 2009
If you need to change the page that users see when a document is not found, create: /app/views/errors/error404.thtml
Enable / Disable CACHE in cakePHP – CACHING Feature
on September 22, 2009
You can use the cache feature in cakePHP. Have look at the following code. APP -> CONFIG -> CORE.PHP // Access the following code in APP -> CONFIG -> CORE.PHP /** * Turn on all caching application-wide. * */ Configure::write(‘Cache.disable’, false);
CURL PHP : Trouble on server 2003, IIS 6 php_curl
on September 20, 2009
- run (as an administrator) php.exe -i > C:\phpinfo.txt and go open C:\phpinfo.txt, look in the file to see if CURL was loading, if it’s there then keep reading. – running inside a text.php script on my IIS server would not show CURL loading – A permissions problem on libeay32.dll and ssleay32.dll was causing the cli version of php allowing me access to …
headers already sent Error PHP Sessions
on September 10, 2009
This is incorrect: echo ‘abc’; session_start(); This is Right: session_start(); Please note: Always write session_start() at the very first line
JQUERY cakePHP – Enabling submit button if text entered
on September 8, 2009
jQuery code snippet: $(‘#username’).keyup(function() { if ($(‘#username’).val() != ”) { $(‘#submit’).removeAttr(‘disabled’); } else { $(‘#submit’).attr(‘disabled’, ‘disabled’); } }); It ensures that the submit button is only enabled if the “username†input field is not empty (you can see such a behavior on twitter for example). However, the snippet from above can be rewritten in a shorter and more elegant way: $(‘#username’).keyup(function() { $(‘#submit’).attr(‘disabled’, …
Explain the difference between MyISAM Static and MyISAM Dynamic
on September 2, 2009
MyISAM static all the fields have fixed width. The Dynamic MyISAM table would include fields such as TEXT, BLOB, etc. to accommodate the data types with various lengths. MyISAM Static would be easier to restore in case of corruption, since even though you might lose some data, you know exactly where to look for the beginning of the next record.
What can PHP do for you – Few PHP Features
on September 2, 2009
PHP provides a lot of facilities and possibilities: PHP provide an easy way to create a Web page to make it more useful for users. Do you have a guestbook on your website? Do you subscribe to a third-party service that provides statistics on site visitors? Would you like to know how a user got in to your web page, where they visited …

