What’s the best way to move c:\users to d:\users under vista/Window 7

The easiest and recommended way is to move the individual special folders inside a user directory, such as Documents, Music, Video’s, etc. You can do this with the following steps:

Right click –> properties

Location tab Fill in the desired location and

click ‘move’

Downside to this is that this still leaves the main ‘Users’ folder inplace.

 

ERROR: Either the server is overloaded or there was an error in a CGI script – Apache Server in XAMPP

Windows XP Pro SP 2
XAMPP

Error Message:

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.
Error 500
localhost
02/27/08 13:04:31
Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.4

SOLVE:

Mod_rewrite needs to be enabled on xampp for htaccess to work. Its an apache server by the way so htaccess does work.

Find the file called httpd.conf, it should be located in
XAMPPInstallDirectory\apache\conf\

Open with notepad and find this line
#LoadModule rewrite_module modules/mod_rewrite.so
Remove the #, save it, restart apache (if running).

WordPress Tutorial – Adding A Widget Area To Your Theme Files

Its a fairly simple process, which involves 2 steps:

1. Register The Widget

To register the new widget you need to open the functions.php file in your WordPress themes editor.

Add the following code to the functions file, making sure you place it in between php tags:

if ( function_exists('register_sidebar') ){
    register_sidebar(array(
        'name' => 'my_mega_menu',
        'before_widget' => '',
        'after_widget' => '',
        'before_title' => '',
        'after_title' => '',
));
}

Give the widget area a name – e.g. my_mega_menu and in the before/after options you can place code which you wish to appear wrapped around either the widget itself or the title.

Since we are wanting to use one of the menu widget themes, which come with plugins we dont want to wrap it in the standard widget tags, which may interfere with the CSS.

For this example we have just wrapped it in a div tag with the id – my-mega-menu-widget.

2. Add The Widget Code To Your Theme

Now we can add the code that will call the widget to the correct location in our theme files. Since we are creating a horizontal mega menu we obviously want to display this in the header.

In your WordPress themes editor open the header.php file.

Find the location where you want to place the menu and add the following code to the header.php file:

< ?php /* Widgetized sidebar */
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('my_mega_menu') ) : ?>< ?php endif; ?>

Make sure that you change the “my_mega_menu” text to be the same as the name you gave to your widget area in the functions file.

Save the changes to the header.php file

If you now go to the widget area in WordPress admin you should see a new widget area in the right hand column with the name of your widget.

Sources: http://www.designchemical.com/blog/index.php/wordpress-tips/wordpress-tutorial-adding-a-widget-area-to-your-theme-files

How to export HTML Table into Excel via PHP

Create one variable and save whole table as string to that variable and just add below headers lines

//Header information
$header = "Header1" . "\t";
$header .= "Header2" . "\t";

//Reading the data thro' POST
$data= $_POST['header1']. "\t";
$data .= $_POST['header2'] . "\t";

header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=xyz.xls");
header("Pragma: no-cache");
header("Expires: 0");
print "$header\n$data";

download sample file

Win 2003 Server, IIS 6, PHP 5 : Error: security error (ACL ERROR).

I am using Win 2003 Server, IIS 6, PHP 5.

If you see "You are not authorized to view this page" error when running your PHP page.

Try one more thing:
1. Right-click {C:\php} (or your PHP installation root) and select {Properties}
2. Select {Security} tab and click {Add} button
3. Enter {ComputerName/IUSR_ComputerName} as object name and press {OK}
4. Select {Read & Execute} as permissions
5. Click {Advanced} button and select {Allow inheritable permissions from the parent...} checkbox
6. Press {OK}

How to setup a local web server on your computer using XAMPP

Installing XAMPP on your computer

  1. First, download XAMPP for Windows Installer
  2. Then run the installer on your computer and make sure that your Windows firewall unblocks Apache.
  3. Run the Apache administrator.
  4. Open your browser and go to http://127.0.0.1 – If all went well, a screen will appear where you can choose your language.
  5. Go to http://127.0.0.1/security/xamppsecurity.php and setup a password (i

Gujarati Shyari

કોણ ભલાને પૂછે છે? અહીં કોણ બૂરાને પૂછે છે?
મતલબથી બધાને નિસ્બત છે, અહીં કોણ ખરાને પૂછે છે?
અત્તરને નિચોવી કોણ પછી ફૂલોની દશાને પૂછે છે?
સંજોગ ઝુકાવે છે નહીંતર અહીં કોણ ખુદાને પૂછે છે?