Items filtered by date: December 2014

Wednesday, 14 October 2009 16:41

How to install Mod_Security on XAMMP

Original Article Here

Apache Mod_Security and XAMPP

終於安裝了mod security!

In order to secure my Apache using XAMPP, I have install the mod_security and disable some php function:

Install mod security on windows:


1. download mod_security2.so at http://www.apachelounge.com/ (a binary package)
2. unzip the package and you will get mod_security2.so and a libxml2.dll
3. read the readme.txt
4. create a folder .../apache2/modules/mod_security2
5. and copy mod_security2.so and libxml2.dll to this folder
6. Install the Visual C++ 2008 Redistributable Package (Since this binary is make my VC++2008)
7. At httpd.conf:
- LoadModule security2_module modules/mod_security2/mod_security2.so
- LoadModule unique_id_module modules/mod_unique_id.so
8. You can using Include directive to include the mod_security configure file,
(you can take a look on this website.)

but I put all the things under httpd.conf , my configure file is found from the package downloaded - mod_security2.conf-minimal
Like this (under httpd.conf):

### Start Mod_Security ###
LoadModule security2_module modules/mod_security2/mod_security2.so


# Basic configuration options
SecRuleEngine On
SecRequestBodyAccess On
SecResponseBodyAccess Off

# Handling of file uploads
# TODO Choose a folder private to Apache.
# SecUploadDir /opt/apache-frontend/tmp/
SecUploadKeepFiles Off
..........
..........


9. Start and stop the Apache and look at the phpinfo and see it loaded or not.


Disable PHP function:

1. go to php.ini (xampp located at c:\xammp\apache\bin\ )and do the following:
disable_functions = "phpinfo,dir,readfile,shell_exec,exec,virtual,passthru,
proc_close,proc_get_status,proc_open,proc_terminate,system"

2. Besides, open safe mode

3. open_basedir = C:\ foo\bar

Published in Windows XP

I am looking for a shortcut to align the the text of layer B to the image on the background layer.

I currently eyeball this by using the rulers and grid, but feel there must be an easier or already defined solution to this.


If you have a selection you can hit 'v' to activate the move tool and then use any of the 'Align' buttons in the tool options bar to align your selected layer to the selection (http://help.adobe.com/en_US/Photoshop/11.0/WSfd1234e1c4b69f30ea53e41001031ab64-78c2a.html).

If you select the entire canvas (select all, cmd+a or ctrl+a on PC) before doing this then you can easily center a layer in the canvas. If you need a layer centered to another layer you can hold cmd (ctrl on PC) and click the layer to make a selection from the layer bounds and then use the above technique.

Published in Applications
Wednesday, 14 October 2009 16:21

Cannot Re-Install AVG

im trying to re-install avg and i get this error


Local machine: installation failed
Installation:
Error: Action failed for registry key HKLM\SOFTWARE\Classes\AvgDiagFile\DefaultIcon: creating registry key....
Access is denied. (5)
 


Go to the specific reg key and put permission to admin full and i delete it

Published in Security

Use this microsoft registry file taken from this link. There are also other options and an autofix link. This registry file will not work for Windows 7.

{code class="brush: powershell"}Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel] "{871C5380-42A0-1069-A2EA-08002B30309D}"=dword:00000000 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu] "{871C5380-42A0-1069-A2EA-08002B30309D}"=dword:00000000{/code}

or

  • Goto Add and Remove programs look for the Set Program Access and Defaults
  • Select custom choice and at the top click the Internet Explorer option
  • The IE icon is now back on the desktop.
Published in Windows General
Wednesday, 14 October 2009 16:03

New text document option missing

