Archive for September, 2009

Creating a custom 404 error page in cakePHP

Tuesday, September 22, 2009 21:26 No Comments

If you need to change the page that users see when a document is not found, create:
/app/views/errors/error404.thtml

This was posted under category: cakePHP Interview Questions

Enable / Disable CACHE in cakePHP – CACHING Feature

Tuesday, September 22, 2009 15:03 No Comments

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);

This was posted under category: cakePHP Interview Questions

CURL PHP : Trouble on server 2003, IIS 6 php_curl

Sunday, September 20, 2009 22:43 No Comments

- 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 [...]

This was posted under category: CURL PHP Examples

headers already sent Error PHP Sessions

Thursday, September 10, 2009 12:33 No Comments

This is incorrect:

echo ‘abc’;
session_start();

This is Right:
session_start();
Please note: Always write session_start() at the very first line

This was posted under category: PHP Interview Questions

JQUERY cakePHP – Enabling submit button if text entered

Tuesday, September 8, 2009 23:19 No Comments

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 [...]

This was posted under category: cakePHP Interview Questions

Explain the difference between MyISAM Static and MyISAM Dynamic

Wednesday, September 2, 2009 17:41 No Comments

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 [...]

This was posted under category: MySql Interview Questions

What can PHP do for you – Few PHP Features

Wednesday, September 2, 2009 10:48 1 Comment

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 [...]

This was posted under category: PHP Interview Questions