Posts Tagged ‘Default’

PHP:How to disable PHP magic quotes effect

Monday, June 30th, 2008

set_magic_quotes_runtime(FALSE);
if (get_magic_quotes_gpc()) {
/*
All these global variables are slash-encoded by default,
because    magic_quotes_gpc is set by default!
(And magic_quotes_gpc affects more than just $_GET, $_POST, and $_COOKIE)
*/
$_SERVER = stripslashes_array($_SERVER);
$_GET = stripslashes_array($_GET);
$_POST = stripslashes_array($_POST);
$_COOKIE = stripslashes_array($_COOKIE);
$_FILES = stripslashes_array($_FILES);
$_ENV = stripslashes_array($_ENV);
$_REQUEST = stripslashes_array($_REQUEST);
$HTTP_SERVER_VARS = stripslashes_array($HTTP_SERVER_VARS);
$HTTP_GET_VARS = stripslashes_array($HTTP_GET_VARS);
$HTTP_POST_VARS = stripslashes_array($HTTP_POST_VARS);
$HTTP_COOKIE_VARS = stripslashes_array($HTTP_COOKIE_VARS);
$HTTP_POST_FILES = stripslashes_array($HTTP_POST_FILES);
$HTTP_ENV_VARS = stripslashes_array($HTTP_ENV_VARS);
if (isset($_SESSION)) {    #These are unconfirmed (?)
$_SESSION = stripslashes_array($_SESSION, ”);
$HTTP_SESSION_VARS = stripslashes_array($HTTP_SESSION_VARS, ”);
}
/*
The $GLOBALS array is also slash-encoded, but when all the above are
changed, $GLOBALS is updated to reflect those changes.  (Therefore
$GLOBALS should never be modified directly).  $GLOBALS also contains
infinite recursion, so it’s dangerous…
*/
}
function stripslashes_array($data) {
if (is_array($data)){
foreach ($data as $key => $value){
$data[$key] = stripslashes_array($value);
}
return $data;
}else{
return stripslashes($data);
}
}

Office 2007 Users

Saturday, June 28th, 2008

Users who have Office 2007 on their computers can save each file in the earlier version. For example, when saving a document in Word:

1. Click on the Office button
2. Choose the Save As - Word 97-2003 Document

This will save the file in the recognized format for older versions (.doc).

A second option is to have Office 2007 users change the default setting for their files in Word, Excel, PowerPoint, etc. to automatically save in a lower version. This is better than having to try and remember each time you save a file to change the file type. To change the default setting:

1. Open an Office application, for example Word
2. Click on the Office button
3. Click on the Word Options button at the bottom of the window
4. Click on Save to display the options
5. Click the down arrow next to the field for Save files in this format and choose  Word 97-2003 (*.doc)
6. Click OK to save the default

WordPress:Processor Limitations

Friday, June 27th, 2008

To serve high-traffic web sites, you will have to contend with the demand that high traffic puts on your server’s internal resources. Be sure that the general demand on your server is met by sufficient processor power and memory resources.

There can be more dependencies than what follows for publishing your WordPress site, however these are the ones that WordPress requires by default.

Set Google as your Default Search in IE

Wednesday, June 18th, 2008

Copy everything after ‘CODE’ below into NOTEPAD

CODE:
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
“Search Page”=”http://www.google.com”
“Search Bar”=”http://www.google.com/ie”

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchURL]
“”=”http://www.google.com/keyword/%s”

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Search]
“SearchAssistant”=”http://www.google.com/ie”

1. Save the file as Google.reg
2. Double click to import to your registry.

NOTE: If your anti-virus software warns you of a “malicious” script, this is normal if you have “Script Safe” or similar technology enabled.