Skip to content

More RSS Injection Testing

I am playing around with my RSS feeds and see what items that can be added to them.

Tagged

Testing RSS Injection

This is a test of rss injection, for another project.

Add Line Break in Excel Cell

To add a line break in an excel cell:

Windows:
Alt + Enter

Mac:
Control + Option + Return

Setting Up a Test Site for an Existing WordPress Site

In preparation for an upgrade to an existing custom wordpress site, I wanted to create a sub-domain for testing. For example www.realdomain.com with a test site www.test.realdomain.com. After setting up the site and DNS for test i need to copy the real site to the test site.

All info related to the actual change of the wordpress site and the database comes from this wonderful set of instructions.

Importing Data into the test site.

  • Copy the physical files from one site to another.
  • Export a copy of the real website’s MySQL db
  • Import data into your testsite db.

    mysql -u username -ppassword -h mysql.realdomain.com –default-character-set=utf8 db_name < realdomain_mysql_export.sql

Changing the wp_config.php

  • Make sure to modify the wp_config.php to point to the new db. The setting are found at the top of the file.


    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘db_name‘); // The name of the database
    define(‘DB_USER’, ‘username‘); // Your MySQL username
    define(‘DB_PASSWORD’, ‘password‘); // …and password
    define(‘DB_HOST’, ‘mysql.realdomain.com‘);

Change site & home urls

  • Login to phpMyAdmin.
  • Click the link to Databases.
  • A list of dbs will appear. Choose the one that is the test WordPress db.
  • All the tables in the test db will appear.
  • Look for wp_options. Note: The table prefix of wp_ may be different if you changed it when installing.
  • Click on the small icon indicated as Browse.
  • A screen will open with a list of the fields within the wp_options table.
  • Under the field option_name, scroll down and look for siteurl.
  • Click the Edit Field icon which usually is found at the far left at the beginning of the row.
  • In the input box for option_value, change the URL information to the new address.
  • Verify this is correct and click Go to save the change.
  • You should be returned to your wp-options table.
  • Find the home field in the table and click Edit Field. Note There are several pages of tables inside wp_options. Look for the > symbol to page through them.
  • In the input box for option_value, change the URL information to the new address.
  • Verify this is correct and click Go to save the information.

Changing internal post links

There is one specific field you will need to change and that is the guid, you can also use this to switch links within you posts, but that is not required and left to your preferences.

  • Login to phpMyAdmin.
  • Click the link to your Databases.
  • Choose the one that is the test WordPress db.
  • Look for the name of the table within your database used to hold your post information. Usually it is called wp_posts, but it may have been changed.
  • Clicking the Browse icon or link, open the wp_posts table.
  • Look for the field that holds your post “guid”. It is usually called guid, but it may have been changed.
  • Click the tab at the top for SQL.
  • Switch the old and new URL addresses you wish to update or search and replace within your database:

    UPDATE wp_posts SET guid = REPLACE (
    guid,
    ‘http://www.realdomain.com’,
    ‘http://www.test.realdomain.com’);

  • Make sure that the names of wp-posts and post_content match the tables and fields within your database. Change them if not.
  • Ensure that the ONLY content you want to change are within the little single ‘quotes’ . Make sure EVERYTHING is spelled right and that you are sure this is correct.
  • click Go.
  • At the top of the screen will be generated a list of how many of the tables and fields have been changed.

Playing with wordpress and moving sites

A friend of mine died recently and I needed to undertake an emergency move of the site from one vendor to another. Even though we were staying on the same platform and OS there was a quite a few difference between providers. As soon as I get some sleep I will relay this experience and the technical road blocks I ran into.

Upgrading from FreeBSD 6.2 to FreeBSD 6.4

I have been slack about keeping my BSD server up to date. I have a replacement box ready to install FreeBSD 7, but I noticed that 7.1 is about ready to move to RELEASE and 8 should be out shortly. Until the I decide which way I want to move, I have decided to update to the latest version of 6.x.

  • Find the version you are currently on

    # uname -a
    FreeBSD xxx.xxx.org 6.2-RELEASE-p11 FreeBSD 6.2-RELEASE-p11 #0: Wed Feb 13 06:44:57 UTC 2008 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386

  • Create a cvsup file with the following information:

    *default host=cvsup.freebsd.org
    *default base=/var/db
    *default prefix=/usr
    *default release=cvs
    *default delete use-rel-suffix compress
    src-all tag=RELENG_6_4
    ports-all tag=RELENG_6_4
    doc-all tag=RELENG_6_4


    This will update source, ports and docs.

  • Clean your source tree

    cd /usr/src && make cleanworld

  • Update your sources, ports and docs.

    cvsup -L 2 ./cvsupfile


    Go get a cup of coffee and relax for awhile. This step takes some time.

  • Make world & kernal, then install kernel

    # cd /usr/src
    # make buildworld
    # make buildkernel
    # make installkernel
    # nextboot -o "-s" -k kernel
    # reboot

  • The system will come up in single user mode, check and mount the file system.

    # fsck -p
    # mount -u /
    # mount -a -t ufs
    # swapon -a

  • Finish updating system

    # cd /usr/src
    # mergemaster -p
    # make installworld
    # mergemaster –Ui
    # reboot

  • Check that update worked

    # uname -a
    # FreeBSD leon.agitators.org 6.4-RELEASE-p1 FreeBSD 6.4-RELEASE-p1 #0: Sat Jan 3 15:31:37 EST 2009 root@xxx.xxx.org:/usr/obj/usr/src/sys/GENERIC i386

Tagged ,

Copyright Symbol on A Mac

Keyboard Shortcut:

hold option & press g.

Link to other symbols

Creating Joliet iso images on a Mac

Open Disk Utility and use the New Image from Folder menu item to create an image. Use uncompressed and use the CD/DVD master option.

Use hdiutil to convert cdr to iso

cd ~/Desktop
hdiutil makehybrid -iso -joliet -o Master.iso Master.cdr

This will create an ISO/Joliet .iso file.

Loss of a Good Friend

Tortilla - My Friend

This morning i lost a good friend. Tor, you are going to be missed.

If there is an after life i am sure you will be waiting at the gate. Thank you for being my friend.

-sam

Updating FreeBSD 6.2

Ah good old FreeBSD sometimes you forget that you actually have to patch it. While I am fairly good about keeping my release current, this is one of the few times that I have had to update because of an exploit that concerned me enough that I patched because of it. FreeBSD-SA-07:09.random.asc

Seeing this I also noticed my documentation on updating was out of date, especially in light of a few FreeBSD ports that now make it easier. This is the quick and dirty way of updating a 6.2 FreeBSD System

Dependencies: portmanager, portsnap, pkg_version

Applying Binary Security Patches

  1. Grab the latest binary updates

    # freebsd-update fetch

  2. Install the updates

    # freebsd-update install

  3. Check OS Level

    # uname -a

  4. Reboot the System

    # shutdown -r now

  5. Confirm Update

    # uname -a

Updating Software & Applications

  1. Update your ports tree

    # portsnap fetch

    If you are running Portsnap for the first time, extract the snapshot into /usr/ports:

    # portsnap extract

    If you already have a populated /usr/ports and you are just updating, run the following command instead:

    # portsnap update

  2. Display ports that need updating

    # pkg_version -vIL=

  3. upgrade installed ports:

    # portmanager -u

Tagged , ,