When I right click on my desktop to start a new "Text Document" the option to start a new text document does not appear. Several solutions below


  1. Try kellys korner for your fix... Line #153 (on the left)
     
  2. Check that this key exists

    HKEY_CLASSES_ROOT\.txt\ShellNew\NullFile

    If it doesn`t exist,create it.

    Right click in the right hand pane of the ShellNew key,
    Select New/String value
    then type: NullFile - Similar ideas HERE
     
  3. Goto c:\windows\shellnew and copy in a text file, access the right click menu and see if New Text Document is back and does not matter if you leave it or delete it after this.
Published in Linux
Wednesday, 14 October 2009 15:26

Digila camera recognised but no autoplay

I've got a Canon EOS 300D Digital Rebel. I've loaded the latest Canon Windows XP WIA Driver (5.2.0) - there is no Vista driver listed on the Canon site.

I don't get the "Import using Windows" dialog when I connect the camera, and Windows Photo Gallery doesn't list the camera in the import list (although my Canon scanner is listed).


I have the 350D, and it works just fine, without using any additional drivers, just the built in Vista stuff.However, you do need to change the way the camera communicates with the PC (Twain and WPA).

On the Setup 2 screen, change the Communication setting to the other option (I forget which way round they are).
 

Published in Windows XP
Wednesday, 14 October 2009 00:00

How to add Mime-Types using .htaccess

In case your web hosting account is not configured to serve certain mime types with the proper content type. You can change this using .htaccess file.

For example if you need to configure your server to display ASX files:

AddType video/x-ms-asf asf asx

For windows media audio WMA

AddType audio/x-ms-wma .wma

A comprehensive list of mime-types can be found here

There is one more useful feature of the AddType directive. Most of you most probably know that Internet Explorer opens MS Word, Excell, PDF and some other files inside a browser window. To force the browser to download the file you can use AddType to change the document type:

AddType  application/octet-stream  .doc .xls .pdf
Published in Web Server

This has not been replace by a 2011 version search this site for updated instructions

  1. Download Windows Live Installer from download.live.com.
  2. Install or upgrade the Windows Live Messenger to latest version.
  3. Open Windows Explorer, and set it to Show hidden files and folders and show protected operating system files (uncheck the tick for Hide protected operating system files) in the View tab of Folder Options.

    In Windows Vista, run Windows Explorer as Administrator, and user may requires to take ownership and gain full control permissions for the folders below before able to access them.
  4. Browse to \Program Files\Common Files\Windows Live\.cache\ folder.
  5. There will be a lot of folders made up of 15 characters and numbers. Locate Messenger.msi file inside one of the folder. Messenger.msi is the individual separate standalone setup installer for Windows Live Messenger 2009, which can be backed up or copied to another location. Do note that the Messenger.msi and other Windows Installer Package retrieved this way is silent installer.

    Tip: %ProgramFiles%\Common Files\Windows Live\.cache\cache.ini file contains the paths of all Windows Live software products downloaded or installed on the computer.
     
  6. If you have any problem with Windows Live Messenger after installation using the standalone individual installer Messenger.msi, try to install the following 3 programs too, all of which in different sub-folders inside the .cache directory.

    Contacts.msi (Contacts)
    dw20shared.msi (DW 2.0 Client)
    crt.msi (Microsoft Visual Studio Runtime)

    Tip: Contacts.msi is a must to avoid or fix 8000FFFF error.


After grabbing the Windows Live Messenger standalone silent installer, optionally user can uninstall the Windows Live Suite (all programs) from Control Panel, and install Messenger.msi (and Contacts.msi too) again to get rid of all other Windows Live components except WLM9, saving time and bandwidth in future installation.

The trick also work for all other Windows Live products such as Windows Live Sign-In Assistant (wllogin.msi), Windows Live Writer, Windows Live Mail ,Windows Live Toolbar, Windows Live Photo Gallery, Windows Live Family Safety, Segoe UI Font, Windows Live Call and Microsoft Office Outlook Connector.
 

Published in Windows Family
Friday, 12 June 2009 12:29

Prevent Code stripping in FCKeditor

This prevents code stripping or manipulation of code between the geshibot tags (using curly braces) in FCKeditor WYSIWYG. (or anyother specified tag)

Firstly make sure you have set Joomla's whitelist/blacklist thing properly as descibed in this article.

http://docs.joomla.org/Why_does_some_HTML_get_removed_from_articles_in_version_1.5.8%3F

The easiest way of checking this is to turn off your editor, paste some code in, save the article and see if joomla has stripped the code out.

Next choose FCKeditor as your WYSIWYG, install if needed.

To prevent any code in between the geshibot tags being stripped out we need to add a line of code to

/plugins/editors/fckeditor/fckconfig.js

search for (about line 66):

{code class="brush: text"}// FCKConfig.ProtectedSource.Add( /(]+>[\s|\S]*?<\/asp:[^\>]+>)|(]+\/>)/gi ) ; // ASP.Net style tags {/code}

right below it add:

{code class="brush: text"}FCKConfig.ProtectedSource.Add( /{geshibot[\s\S]*?}[\s\S]*?{\/geshibot}/g ) ; // Protects all code between GESHI tags{/code}

or another example using code and curly braces

{code class="brush: text"}FCKConfig.ProtectedSource.Add( /{code[\s\S]*?}[\s\S]*?{\/code}/g ) ; // Protects all code between code tags{/code}

Save file, empty you browser cache to make sure nothing is left. FCKeditor will now leave all code between the geshibot tags alone.

This code will allow you to specify the parameters of Geshibot in the first bracket aswell.

Please note, when you uninstall or upgrade this change will dissapear and will have to mod the file again. Also, the geshibot tags and the code between it will only be visible on the source page.

This technique can be used to protect other needed tags for FCKeditor

The following instructs FCKeditor to accept the tags <MYTAG> and <CUSTOM> . The following protects tags that are in the normal html entity style with the greater and lesser than signs

{code class="brush: text"}FCKConfig.ProtectedTags = 'MYTAG|CUSTOM' ;{/code}

Published in Extensions
Wednesday, 10 June 2009 10:59

Sage Line 50 Removal Instructions

Sage Line 50 Accounting never uninstalls completely and occasionally on upgrade will stop working with such sypmtoms as:

  1. When sage is run it hangs on the splash screen
  2. when Sage is run and then a company is selected it hangs on the splash screen

To solve this follow these steps:

  1. Uninstall .Net Framework 2.0
  2. Uninstall Sage
  3. Goto C:\Program Files\Common Files and delete all sage folders
  4. Delete C:\WINDOWS\sage.ini
  5. Move/Delete C:\WINDOWS\SYSTEM32\sg*.* (I also turn company on in details and check for any further Sage files)
  6. Rename Sage program directory, all data files are maintained here
  7. Reboot PC
  8. Install .Net Framework 2.0 of the Sage CD
  9. Install Sage of the Sage CD
  10. Reboot

Sage should now work. You can now also install any company data in to Sage. I would also install all updates.

Published in Windows Family
Page 88 of 95