←December→
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
|
Sat, Dec 31, 2011 10:13 pm
Reorganizing Items under All Programs for Windows 7
If you want to add or reorganize programs and folders under
All Programs, which you see when you click on the Windows
Start button, you will first need to log into an account
that has administrator privileges then
display hidden and system files and folders. Once you've done that,
use the Windows Explorer to navigate to the location for the
ProgramData folder, which will, typically, be
C:\ProgramData
. Navigate to
C:\ProgramData\Microsoft\Windows\Start Menu\Programs
.
Within this directory you will see the folders and programs that appear
when you view the items within
All Programs after you click on
the Windows
Start button.
You can then move folders and shortcuts
about or right-click and choose New to create a new folder.
Some entries you see under All Programs may be under
C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start
Menu\Programs
, where Username is the relevant user account,
instead. E.g., if you are logged into the account
Jane, some of entries may be under
C:\Users\Jane\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
. These are entries that appear under All Programs just
for that account, whereas those under
C:\ProgramData\Microsoft\Windows\Start Menu\Programs
apply
to all accounts on the system.
[/os/windows/win7]
permanent link
Fri, Dec 30, 2011 9:27 pm
Transferring Live Messenger Winks
I set up a new laptop for a user who uses Microsoft's Live Messenger for
chatting with friends and relatives. In addition to transferring her
documents and pictures, she also wanted me to transfer
winks, which are
Flash-based animated files used by Live Messenger to display short animated
clips of actions, such as blowing a kiss, throwing a snowball, etc., which
a user can pick from when sending a mesage to someone.
[
More Info ]
[/network/chat/live_messenger]
permanent link
Thu, Dec 29, 2011 5:50 pm
Viewing Hidden and System Files and Folders Under Windows 7
To see the location of hidden and system files and folders under Windows
7, you need to take the following steps to make them visible.
- Click on the Windows Start button
at
the lower, left-hand corner of your screen.
- Select Computer.
- Click on Organize.
- Select Folder and search options.
- Click on the View tab.
- Under the Hidden files and folders entry, check
"Show hidden files, folders, and drives".
- Below the above entry, you will see an entry for
"Hide protected operating system files (Recommended)"; uncheck it.
You will see a warning that
"These files are required to start and run Windows. Deleting or editing them
can make your computer inoperable. Are you sure you want to display these
files?" Click on Yes.
- Click on OK to apply the changes.
You can follow a similar process to reverse the changes to hide the files
again after you've accessed the files you need to access to protect yourself
from accidentally modifying any system files.
[/os/windows/win7]
permanent link
Tue, Dec 27, 2011 6:14 pm
Spbyot - You are missing administrator rights
After installing
Spybot
Search & Destroy 1.6.2 through
allmyapps, I started Spybot and attempted to peform an immunization,
but saw the following error, even though I was logged into an account
in the administrator group when I started Spybot.
Error
You are missing administrator rights to perform this action.
If you need to do this, please run this application
elevated as an administrtor.
When I started Spybot by right-clicking on its shortcut and choosing
"Run as administrator", the immunization performed successfully.
[/security/spyware/spybot]
permanent link
Mon, Dec 12, 2011 11:03 pm
Configuring a Mac OS X 10.6 System to Provide VNC Access
Note: These notes have been tested on systems running
OS X 10.6, aka
"Snow Leopard", but may apply to other versions as well.
I needed to configure a Mac system running OS X 10.6.3 to support remote
access from a Virtual Network
Computing (VNC) client on a Microsoft Windows system. VNC is a graphical
desktop sharing system that
uses the RFB protocol
to remotely control another computer. It transmits the keyboard and mouse
events from one computer to another, relaying the graphical screen updates
back in the other direction, over a network. There are many free VNC clients,
such as TightVNC, the free
edition of RealVNC, etc.
Mac OS X
Snow Leopard (version 10.6) comes with AppleVNCServer software.
To configure the Mac OS X system for VNC access, take the following
steps:
- Click on the Apple icon at the top left of the screen.
- Select System Preferences.
- Under Internet and Wireless, select Sharing.
- Ensure Remote Management is checked.
Note: if the lock icon at the lower, left-hand corner of the screen
is showing a locked padlock, you will need to click on the padlock to
unlock it, which will present you with a window where you can provide
the account name and password for an account with adminstrator access
for the system.
- For "allow access for", select either "All users" or "Only these users.
If you select "Only these users", click on the plus sign, i.e., "+", and
click on a user account which should be granted remote management access, then
click on the Select button. You will then have the opportunity
to grant specific permissions from among the following:
- Observe
- Control
- Show when being observed
- Generate reports
- Open and quit applications
- Change settings
- Delete and replace items
- Start text chat or send messages
- Restart and shut down
- Copy items
Pick the permissions you wish to grant, then click on OK.
- Click on Computer Settings.
- In the "VNC viewers may contrl screen with password" field, place a
password to be used for VNC access.
- Click on OK.
- You will be prompted for the password of an account with administrator
privileges to complete the changes. Provide an appropriate account name
and password, then click on OK.
Information on the service can be obtained from the command line by obtaining
a shell prompt by running the Terminal
program under
/Applications/Utilities
then
issuing the command launchctl list com.apple.ScreenSharing.server
.
$ launchctl list com.apple.ScreenSharing.server
{
"Label" = "com.apple.ScreenSharing.server";
"LimitLoadToSessionType" = "Aqua";
"OnDemand" = true;
"LastExitStatus" = 0;
"TimeOut" = 30;
"Program" = "/System/Library/CoreServices/RemoteManagement/AppleVNCServe
r.bundle/Contents/MacOS/AppleVNCServer";
"EnableTransactions" = true;
"TransactionCount" = -1;
};
If you don't see it listed try launchctl list | grep -i Screen
.
The program listens by default on
TCP
port 5900.
[/os/os-x]
permanent link
Tue, Nov 29, 2011 8:23 pm
Starting OSXVnc From a Command Line
I needed to remotely start
VNC server software on an Apple OS X 10.3,
aka
Panther,
system. I had
SSH access to the system.
I could tell the software wasn't currently running by checking to
see if the system was listening for connections on the default port,
tcp port 5900, using the netstat
command.
$ netstat -a | grep 5900
$
I tried started the software running in the background by issuing the command
/Applications/OSXvnc.app/OSXvnc-server &
at a terminal prompt, but
OSXVnc didn't start, because, though I was logged into an account with
administrator privileges, I wasn't logged into the root account.
$ /Applications/OSXvnc.app/OSXvnc-server &
2011-11-29 10:22:55.218 OSXvnc-server[385] Main Bundle: /Applications/OSXvnc.app
kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only
2011-11-29 10:22:55.225 OSXvnc-server[385] screen format not supported. exiting.
So I then
used sudo to assume the
identity of the root account to run the coomand. When prompted for a password
I entered the password for the administrator account under which I was
already logged into the system I was then able to successfully start OSXvnc.
Greg-Computer:/ JDoe$ sudo -s
Password:
Greg-Computer:/ root# /Applications/OSXvnc.app/OSXvnc-server &
[1] 397
Greg-Computer:/ root# 2011-11-29 10:29:50.345 OSXvnc-server[397] Main Bundle: /Applications/OSXvnc.app
2011-11-29 10:29:50.353 OSXvnc-server[397] Waiting for clients
2011-11-29 10:29:50.353 OSXvnc-server[397] Started Listener Thread on port 5900
By then hitting enter, I could get back to the
shell prompt and
check to ensure the program was listening on port 5900.
Greg-Computer:/ JDoe$ netstat -a | grep 5900
tcp4 0 0 *.5900 *.* LISTEN
If you need to change the VNC password, you can use the storepasswd
command in the /Applications/OSXvnc.app
directory.
$ /Applications/OSXvnc.app/storepasswd -h
usage: storepasswd <password> <filename>
Stores a password in encrypted format.
The resulting file can be used with the -rfbauth argument to OSXvnc.
The VNC password is normally stored in
/Applications/OSXvnc.app/.osxvncauth
.
You can change the password by using sudo to assume the identity of the
root account and then using the storepasswd
command,
similar to the example below:
Greg-Computer:~ JDoe$ sudo -s
Password:
Greg-Computer:~ root# /Applications/OSXvnc.app/storepasswd Some-Password /Applications/OSXvnc.app/.osxvncauth
storing password succeeded.
Greg-Computer:~ root#
You can then use ps | grep OSXvnc | grep -v grep
to find
the process ID for the the existing OSXvnc server process, kill it
with kill -9 <PID>
and restart the
software using the -rfbauth
parameter. E.g.,
/Applications/OSXvnc.app/OSXvnc-server -rfbauth /Applications/OSXvnc.app/.osxvncauth &
will start OSXvnc running again using the password stored in
/Applications/OSXvnc.app/.osxvncauth
. Putting an
ampersand, &, at the end of the line puts the process running in the
background, so that it will continue to run even after you log off.
Greg-Computer:~ root# ps | grep OSXvnc | grep -v grep
397 std- S 3:12.77 /Applications/OSXvnc.app/OSXvnc-server
Greg-Computer:~ root# kill -HUP 397
Greg--Computer:~ root# /Applications/OSXvnc.app/OSXvnc-server -rfbauth /Applications/OSXvnc.app/.osxvncauth &
[1] 466
Greg--Computer:~ root# 2011-11-29 20:04:00.879 OSXvnc-server[466] Main Bundle: /Applications/OSXvnc.app
2011-11-29 20:04:00.886 OSXvnc-server[466] Waiting for clients
2011-11-29 20:04:00.887 OSXvnc-server[466] Started Listener Thread on port 5900
References:
-
OSXvnc 1.71 Frequently Asked Questions
Last Modified: 20 July 2006
Redstone Software
[/os/os-x]
permanent link
Thu, Nov 24, 2011 12:01 pm
Burning an ISO File to Disc with Disk Utility
Under
Mac OS X, you can
burn an
.iso file to a blank CD
using the
Disk Utility
application. You can open the application using the
Finder.
You will find
Disk Utility in
Applications/Utilities.
When you have opened the
Disk Utility application, take the following
steps to burn the .iso file to a blank disc.
- Click on File.
- Click on the Burn button.
- Browse to the .iso file you wish to burn to disc. Click on it to select it
then click on the Burn button.
- When you see the "Ready to burn" message, click on the Burn
button. A Disk Utility Progress window should open showing you
the progress of the burning process as the .iso file is burned to the
blank disc. The disc will be ejected when the process is completed.
[/os/os-x]
permanent link
Tue, Nov 15, 2011 10:40 pm
AV Security 2012v121.exe Rogue Antivirus Program
I removed
rogue antivirus software associated with
AV Security 2012v121.exe
from a user's system. The
AV Security 2012
"security" software was declaring other
programs on the system as infected and preventing other
programs from running.
[More Info ]
[/security/malware]
permanent link
Tue, Nov 15, 2011 9:07 am
Paypal Cookie Problem
A user reported that she could not access
PayPal. She received the error message below:
Bad Request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.
Cookie: Apache=10.190.8.162.1308261499204052; ...
She was using Firefox 8.0. I had her try accessing the site with
Internet Explorer. She was able to access the site via Internet Explorer,
so I then deleted all of the cookies stored for
paypal.com by Firefox.
The following procedure will allow you to delete all of the cookies
for a particular site, such as PayPal, in Firefox.
- Click on Tools.
- Click on Options.
- Select Privacy.
- Click on "remove individual cookies"
- Cick on "paypal.com" or whatever site for which you wish to remove
all cookies.
- Click on the Remove Cookies button
- Click on Close
- Click on OK
[/network/web/browser/firefox]
permanent link
Sun, Nov 13, 2011 8:22 pm
file_upload Perl Script
The
PHP code I had been using
to upload files to a website would not allow
me to upload files more than a few MB in size, likely due to the
MAX_FILE_SIZE setting for HTTP_POST_VARS. I decided I would use a
Perl script, instead, for
uploading files to the site.
I used a Perl script
Uploading Files Using CGI and Perl Article written by Matt Doyle as
the basis for my script with just some minor modifications. I changed the
maximum allowed size for uploaded files from 5 MB to 15 MB. I also eliminated
the code pertaining to the uploader's email address, since I didn't need
that information, and removed all references to photos in the code, since
I wanted to use the script for uploading any type of file not just photos.
I added some code to provide file size information on the uploaded file when
the upload completes, which I got from
How do I display filesizes in a nice way? at
Stuart's Useful Perl Pages.
When a file is uploaded, the script will now show something like the
following when the upload is completed.
File upload completed!
File uploaded: opera-10.11.gcc4-static-qt3.pkg.gz
File size: 14.43 MB (15136905 bytes)
The Perl script, file_upload.cgi is available
here
References:
-
Uploading Files Using CGI and Perl Article
By: Matt Doyle
Date: March 14, 2008
SitePoint >> Web Design, Web
Development, Freelancing, Tech News and more
-
How do I display filesizes in a nice way?
Stuart's Useful Perl Pages
-
How to get the size of a file in Perl using file test operators.
Perl Programming & Tutorials from
About.com
[/languages/perl]
permanent link
Sun, Nov 13, 2011 3:03 pm
Determining the Network Interface Card (NIC) in a Linux System with lspci
I found that a
network interface card (NIC) in a system was not picking up an
IP via
DHCP. When I checked the
IP configuration for the card,
I saw it had an invalid
MAC address of all zeros.
$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19 Base address:0xdead
The system had an Ethernet controller built into the motherboard. In such
cases you can determing what Ethernet controller is being used by opening
the system case or you can use the lspci
command.
$ lspci | grep Ethernet
00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] 190 Ethernet Adapt
er
On Linux systems, the lspi
command displays information about
Peripheral
Component Interconnect (PCI) buses in the system and devices connected to
them.
In the above case I could see that the system needed a Linux driver for
a SiS 190 Ethernet Adapter.
NAME
lspci - list all PCI devices
SYNOPSIS
lspci [options]
DESCRIPTION
lspci is a utility for displaying information about PCI buses in the
system and devices connected to them.
By default, it shows a brief list of devices. Use the options described
below to request either a more verbose output or output intended for
parsing by other programs.
If you are going to report bugs in PCI device drivers or in lspci
itself, please include output of "lspci -vvx" or even better "lspci
-vvxxx" (however, see below for possible caveats).
Some parts of the output, especially in the highly verbose modes, are
probably intelligible only to experienced PCI hackers. For exact defi
nitions of the fields, please consult either the PCI specifications or
the header.h and /usr/include/linux/pci.h include files.
Access to some parts of the PCI configuration space is restricted to
root on many operating systems, so the features of lspci available to
normal users are limited. However, lspci tries its best to display as
much as available and mark all other information with <access denied>
text.
OPTIONS
Basic display modes
-m Dump PCI device data in a backward-compatible machine readable
form. See below for details.
-mm Dump PCI device data in a machine readable form for easy parsing
by scripts. See below for details.
-t Show a tree-like diagram containing all buses, bridges, devices
and connections between them.
Display options
-v Be verbose and display detailed information about all devices.
-vv Be very verbose and display more details. This level includes
everything deemed useful.
-vvv Be even more verbose and display everything we are able to
parse, even if it doesn't look interesting at all (e.g., unde
fined memory regions).
-k Show kernel drivers handling each device and also kernel modules
capable of handling it. Turned on by default when -v is given
in the normal mode of output. (Currently works only on Linux
with kernel 2.6 or newer.)
-x Show hexadecimal dump of the standard part of the configuration
space (the first 64 bytes or 128 bytes for CardBus bridges).
-xxx Show hexadecimal dump of the whole PCI configuration space. It
is available only to root as several PCI devices crash when you
try to read some parts of the config space (this behavior proba
bly doesn't violate the PCI standard, but it's at least very
stupid). However, such devices are rare, so you needn't worry
much.
-xxxx Show hexadecimal dump of the extended (4096-byte) PCI configura
tion space available on PCI-X 2.0 and PCI Express buses.
-b Bus-centric view. Show all IRQ numbers and addresses as seen by
the cards on the PCI bus instead of as seen by the kernel.
-D Always show PCI domain numbers. By default, lspci suppresses
them on machines which have only domain 0.
Options to control resolving ID's to names
-n Show PCI vendor and device codes as numbers instead of looking
them up in the PCI ID list.
-nn Show PCI vendor and device codes as both numbers and names.
-q Use DNS to query the central PCI ID database if a device is not
found in the local pci.ids file. If the DNS query succeeds, the
result is cached in ~/.pciids-cache and it is recognized in sub
sequent runs even if -q is not given any more. Please use this
switch inside automated scripts only with caution to avoid over
loading the database servers.
-qq Same as -q, but the local cache is reset.
-Q Query the central database even for entries which are recognized
locally. Use this if you suspect that the displayed entry is
wrong.
Options for selection of devices
-s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]
Show only devices in the specified domain (in case your machine
has several host bridges, they can either share a common bus
number space or each of them can address a PCI domain of its
own; domains are numbered from 0 to ffff), bus (0 to ff), slot
(0 to 1f) and function (0 to 7). Each component of the device
address can be omitted or set to "*", both meaning "any value".
All numbers are hexadecimal. E.g., "0:" means all devices on
bus 0, "0" means all functions of device 0 on any bus, "0.3"
selects third function of device 0 on all buses and ".4" shows
only the fourth function of each device.
-d [<vendor>]:[<device>]
Show only devices with specified vendor and device ID. Both ID's
are given in hexadecimal and may be omitted or given as "*",
both meaning "any value".
Other options
-i <file>
Use <file> as the PCI ID list instead of
/usr/share/misc/pci.ids.
-p <file>
Use <file> as the map of PCI ID's handled by kernel modules. By
default, lspci uses /lib/modules/kernel_version/modules.pcimap.
Applies only to Linux systems with recent enough module tools.
-M Invoke bus mapping mode which performs a thorough scan of all
PCI devices, including those behind misconfigured bridges, etc.
This option gives meaningful results only with a direct hardware
access mode, which usually requires root privileges. Please
note that the bus mapper only scans PCI domain 0.
--version
Shows lspci version. This option should be used stand-alone.
PCI access options
The PCI utilities use the PCI library to talk to PCI devices (see
pcilib(7) for details). You can use the following options to influence
its behavior:
-A <method>
The library supports a variety of methods to access the PCI
hardware. By default, it uses the first access method avail
able, but you can use this option to override this decision. See
-A help for a list of available methods and their descriptions.
-O <param>=<value>
The behavior of the library is controlled by several named
parameters. This option allows to set the value of any of the
parameters. Use -O help for a list of known parameters and their
default values.
-H1 Use direct hardware access via Intel configuration mechanism 1.
(This is a shorthand for -A intel-conf1.)
-H2 Use direct hardware access via Intel configuration mechanism 2.
(This is a shorthand for -A intel-conf2.)
-F <file>
Instead of accessing real hardware, read the list of devices and
values of their configuration registers from the given file pro
duced by an earlier run of lspci -x. This is very useful for
analysis of user-supplied bug reports, because you can display
the hardware configuration in any way you want without disturb
ing the user with requests for more dumps.
-G Increase debug level of the library.
MACHINE READABLE OUTPUT
If you intend to process the output of lspci automatically, please use
one of the machine-readable output formats (-m, -vm, -vmm) described in
this section. All other formats are likely to change between versions
of lspci.
All numbers are always printed in hexadecimal. If you want to process
numeric ID's instead of names, please add the -n switch.
Simple format (-m)
In the simple format, each device is described on a single line, which
is formatted as parameters suitable for passing to a shell script,
i.e., values separated by whitespaces, quoted and escaped if necessary.
Some of the arguments are positional: slot, class, vendor name, device
name, subsystem vendor name and subsystem name (the last two are empty
if the device has no subsystem); the remaining arguments are option-
like:
-rrev Revision number.
-pprogif
Programming interface.
The relative order of positional arguments and options is undefined.
New options can be added in future versions, but they will always have
a single argument not separated from the option by any spaces, so they
can be easily ignored if not recognized.
Verbose format (-vmm)
The verbose output is a sequence of records separated by blank lines.
Each record describes a single device by a sequence of lines, each line
containing a single `tag: value' pair. The tag and the value are sepa
rated by a single tab character. Neither the records nor the lines
within a record are in any particular order. Tags are case-sensitive.
The following tags are defined:
Slot The name of the slot where the device resides
([domain:]bus:device.function). This tag is always the first in
a record.
Class Name of the class.
Vendor Name of the vendor.
Device Name of the device.
SVendor
Name of the subsystem vendor (optional).
SDevice
Name of the subsystem (optional).
PhySlot
The physical slot where the device resides (optional, Linux
only).
Rev Revision number (optional).
ProgIf Programming interface (optional).
Driver Kernel driver currently handling the device (optional, Linux
only).
Module Kernel module reporting that it is capable of handling the
device (optional, Linux only).
New tags can be added in future versions, so you should silently ignore
any tags you don't recognize.
Backward-compatible verbose format (-vm)
In this mode, lspci tries to be perfectly compatible with its old ver
sions. It's almost the same as the regular verbose format, but the
Device tag is used for both the slot and the device name, so it occurs
twice in a single record. Please avoid using this format in any new
code.
FILES
/usr/share/misc/pci.ids
A list of all known PCI ID's (vendors, devices, classes and sub
classes). Maintained at http://pciids.sourceforge.net/, use the
update-pciids utility to download the most recent version.
/usr/share/misc/pci.ids.gz
If lspci is compiled with support for compression, this file is
tried before pci.ids.
~/.pciids-cache
All ID's found in the DNS query mode are cached in this file.
BUGS
Sometimes, lspci is not able to decode the configuration registers com
pletely. This usually happens when not enough documentation was avail
able to the authors. In such cases, it at least prints the > mark to
signal that there is potentially something more to say. If you know the
details, patches will be of course welcome.
Access to the extended configuration space is currently supported only
by the linux_sysfs back-end.
SEE ALSO
setpci(8), update-pciids(8), pcilib(7)
AUTHOR
The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.
pciutils-3.1.7 31 January 2010 lspci(8)
[/os/unix/commands]
permanent link
Sun, Nov 13, 2011 11:10 am
Mounting a USB Drive on a Linux System from the Command Line
If you need to manually mount a USB external drive, such as a flash
drive, from the command line, i.e., a shell prompt,
log into the root account for the system then issue the
dmesg
command feeding its results to
grep
and then use
tail
to get just the last line containing the word "SCSI", since if you just
plugged the device into the system, that last line likely contains the relevant
entry.
$ su - root
Password:
# dmesg | grep -i 'SCSI device' | tail --lines=1
SCSI device sdb: 7813120 512-byte hdwr sectors (4000 MB)
Since I know the flash drive I plugged into the system in this case is
a 4 GB drive, I know that sdb
is indeed the relevant drive
designator.
Alternatively you could look for the information in /var/log/messages
.
[root@example ~]# grep SCSI /var/log/messages | tail --lines=1
Nov 13 09:55:55 example kernel: SCSI device sdb: 7813120 512-byte hdwr secto
rs (4000 MB)
You can then use the information you obtained for the drive designator,
in this case sdb
to mount the drive. Note you might see other
"sd" designators, such as sda, sdc, sdd, etc., or "hd" designators, such as
hda, hdb, hdc, etc.
Use the mount
command to mount the drive to an
exising mount point, such as one beneath /mnt
or
/media
. Unless a directory already exists that you
wish to use, you could create a directory which you will use to
access the contents of the USB drive. Let's suppose you want to use
myusb
for that directory; you then need to create the
directory.
Presuming the file system on the flash drive is vfat, I could use the
command below to mount the device at the mount point /media/myusb
.
You need to spcify the file system type with the -t
option.
Note: I use sdb1
rather than just the designator sdb
,
since I want to mount the first and, in this case, only partition, on the
flash drive. The
VFAT file system is a commonly used one for flash and other USB drives. It
is a Microsoft created file system that allows the use of file names longer
than an 8 character file name with a 3 character extension.
[root@example ~]# mount -t vfat /dev/sdb1 /media/myusb
I can then issue the mount
command again without any parameters
to verify the drive is mounted.
[root@example ~]# mount | grep sdb
/dev/sdb1 on /media/myusb type vfat (rw)
The rw
on the output shows me that the drive is mounted
in read/write mode rather than read only (ro) mode, so I could write to
the drive as well as read from it.
You should then be able to access the drive using /media/myusb
,
or whatever you used for the path designator.
[root@frostdragon ~]# ls /media/myusb
aoss.txt definitions
When you are finished with the drive, you should unmount it using the
umount
command prior to removing it from the system. You can
also remove the directory you created for mounting it using the rmdir
command, unless you will use that same directory for mounting it or
other drives in the future.
[root@example ~]# umount /media/myusb
[root@example ~]# rmdir /media/myusb
References:
-
VFAT
Wikipedia, the free encyclopedia
-
How to Mount USB flash drive from Command Line
Date: December 1, 2007
Linux Commando
[/os/unix/linux]
permanent link
Sun, Nov 13, 2011 10:46 am
lsusb
To see a list of all USB devices connected to a Linux computer, use the
lsusb
command.
# lsusb
Bus 005 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 001 Device 002: ID 0781:5530 SanDisk Corp.
Bus 001 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Note: if you type lsusb
and get a "command not found" message,
the command may not be in your path. It may be in /sbin
, so
try specifying the path /sbin/lsusb
.
To see more details on the USB devices attached to the system, use
lsusb -v
. If you don't specify a particular device you
are interested in, you will get quite a bit of information. To restrict
the information to a particular device, e.g., the SanDisk flash drive
in the list above, you can specify a device and bus number, e.g., bus 001
and device number 002 in the above case, using the -s
option.
# lsusb -v -s 1:2
Bus 001 Device 002: ID 0781:5530 SanDisk Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0781 SanDisk Corp.
idProduct 0x5530
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
MaxPower 200mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
can't get device qualifier: Connection timed out
can't get debug descriptor: Connection timed out
If you move the USB device to another USB port on the system, you will
see the bus number and device number combination change.
# lsusb
Bus 005 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 001 Device 007: ID 0781:5530 SanDisk Corp.
Bus 001 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
The full list of options for the command is shown below.
# lsusb -h
lsusb: invalid option -- h
Usage: lsusb [options]...
List USB devices
-v, --verbose
Increase verbosity (show descriptors)
-s [[bus]:][devnum]
Show only devices with specified device and/or
bus numbers (in decimal)
-d vendor:[product]
Show only devices with the specified vendor and
product ID numbers (in hexadecimal)
-D device
Selects which device lsusb will examine
-t
Dump the physical USB device hierarchy as a tree
-V, --version
Show version of program
References:
-
Linux / Unix Command: lsusb
Linux Operating System and Linux Distributions
[/os/unix/commands]
permanent link
Sun, Nov 13, 2011 10:45 am
PC Tools Alternate Opeating System Scanner (AOSS) version 2.0.5
PC Tools free
Alternate Operating System Scanner allows you to boot a Microsoft
Windows system with an alternate operating system on a CD. You can then
scan the system for viruses from the CD, though I've found the utilitity
of its anti-virus scanner to be very limited.
When I tried the virus scanning feature on a Dell Dimension 4550 PC that
had Windows XP Home installed on the hard drive, the scanner didn't seem to be
very effective, completing the scan in only 8 seconds and checking only
738 files out of the hundreds of thousands of files that existed on the
Windows partition of the hard drive I scanned.
Total malware files: | 0 |
Total files: | 738 |
Scan time: | 8 seconds |
The CD comes with a file manager that will allow you to access directories
and files on your Microsoft Windows partitions on the hard drive.
It also has "Disk Detonator", which will allow you to destroy partitions
on the hard drive, if you wish.
You can get a
shell prompt by choosing "System Shell" from the main menu, which will
give you an ash shell
provided via BusyBox, but
the AOSS CD is lacking in standard Linux command line utilities.
There is no scp nor ftp for transferring files over the network to another
system. There is no links nor lynx one might use to access a web server to
download or upload files. Wget and curl are also missing as are the standard
network utilities such as ifconfig and netstat.
When I checked the contents of /proc/version
, I saw that
AOSS uses Ubuntu GNU/Linux for the
operating system.
Linux version 2.6.39.4 (www-data@steve-aoss-ubuntu) (gcc version 4.4.1 (Ubuntu 4
.4.1-4ubuntu9) ) #1 SMP PREEMPT Mon Oct 31 11:26:05 EST 2011
References:
-
Bootable Antivirus and AntiSpyware Software AOSS | PC Tools
Free AntiVirus & AntiSpyware Software | PC Tools
-
PC Tools Alternative Operating System AOS Freware Virus Scanner
Date: May 27, 2010
Free Antivirus Help Blog |
Your source for the latest antivirus news and antivirus reviews
[/security/antivirus/pctools]
permanent link
Sat, Nov 12, 2011 1:49 pm
Avira AntiVir Rescue System 3.7.16
The antivirus vendor Avira offers a free rescue CD which allows you to boot
a system that runs Microsoft Windows from a Linux rescue CD that contains
Avira's antivirus software. The Avira AntiVir Rescue System can be used
in cases where a system is so badly infected it won't boot into Microsoft
Windows properly or when the system runs abysmally slowly due to malware
present on the system.
The Avira AntiVir Rescue System v3.7.16 uses
ISOLINUX to boot from
the CD. It appears to be based on
Debian GNU/Linux judging by
the contents of /etc/proc/version
.
root@RescueSystem:/# cat /proc/version
Linux version 2.6.35.1 (cgossenberger@lx-i386-gc236) (gcc version 4.1.2 20061115
(prerelease) (Debian 4.1.1-21)) #1 SMP Thu Aug 12 13:33:53 CEST 2010
At the
AntiVir Rescue System download page, you can download an iso file from
which you can burn a CD, if you already have CD burning software that can write
ISO files to CDs, or you can download an exe file from the Avira download page
and use it to create a bootable rescue CD containing the Avira antivirus
software.
When I scanned a system with an Avira AntiVir Rescue System CD today, which
I had previously scanned with 5 other rescue CDs and 3 antivirus/antispyware
programs within Microsoft Windows, the Avira antivirus software still
found 2 remaining infected files.
Avira / Linux Version 1.9.152.0
Statistics:
Directories...........: 15710
Archives..............: 3143
Files...............: 312237
Infected...........: 2
Renamed...........: 2
Warnings............: 3
Suspicious..........: 0
Infection.............: 2
Avira puts a .vir extension on infected files it renames. So if an
infected file was named badfile.avi, when it is renamed it will be
badfile.avi.vir.
When the scan completed, I saved the results of the scan in
rescue-system_scan.log, which I was able to transfer to another
system with scp.
You can get a
shell prompt by hitting Ctrl-Alt-F2 or selecting
"Miscellaneous" from the
GUI
interface and then selecting "Command line". You can return to the GUI
interface by hitting Alt-F7.
I hit Ctrl-Alt-F2 to get a shell prompt and used scp to transfer
the log file to another system.
[/security/antivirus/avira]
permanent link
Fri, Nov 11, 2011 10:35 pm
AVG GNU/Linux Rescue CD
The
AVG Rescue GNU/Linux (ARL) CD can be used to boot a
Microsoft Windows system outside of Windows and scan it for malware.
The software is free from
AVG,
a company that produces antivirus software for Microsoft Windows systems.
[ More Info ]
[/security/antivirus/avg/rescue-cd]
permanent link
Fri, Nov 11, 2011 2:04 pm
Creating a tar file from a list of files
If you wish to create a
tar file
using a text file which contains the list of files to be archived, you can do so
using the
xargs command.
$ cat filenames.txt | xargs tar -cvf allfiles.tar
If the list of file names contains spaces in file names or in the directory
paths, you should put double quotes at the beginning and end of each line
before you run the tar command, which you can do with the
sed command.
$ sed -i 's/^/"/' filenames.txt
$ sed -i 's/$/"/' filenames.txt
[/os/unix/commands]
permanent link
Sun, Oct 16, 2011 10:42 pm
Backing Up a MySQL Database
The
mysqldump command can be used to backup a
MySQL database.
The mysqldump command will write its output, which consists of SQL statements
that can be used to recreate the database, to standard output by default;
you can use
> filename
to redirect its output to a file.
The format of the command to backup one or more databases is
mysqldump --databases db1 db2 db3 > outputfile.sql
where
db1
,
db2
, etc. are the names of the databases
you wish to back up and
outputfile.sql
is the name of the output
file to which the dababase will be dumped.. The
--databases
option causes all names on the command line to be treated as database
names. Without this option, mysqldump treats the first name as a database
name and those following as table names.
# mysqldump -p --databases partsdb > partsdb-20111016.sql
Enter password:
In the above example, the -p
option causes mysql to prompt
for the mysql account password with the username assumed to be the same as
the login name for the account from which you are running the command.
If you wish to specify the username, use --user=user_name
or
-u user_name
.
If you want to back up all databases you can use the command
mysqldump --all-databases > dump.sql
to back up all databases
to which the account has access on the system to a file named dump.sql
in this case.
A dump file can be used in several ways:
-
As a backup to enable data recovery in case of data loss.
-
As a source of data for setting up replication slaves.
-
As a source of data for experimentation:
An example script to dump mysql databases to a gzip file which will be
transferred to another server via SSH for safekeeping can be found at
How to have a rock solid Linux backup without pro budget. Placing
your dump file on another system ensures you don't lose your data should
the system on which your databases reside suffer a hard drive crash or some
other catastrophe.
References:
-
6.4.1. Dumping Data in SQL Format with mysqldump
MySQL :: Developer Zone
-
6.4. Using mysqldump for Backups
MySQL :: Developer Zone
-
How to have a rock solid Linux backup without pro budget
documentation planet
[/software/database/mysql]
permanent link
Tue, Oct 04, 2011 5:12 pm
Determining Image Info Under Mac OS X
If you need to determine information about an image file from the
command line on a Mac OS X system, you can use the
file
command.
If you wanted information about all of the .jpg and .png files in
a directory, you could use the command file *.png *.jpg
$ file *.png *.jpg
upgrade-windows-grayed.png: PNG image, 256 x 256, 8-bit/color RGBA, non-interlaced
Vista_Install_Type_Product_Key.jpg: JPEG image data, JFIF standard 1.01
For some image files, the file
command will show the
image dimensions. The command will reveal the actual image type, even if
a file has been given the wrong extension as shown below.
$ cp Vista_Install_Type_Product_Key.jpg test.png
$ file test.png
test.png: JPEG image data, JFIF standard 1.01
Another useful utility for determining the dimensions of an image file
is sips
. You can use the -g pixelHeight
and
-g pixelWidth
options to obtain the dimensions of an image.
$ sips -g pixelHeight -g pixelWidth example.jpg
/Users/jsmith/Documents/example.jpg
pixelHeight: 600
pixelWidth: 800
References:
-
Get the dimensions of most images from the command line UNIX
Date: December 1, 2003
Mac OS X Hints
[/os/os-x]
permanent link
Sat, Oct 01, 2011 8:20 pm
JavaScript and Cascading (CSS) Style Sheets
Cascading Style Sheets are the
dominant style sheet language used now for enhancing the formatting and layout
of HTML web pages, but there was also a shortlived alternative known as
JavaScript Style
Sheets (JSS) or (JSSS).
CSS provides adds additional capabilities for controlling the appearance of
web pages and provides a mechanism for separating webpage content from web
page design to allow a uniform look for webpages throughout a site.
[ More Info ]
[/network/web/html/css]
permanent link
Sun, Sep 25, 2011 9:25 pm
List Installed Programs
I needed to produce a list of programs installed on a Microsoft Windows system
to send to someone else so she could check it for no longer
needed programs and tell me which ones are no longer needed, so I could
remove them to free disk space. Bill James has a
VBScript script,
InstalledPrograms.vbs
, which can be run from a command line,
which prompts for the name of the system to check via a popup window,
as shown below:
After that prompt, you are asked whether you wish to view the results
produced by the program as shown below.
The list of installed programs is stored in a file that
has the name of the system on which it is run followed by
an underline, then the date in mmddyyyy (month-date-year)
format, then another underscore followed by the time in military
time, i.e. 24-hour clock time, another underscore and then
"Software.txt". E.g. CRYSTAL_09252011_175147_Software.txt
for a file produced when the program was run on a system named Crystal
on September 25, 2011 at 5:51:47 PM. The file is stored in the directory
in which the script is run.
If you click on "yes" to view the results, the file produced by the program
will be opened in the default .txt file viewer, which, on Microsoft Windows
systems, will likely be Notepad.
An example output file can be seen
here.
The list is similar to the list of installed programs that you would see
by checking with "Add or Remove Programs" under the Control Panel.
It is obtained by querying the registry key
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
.
Download InstalledPrograms
References:
-
VBScript Tools by Bill James
BillsWay.com
-
VBScript
Wikipedia, the free encyclopedia
[/languages/vbs]
permanent link
Wed, Sep 21, 2011 10:40 pm
F-Secure 3.11 Rescue CD Scan of Compaq SR1900NX Windows XP PC
If I need to scan someone's Microsoft Windows system for malware, I
usually make a backup of the system outside of Windows, e.g., by booting
the system with a Norton Ghost 2003 boot CD and backing up the system
to an external USB drive. I then usually perform an initial scan of the
system using a rescue CD, such as the
F-Secure Rescue CD 3.11. Using a rescue CD can be especially helpful
if a system won't boot into Windows or runs abysmally slow because of
a malware infection.
In this instance I used the F-Secure Rescue CD 3.11 on a Compaq Presario
SR1900NX system running WIndows XP to perform an initial malware scan of
the system.
[ More Info ]
[/security/antivirus/f-secure]
permanent link
Mon, Sep 19, 2011 7:41 am
International Talk Like a Pirate Day
Ahoy, matey, don't forget today is
International
Talk Like a Pirate Day.
Who was the most successful pirate that ever lived? Not Edward Teach, aka
Blackbeard, nor
Captain Kidd nor
Calico Jack, nor
perhaps any other male pirate. That honor could arguably be given to
Ching Shih,
also known as Cheng I Sao, a female
pirate. Whereas Blackbeard was decapitated after losing a battle with
anti-pirate forces led by
Robert Maynard and Captain Kidd and Calico Jack, who gave us the
emblematic Jolly Roger
pirate flag, were hanged, Ching Shih died in
comfort of natural causes after a very successful career as a pirate.
In her heyday as a pirate, Ching Shih's Red Flag fleet numbered more than
1,500 ships and she controlled upwards of 80,000 sailors. She was able to
repel numerous attack by the Chinese navy as well as the many Portuguese and
British bounty hunters brought in to help capture her. Finally, in 1810, the
Chinese government tried a different tactic and offerred her amnesty if she
would give up the life of a pirate. She accepted and opened a gambling house.
She died of natural causes in 1844 at the age of 69, a successful
businesswoman and grandmother.
References:
-
Ching Shih
Wikipedia, the free encyclopedia
-
Most successful pirate was beautiful and tough
Date: August 27, 2007
Features Articles from CNN
-
Blackbeard
Wikipedia, the free encyclopedia
-
Robert Maynard
Wikipedia, the free encyclopedia
-
William Kidd
Wikipedia, the free encyclopedia
-
Calico Jack
Wikipedia, the free encyclopedia
-
Jolly Roger
Wikipedia, the free encyclopedia
[/news]
permanent link
Sun, Sep 18, 2011 6:15 pm
Extracting the Contents of a .bz2 File
To extract the contents of a
.bz2 file on a Linux or Unix system, such
as Solaris, you can use the
bunzip2
command.
bunzip2 file.bz2
The .bz2 file will be deleted when its contents are extracted. If you
wish to keep the original .bz2 file, you can use the -k
or
--keep
options.
-k --keep
Keep (don't delete) input files during compression or
decompression.
References:
-
File Extension .BZ2 Details
FilExt
-
Extract a bz2 or bzip2 file
By: qmchenry
Date: July 11, 2006
Tech-Recipes
-
Running Linux
By: Matt Welsh
Third Edition, Chapter 7, Archive and Compression Utilities, pages 184-187
[/os/unix/programs/utilities]
permanent link
Mon, Sep 12, 2011 9:25 pm
VM Preventing Disc From Ejecting
On a MacBook Pro laptop with the
OS X operating system,
I inserted a blank CD in the drive. When I opened
Disk Utility,
which is in the
Applications/Utilities folder, it reported
"This disc drive is busy. Please choose another one." The
Eject
option in
Disk Utility was grayed out. I tried ejecting
it with the
drutil
utility from a shell prompt, which you
can get by using the
Finder and selecting
Terminal in
the
Applications/Utilities folder, but that didn't work, either.
I was able to eject the CD by hitting the eject button at the top right
side of the keyboard (it is the one with an upward pointing triangle
with a horizontal line beneath it) on the MacBook Pro laptop. But when
I inserted that CD or another CD, I had the same issue. I finally realized
I had a Windows XP VMWare
Virtual
Machine (VM) running, which had control
of the CD-ROM drive. I no longer had the issue after
I shut down the VM. I was able to use the drutil eject
command
to eject the disc then and the eject function within Disk Utility
then worked as well.
References:
-
Another route to eject stubborn stuck CDs
Date: June 1, 2004
Mac OS X Hints
[/os/os-x]
permanent link
Sun, Sep 11, 2011 11:16 pm
Album Thumbnail Generator
I needed to generate thumbnail images for some photos my wife took that I
placed on the website, so I could send a webpage link to someone else so she
could view the pages rather than me sending all of the images to her by email.
I also needed a program to not only create the thumbnail images, but to create
a webpage indexing all of the thumbnails and providing links from the
thumbnails to the full-size images.
I was in a hurry and didn't want to spend a lot of time setting up
software to do that nor spend a lot of time doing it manually.
I thought I had installed an easy-to-use program on the system several years ago
to do just that for a friend who wanted to post pictures of storm damage to
his house, but I couldn't remember the name of the program nor how to access
it. After looking on the system for his photos, I saw that I had used
a Perl program,
Album
by David Ljung Madison. He also offers a number of other free scripts at
his MarginalHacks website.
There's an example of the output from his photo album generator
script at DavePics.
Once I realized where the album Perl script was placed on my system, I was
able to generate the thumbnails and associated HTML pages by just running
the script while my working directory was the one in which the photos were
located. E.g. /path_to_script/album
. An index.html page was
generated by the script containing all of the thumbnails, which are
placed in a tn
directory beneath the one containing the
images. Clicking on a thumbnail then brought up a webpage containing the
full-size image and navigation links to the additional images.
I thought I should make a note to my self here, so that if I forget the
name of the program again, I have this blog entry to remind me of its
name and how to use it to generate image thumbnails and webpages for
the images.
[/languages/perl]
permanent link
Sun, Sep 11, 2011 10:00 pm
Xubuntu
I sometimes use a
Ubuntu Linux
live CD for troubleshooting issues with Microsoft Windows systems, since
a live CD allows me to boot the system from a CD without loading the Microsoft
Windows operating system on the hard drive. Or when I'm working at a site
without my own laptop, a live CD allows me to boot a system at the site without
fear that a system may be potentially infected with malware that might perform
keystroke logging
or might otherwise be monitored by someone remotely unbeknownst to the system's
owner.
I created a
Ubuntu 11.04 Desktop edition
live CD for booting a system so that I could
check on files on the system which had Microsoft Windows XP Home edition on
the hard drive. The system's owner reported she was having problems with
the system and I wanted to start with a quick look at some of the files on
the system and make a backup of her "My Documents" folder. I needed to open
Firefox on the system to check on some information online, but whenever I
opened a second tab in Firefox to Amazon.com, Firefox would crash. It also
crashed with only one tab open when I used Ctrl-Alt-F2 to obtain
a shell prompt with an error message indicating that there was a problem
with inadequate memory.
The system had a 3.2 GHz processor, but only 512 MB of memory and the
system requirements for Ubuntu Desktop Edition 11.04 (Natty Narwhal) listed on
the Ubuntu site were as follows:
- 1 GHz x86 processor (Pentium 4 or better)
- 512 MiB of
system memory (RAM)
- 5 GB of hard-drive space
- Graphics card and monitor capable of 800x600
- Either a CD/DVD drive or a USB port (or both)
- Internet access is helpful
Since the system just met the minimum memory requirement for Ubuntu 11.04,
I decided to try
Xubuntu (pronounced "zoo-BOON-too"), instead. Xubuntu is a derivative of
Ubuntu, which uses the Xfce desktop environment, which requires less memory
than the
Unity desktop used by Ubuntu.
Xubuntu is a community developed, Ubuntu-based Linux operating
system that is well-suited for both laptops and desktops. It contains
all the applications you need - a web browser, document and spreadsheet
editing software, instant messaging and much more.
Minimum system requirements
You need 256 MB
RAM to run the Live CD or 256 MB
RAM to install. The Alternate Install CD only requires you to have 64 MB RAM at
install time.
To install Xubuntu with the standard installer (Ubiquity), you
need 4.4 GB of free space
on your hard disk. The Alternate Install CD only requires you to have 2 GB of
free space on your hard disk.
Once installed, Xubuntu can run with starting from 256 (or even
just 192) MB RAM, but it is strongly recommended to have at least
512 MB RAM.
I downloaded
Xubuntu 11.04 (Natty Narwhal). I burned it to a CD and rebooted the
system with it. I found that I didn't have any problems when I opened
multiple tabs in Firefox under Xubuntu.
References:
-
Homepage | Ubuntu
-
Ubuntu
Wikipedia, the free encyclopedia
-
Xubuntu Home Page | Xubuntu
-
Xubuntu
Wikipedia, the free encyclopedia
-
DistroWatch.com:
Xubuntu
DistroWatch.com: Put the fun back into computing. Use Linux, BSD.
-
Unity (user interface)
Wikipedia, the free encyclopedia
[/os/unix/linux/xubuntu]
permanent link
Sat, Sep 10, 2011 4:19 pm
Submitting a form with POST using cURL
I needed to submit a form on a webpage using cURL. The form submission
was using
POST
rather than GET. You can tell which method is being used
by examining the source code for a page containing a form. If POST is being
used, you will see it listed as the form method in the form tag as shown in
the example below. A form that uses GET, instead, would have "get" as the form
method.
<form method=post action=https://example.com/cgi-bin/SortDetail.pl>
You can use the -d
or --data
option with cURL
to use POST for a form submission.
-d/--data <data>
(HTTP) Sends the specified data in a POST request to the HTTP
server, in the same way that a browser does when a user has
filled in an HTML form and presses the submit button. This will
cause curl to pass the data to the server using the content-type
application/x-www-form-urlencoded. Compare to -F/--form.
-d/--data is the same as --data-ascii. To post data purely
binary, you should instead use the --data-binary option. To URL-
encode the value of a form field you may use --data-urlencode.
If any of these options is used more than once on the same com-
mand line, the data pieces specified will be merged together
with a separating &-symbol. Thus, using '-d name=daniel -d
skill=lousy' would generate a post chunk that looks like
'name=daniel&skill=lousy'.
If you start the data with the letter @, the rest should be a
file name to read the data from, or - if you want curl to read
the data from stdin. The contents of the file must already be
URL-encoded. Multiple files can also be specified. Posting data
from a file named 'foobar' would thus be done with --data @foo-
bar.
To submit the form using cURL, I used the following:
$ curl -u jsmith:SomePassword -d "Num=&Table=All&FY=&IP=&Project=&Service=&portNo=&result=request&display_number=Find+Requests" -o all.html https://example.com/cgi-bin/SortDetail.pl
In this case the website was password protected, so I had to use the
-u
option to submit a userid and password in the form
-u userid:password
. If you omit the :password
and just use -u userid
, then cURL will prompt you for the password.
So, if you want to store the cURL command in a script, such as a
Bash script,
but don't want to store the password in the script, you can simply omit the
:password
.
The -d
option provides the parameters required by the
form and the values for those parameters, which were as follows in
this case:
Parameter | Value |
Num | |
Table | All |
FY | |
IP | |
Project | |
Service | |
portNo | |
result | request |
display_number | Find+Requests |
The format for submitting values for parameters is
parameter=value
. Parameters are separated by an ampersand,
&
.
URLs can only be sent over the Internet using the
ASCII character-set.
Special non ASCII characters, which include the space
character must be represented with a %
followed by two
hexadecimal digits.
The space character can be represented by +
or by %20
. So, though the value for "display_number" is
"Find Requests", it needs to be sent as Find+Requests
or
Find%20
requests. You can see a list of other characters that
should be encoded at
URL Encoding.
In this case, I didn't need to specify values for many parameters in
the form, because I wanted the query to cover all potential values for
those parameters. So I can just use parameter=
and
then follow that with an &
to specify I am submitting the next
parameter in the list.
References:
-
cURL - Tutorial
cURL and libcurl
-
curl Examples
Linux Journal | Linux Tips
-
POST (HTTP)
Wikipedia, the free encyclopedia
-
The POST Method
James Marshall's Home Page
-
How to submit a form using PHP
HTML Form Guide - All about
web forms!
-
HTML URL Encoding
W3Schools Online Web Tutorials
-
URL Encoding
Bloo's Home Page
[/network/web/tools/curl]
permanent link
Fri, Sep 09, 2011 10:36 pm
Read It Later Firefox Addon
If you would like to be able to save webpages you come across for later reading,
if you are using Firefox, you can use the
Read It Later Add-on for Firefox.
[ More Info ]
[/network/web/browser/firefox/addons]
permanent link
Fri, Sep 09, 2011 10:26 pm
HttpFox Firefox Addon
If you need to observe the data flowing between a website and your
browser when you visit a website, if you are using Firefox, you
can use the
HttpFox Add-on for Firefox.
[ More Info ]
[/network/web/browser/firefox/addons]
permanent link
Thu, Sep 08, 2011 9:33 pm
Bash Calculator
If you need to do quick calculations on a system that provides the
Bash shell,
such as Linux or Mac OS X, you can perform calculations by
using the
echo
command and then using
$[
and
]
to enclose the arithmetic calculation, i.e.,
echo $[calculation to be performed]
. You can use the
standard
arithmetic operators of
+
for addition,
-
for subtraction,
*
for multiplication,
/
for
division, and
**
for exponentiation.
$ echo $[1+1]
2
$ echo $[9*90]
810
$ echo $[81/9]
9
$ echo $[2**3]
8
The standard
precedence for operators applies, i.e., multiplication
and division have precedence over addition and subtraction, so are performed
first, i.e., the calcuations are not simply done on a left to right basis.
$ echo $[2+3*4]
14
$ echo $[6-4/2]
4
This Bash calculator functionality even handles negative numbers
appropriately.
$ echo $[-4*5]
-20
$ echo $[-4*-5]
20
References:
-
When you need a quick & simple calculator in Bash...
TinyApps.Org, small is beautiful
-
Bash (Unix shell)
Wikipedia, the free encyclopedia
[/os/unix/bash]
permanent link
Thu, Sep 08, 2011 9:25 pm
Retrieving Password Protected Webpages Using HTTPS With Curl
Mac OS X
systems come with the
curl command
line tool which provides the capability to retrieve web pages from a
shell
prompt. To use the tool, using Finder on the system, you can go to
Applications,
Utilities and double-click on
Terminal
to obtain a shell prompt.
Curl is also available for a variety of other operating systems, including
DOS, Linux, and Windows. Versions for other operating systems can be obtained
from cURL - Download. If you
will be retrieving encrypted webpages using the HTTPs protocol, be sure
to get the binary version that includes
Secure Sockets
Layer (SSL) support.
A program with similar functionality is Wget, but that isn't
included by default with the current versions of the Mac OS X operating system.
On Mac OS X systems, curl is available in /usr/bin
and help on
the options for curl can be found using man curl
, curl -h
, curl --help
, and curl --manual
. An
online manual can be viewed at
cURL - Manual.
To retrieve a webpage that requires a userid and password for access
with curl using the HTTPS
protocol, you can use a command similar to the one below where userid
and password represent the userid and password required to access
that particular webpage.
curl -u userid:password https://example.com/somepage.html
If you don't want to include the password on the command line, you can
just specify the userid after the -u
; curl will then prompt
you for the password.
$ curl -u jsmith https://example.com/somepage.html
Enter host password for user 'jsmith':
If you wish to save the output in a file rather than have it go to stdout, i.e.,
rather than have it appear on the screen, you can use the
-o/--output filename
option where filename
is the name you wish to use for the output file. Curl will provide information
on the number of bytes downloaded and the time that it took to download a
webpage.
$ curl -u jsmith:somepassword -o somepage.html https://example.com/somepage.html
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 22924 0 22924 0 0 16308 0 --:--:-- 0:00:01 --:--:-- 26379
References:
-
cURL and libcurl
[/network/web/tools/curl]
permanent link
Mon, Aug 15, 2011 9:03 pm
Sun, Jul 31, 2011 11:27 pm
Nubert Required to be Run Under Administrator Account
I installed NuBert version 2011.07.06.2 from
Nucor Building Systems
from an administrator account on a user's PC running Windows 7 Professional
and entered the product key for the software.
I was able to start the software from the domain administrator or local
administrator account, but not the user's account, not even when I
temporarily put the user's account in the domain users group. Putting
the product code in when prompted to do so when the software was
run under the user's account did not lead to the software running.
It would simply terminate after the code was entered and the next time
it was run I would be prompted for the code again.
In the registry, I found the following key associated with the software:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Nucor
When I right-clicked on the subkeys and checked their permissions,
I saw that user accounts had read permissions for them.
I used Microsoft's free
Process
Monitor utiltity to check the file access and registry access
of the NBS.NuBert.Bootstrapper.Loader.exe
process when
it was run from the domain administrator account and from the user's
account. I noticed that when it was run from the administrator's account,
it was accessing the directory
C:\Users\Administrator\AppData\Local\Nucor_Building_Systems
.
I copied that directory to
C:\Users\useracct\AppData\Local\Nucor_Building_Systems
where useracct was the user's account name.
For the administrator account the following files were in the
directory:
DefaultPerisssions
NuBertTreelistLayout
PermissionMetadata
There was also a directory with a name that began with
NBS.BERT.HostEnvironment._Url_
followed by a very long
string of digits and letters. There was a directory named
2011.7.7.1
within it and a file named
user.config
within that directory.
For the users account, the following files were the only ones initially
in the Nucor_Building_Systems
directory:
DefaultPerisssions
PermissionMetadata
I copied the directory and all of the files from the
Nucor_Building_Systems
folder under the administrators
account into the same one under the user's account, replacing the files
already there.
I logged off the administrator's account and tested again from
the user's account. Again, I was prompted for the product key, however.
I then logged into the administrator's account again. I right-clicked
on the NuBert
shortcut on the desktop, chose Properties
then clicked on the Advanced button under the Shortcut tab.
Run as administrator was grayed out, so I could not select it.
So, from the administrator account,
I created a new shortcut on the desktop that pointed to
"C:\Program Files (x86)\NBS\BERT\NBS.NuBert.Bootstrapper.Loader.exe"
. I right-clicked on the NuBert
shortcut on the desktop,
chose Properties then clicked on the Advanced button under
the Shortcut tab. I then checked Run as administrator and
clicked on OK.
I then clicked on the Security tab, clicked
on the Edit button and added Domain Users
, since the
user logs into a domain account. I then clicked on OK to close the
Properties window for the shortcut. I then copied the shortcut
from the domain administrator's desktop to the user's desktop at
C:\Users\useracct\Desktop
, where useracct is
the username for the user's account.
Then when the user clicked on the shortcut, he would be prompted for a
user name and password. I had him put in pcname\administrator,
where pcname was the name of his computer,
as the user name to use the local administrator account for his PC and the
password for that account. I also created a .cmd file with just the following
command in it and put a shortcut to it on his desktop as well:
runas /user:administrator "C:\Program Files (x86)\NBS\BERT\NBS.NuBert.Bootstrapper.Loader.exe
That would allow him to just put in the password for the local administrator
account to save him a small amount of typing, if he preferred using it to
the other shortcut.
Of course, running the software under the local administrator account
is a poor solution, due to the security
implications, but the only one I could get to work. Why do some software
developers seemingly assume that their software will be run from an
account with administrator privileges or that a system won't even employ the
very minimum of security measures?
[/os/windows/software/misc]
permanent link
Sun, Jul 31, 2011 7:02 pm
Removal of SMF Links Directory Lite Package
I deleted the
SMF Links Directory Lite 1.0 mod from a
Simple Machines Forum (SMF)
forum. When I went through the uninstall
process, there were two failures for the ./Sources/ManagePermissions.php
file.
For the first failure, the uninstall process was looking for
the following:
$groupLevels['global']['standard'] = array_merge($groupLevels['global']['restrict'], array(
'links_manage',
'links_view',
'links_add',
'edit_links',
'delete_links',
'links_auto_approve',
'links_comment',
'links_view_comments',
It would replace that code with the following:
$groupLevels['global']['standard'] = array_merge($groupLevels['global']['restrict'], array(
Since intervening code had been placed after the first line, I manually
removed the lines that would have been removed.
The code that was there was as follows:
$groupLevels['global']['standard'] = array_merge($groupLevels['global']['restrict'], array(
'reason_edit',
'links_manage',
'links_view',
'links_add',
'edit_links',
'delete_links',
'links_auto_approve',
'links_comment',
'links_view_comments',
For the next test that failed, the uninstall process was looking for
the following code:
$context['non_guest_permissions'] = array(
'links_manage',
'links_auto_approve',
'edit_links',
'delete_links',
It was to be replaced with the following:
$context['non_guest_permissions'] = array(
What was actully there was the following:
$context['non_guest_permissions'] = array(
// SMFPacks Shoutbox -->
'shoutbox_post',
'shoutbox_edit',
'shoutbox_delete',
'shoutbox_prune',
'shoutbox_ban',
// <-- SMFPacks Shoutbox
'reason_edit',
'links_manage',
'links_auto_approve',
'edit_links',
'delete_links',
'httpBL_free_pass',
'delete_replies',
'karma_edit',
I removed the "links" lines manually.
For the third test on the file, which succeeded, the uninstall process
was looking for the following code:
$permissionList = array(
'membergroup' => array(
'links_manage' => array(false, 'links', 'links'),
'links_view' => array(false, 'links', 'links'),
'links_add' => array(false, 'links', 'links'),
'edit_links' => array(false, 'links', 'links'),
'delete_links' => array(false, 'links', 'links'),
'links_auto_approve' => array(false, 'links', 'links'),
'links_comment' => array(false, 'links', 'links'),
'links_view_comments' => array(false, 'links', 'links'),
It would be replaced with the following:
$permissionList = array(
'membergroup' => array(
What was actually in the file was the following:
$permissionList = array(
'membergroup' => array(
'links_manage' => array(false, 'links', 'links'),
'links_view' => array(false, 'links', 'links'),
'links_add' => array(false, 'links', 'links'),
'edit_links' => array(false, 'links', 'links'),
'delete_links' => array(false, 'links', 'links'),
'links_auto_approve' => array(false, 'links', 'links'),
'links_comment' => array(false, 'links', 'links'),
'links_view_comments' => array(false, 'links', 'links'),
'view_contact' => array(false, 'general', 'view_basic_info'),
I clicked on Uninstall Now to uninstall the mod. After doing so,
I checked the area of the code which was to have a successful removal of the
mod's code. I saw the following:
$permissionList = array(
'membergroup' => array(
'view_contact' => array(false, 'general', 'view_basic_info'),
'smftrader_feedback' => array(false, 'smftrader', 'smftrader'),
After uninstalling the SMF Links
Directory Lite mod, I installed the
SMF
Links package. I had to remove some tables manually from the
forum database that had been placed there by the installation of
SMF Links Directory Lite, remove the SMF Links package and
reinstall it as explained at
SMF Links Package for SMF Forum
to get the new links package working.
[/network/web/forums/smf]
permanent link
Sun, Jul 31, 2011 2:37 pm
Sun, Jul 31, 2011 2:34 pm
Configuration Steps to Take After Installing SMF Forum
These are some steps I commonly take after installing a
Simple Machines Forum (SMF)
forum.
- Configure the forum for "search engine friendly URLs" by clicking
on Admin, Features and Options, Configuration,
and then checking the box next to "Search engine friendly URLs", which is
supported on Apache and Lighthttpd webservers, and then clicking on
Save to save the settings.
[/network/web/forums/smf]
permanent link
Sat, Jul 23, 2011 9:23 pm
Show Warnings in MySQL
You can use the
SHOW WARNINGS
statement in MySQL to show
the error, warning, and note messages that resulted from the last
statement that generated messages in the current session. It shows nothing
if the last statement used a table and generated no messages. (That is, a
statement that uses a table but generates no messages clears the message
list.) Statements that do not use tables and do not generate messages
have no effect on the message list.
For example, if I issue the statement DROP TABLE IF EXISTS
smf_testing
statement as below, I see a notice that 0 rows were
affected, but there was 1 warning. To see the warning, I can immediately
afterwards issue the statement SHOW WARNINGS
. I see that the
warning was simply indicating that the table I asked be dropped, didn't
actually exist.
mysql> DROP TABLE IF EXISTS smf_testing;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> SHOW WARNINGS;
+-------+------+-----------------------------+
| Level | Code | Message |
+-------+------+-----------------------------+
| Note | 1051 | Unknown table 'smf_testing' |
+-------+------+-----------------------------+
1 row in set (0.00 sec)
mysql>
References:
-
12.4.5.41. SHOW WARNINGS Syntax
MySQL :: Developer Zone
[/software/database/mysql]
permanent link
Sun, Jul 17, 2011 8:41 pm
Making a Disk Image Under OS X
If you want to make a disk image for a disk drive with Mac OS X, you
can do so using the
Disk Utility application that comes
with the operating system. From the
Finder, go to
Applications/Utilities
. Double-click on
Disk Utility
to open the application. Then, from the left side of the window, select
the disk drive for which you wish to create a disk image by clicking on
it to select it.
Click on New Image at the top of the window. Choose where you
want to save the image. The default image format is "compressed" with no
encryption. You can choose from the following options:
- compressed
- read-only
- read-write
- DVD/CD master
- Choose "compressed" to save space.
- Choose "read only" to prevent the contents of the disk image from being
changed.
- Choose "read/write" to allow changes to the disk image.
- Choose "DVD/CD master" to create a disk image you can use to make copies on
DVD or CD discs.
A .dmg file will be
created for all but the DVD/CD master.
A .cdr file will be created
for a DVD/CD master. The CDR files are ISO images and, if moved to a PC, can
be renamed and burned as .iso
files.
References:
-
(Mac OS X 10.4): Creating a disk image
Apple
[/os/os-x]
permanent link
Fri, Jul 15, 2011 9:31 pm
SMF Links Directory Mod Bug
After installing the package
SMF Links Directory Lite version 1.0, which was last modified
on July 4, 2011, by
Nibogo on two
Simple Machines Forum (SMF) forums
for a family member, she reported that links entered
using the mod were not working. When I checked what was happening, I found
that when she entered URLs that contained upper-case letters, all of the
upper-case letters would be converted to
lower-case, whichh
wouldn't pose a problem if the URLs pointed to a website on a Windows
server, but would pose a problem if the webserver is a Unix, Linkx, or
Apple OS X system, since the case of letters is important on those systems,
i.e., A.html is not the same as a.html on those systems.
I
informed the developer, but since he didn't indicate he would correct
the problem in the package posted on the SMF website, I commented out the
line in Sources/LinksAdd.php
, which was performing the
conversion to lower-case. The code is in the following section.
// Check all the data
$context['name'] = htmlspecialchars($_REQUEST['name'], ENT_QUOTES);
$context['url'] = htmlspecialchars($_REQUEST['url'], ENT_QUOTES);
$context['url'] = strtolower($context['url']);
The strtolower($context['url'])
is the line that performs
the conversion. I commented it out by putting //
at the
beginning of the line.
[/network/web/forums/smf]
permanent link
Tue, Jul 12, 2011 10:35 pm
Checking SMART Hard Drive Status under OS X
If you wish to check the health of a hard drive in a system, there is a
disk monitoring capability commonly present in hard drives today called
S.M.A.R.T.
( Self-Monitoring, Analysis and Reporting Technology; sometimes written as
SMART). Information provided by SMART can provide an indication whether a
disk drive is experiencing problems and may be likely to fail in the near
future.
With Mac OS X systems, you can check the S.M.A.R.T. status of a hard drive
from the command line using the diskutil
command.
$ diskutil info disk0 | grep SMART
SMART Status: Failing
If the system has just one hard drive, the drive is generally designated
as disk0
. You can use diskutil list
to see the
drive numbers for drives in the system.
$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *298.1 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS lledit 297.8 Gi disk0s2
In the above case, the command shows that disk0
is the only
drive in the system.
You can also check the SMART status of a drive using the
Disk Utility application, which can be found with the
Finder under Applications/Utilities.
References:
-
10.3: Get hard disk SMART status from the command line UNIX
Date: November 28, 2003
Mac OS X Hints
[/os/os-x]
permanent link
Sun, Jul 10, 2011 10:30 pm
Changing Smileys from Post form to Popup
To change smileys on a
Simple Machines
Forum (SMF) from "Post form" to "Popup", you can take the following steps:
- Click on Admin.
- Select Forum.
- Select Smileys and Message Icons.
- Select Edit Smileys.
You will then see a table of smileys with the smiley itself in the far-left
column followed by columns titled "Code", "Filename", "Location", "Tooltip or
description", and "Modify".
You can change the location from "Post form" to "Popup" by clicking on
Modify and then changing the location. There are three options for
location: Post form, Popup, and Hidden.
In the database there is a table, smf_smileys, if you used the default
prefix of "smf" for tables created within the database. It has the following
fields, i.e., columns:
id_smiley
code
filename
description
smiley_row
smiley_order
hidden
The hidden field is where information is stored about whether the value
of location is post form, popup, or hidden. If the value is "Post form", then
a 0 is stored in the field. If it is "Hidden" then a 1 is stored in the field.
If it is "Popup", then a 2 is stored in the Hidden field for that
particular' smiley's entry in the smiley table.
Text | Number |
Post form | 0 |
Hidden | 1 |
Popup | 2 |
If you can directly access the tables in the database from a command prompt,
e.g., by running mysql at a command prompt, or can issue
Structured Query Language (SQL)
statements through software such as
phpMyAdmin, you can update the value for a range of smileys simultaneously.
E.g. if I wanted to update those smileys with smiley_id between
768 and 778 to change the location from "post form" to
"Popup", which is represented by a "2" in the Hidden field of the
table, I could change the value using the
SQL statement below, assuming the database itself is called "myforum":
UPDATE myforum.smf_smileys
SET hidden =
'2'
WHERE smf_smileys.id_smiley
BETWEEN
768
AND 778;
References:
-
MySQL BETWEEN Clause
TutorialsPoint.COM
[/network/web/forums/smf]
permanent link
Sat, Jul 09, 2011 6:08 pm
Copying Table Structure
If you want to create a new table in an MySQL database that has the same
structure, i.e., the same fields (columns) as an existing table, you can
use the command below:
create table New_Table like Existing_Table;
New_Table = the name you wish to give to the new table
Existing_Table = the name of the existing table
Remember to use the same case of letters for the existing table name as
were actually used for that table name. E.g., if the table name is
"Existing_Table" use "Existing_Table" not "existing_table"
[/software/database/mysql]
permanent link
Thu, Jul 07, 2011 10:34 pm
Tiny Portal Install Fail for Subs.php
When I attempted to install
TinyPortal 1.104 (listed as 1.0 RC2 on SMF site, but shows 1.104
when installed)
on an SMF 2.0 forum, the installation process indicated
Test failed for
./Sources/Subs.php
. When I checked the test that failed, I found it was looking for
'calendar' => array(
. I found that text in the file, so
I used a
hexadecimal editor to examine the
./Sources/Subs.php
file and compared it against the code for which the installation process was
looking.
Inside the TinyPortal1_RC2.zip
file is a
package-info.xml
file that indicates what file will be used
for installing the mod on various versions of the SMF forum. For SMF 2.0
SMF\tinyportal200.mod
provides the instructions for installing
the mod. That file can be found by extracting the contents of the zip file or
it can be found in Packages/temp/SMF2
after you click on
Install Mod.
When I examined that file with the hexadecimal editor,
Freeware Hex Editor XVI32, I found there were three tab characters
(hexadecimal 09) occuring before 'calendar' => array(
. But
when I examined ./Sources/Subs.php
with a hexadecimal editor, I
found there was only one tab character present in that file. I inserted
two additional tab characters and was then able to install TinyPortal
without any of the installation tests failing.
References:
-
Installing TinyPortal 1.0 RC2 on SMF 2.0
MoonPoint Support
[/network/web/forums/smf]
permanent link
Sat, Jul 02, 2011 12:29 pm
Error 80040154: Signing in to Windows Live Messenger failed
When trying to use Windows Live Messenger,
A family member was getting the message "Error 80040154: Signing in to Windows
Live Messenger failed because the service is temporarily unavailable. Please
try again later." after I applied pending updates to Microsoft Windows.
The recommended solution provided at Microsoft's
Error 80040154: Signing in to Windows Live Messenger failed because the service
is temporarily unavailable. Please try again later., which was the page
that came up when I chose the help option, was to uninstall
Windows Live Essentials.
The system was running Windows 7, so I clicked on
Start,
Control Panel,
Programs and Features, and looked for
Windows
Live Essentials, but it wasn't there.
At
How to uninstall Windows Live Essentials, there was a suggestion to
try removing the program by running wlarp.exe
from
%programfiles%\Windows Live\Installer
, but, though that directory
existed, that file was not in it.
So I downloaded Windows Live Essentials 2011 from
Windows
Live Essentials 2011 - Download free Microsoft programs.
The file that was downloaded was wlsetup-web.exe
. When I
reinstalled the software using that file, the problem no longer existed.
[/network/chat/live_messenger]
permanent link
Fri, Jun 24, 2011 9:45 pm
Editing Settings.php to take SMF forum out of maintenance mode
When I logged into a Simple Machines
Forum (SMF) forum, I saw the message below:
Maintenance Mode
Okay faithful users...we're attempting to restore an older backup of the
database...news will be posted once we're back!
I needed to take it out of maintenance mode, but at
Settings.php file, I saw the following:
$maintenance
- Version: SMF 1.0+
- Default value: 0
Sets whether the
Forum is in maintenance mode or not.
Value Description
0 Maintainance mode
off. The
Forum can be used normally.
1 Maintainance mode on. Only administrators can use the
Forum as usual. Other users get a 'this
Forum is in maintenance mode' message. The database may still be
accessed for user authentication (so as to tell if the
Member is an administrator.)
2 Maintainance mode on, full force. Freezes the forum. No one
can access it, not even administrators. This setting will leave the database
untouched (as far as the SMF
Forum is concerned) but cannot be set from the administration center. This
setting is used by SMF's upgrade tool to ensure an undisturbed upgrade.
I looked at the Settings.php
file in the dorum directory for
SMF and saw the following:
########## Maintenance ##########
# Note: If $maintenance is set to 2, the forum will be unusable! Change it to
0 to fix it.
$maintenance = 2; # Set to 1 to enable Maintenance Mode, 2 to
make the forum untouchable. (you'll have to make it 0 again manually!)
When I changed the value for maintenance
from 2
to 0
, I was able to access the forum again.
[/network/web/forums/smf]
permanent link
Tue, Jun 21, 2011 11:32 pm
Installing TinyPortal 1.0 RC2 on SMF 2.0
When I attempted to install
TinyPortal
1.0 RC2 on an SMF 2.0 Gold forum, the installation process showed one of
the six installation tests for
./Sources/Subs.php
failing. The
one that failed was the following:
Code: (Find)
'calendar' => array(
Code: (Add Before)
'tpadmin' => array(
'title' => 'TinyPortal',
'href' => $scripturl . '?action=tpadmin',
'show' => TPcheckAdminAreas(),
'sub_buttons' => array(
),
),
'calendar' => array(
When I edited ./Sources/Subs.php
, I
saw the searched for code was in the file. When I used a
hexadecimal editor
to examine the file, I saw the following in Sources/Subs.php
:
) , LF TAB ' c a l e n d a r ' = > a r r a y ( LF LF TAB TAB TAB TAB '
29 2C 0A 09 27 63 61 6C 65 6E 64 61 72 27 20 3D 3E 20 61 72 72 61 79 28 0A 0A 09 09 09 09 27
Note: hex 09 represents the "tab" character
I looked at the package-info.xml
file that was inside
the zip file for installing TinyPortal, I found that the installation
process uses the SMF2/tinyportal200.mod
file to determine
what files to change during the installation. Note: when you start
the installation process with the SMF Package Manager, when you get
to the point where the installation process tells you whether installation
tests have failed or succeeded, you can find the extracted files from
the zip file you are installing in Packages/temp
. The temp
directory and its files will be deleted after the installion is completed.
That file instructs the
installation process to look for the following:
00000FB0 3C 73 65 61 72 63 68 20 66 6F 72 3E 0D 0A 09 09 <search for>....
00000FC0 09 27 63 61 6C 65 6E 64 61 72 27 20 3D 3E 20 61 .'calendar' => a
00000FD0 72 72 61 79 28 0D 0A 3C 2F 73 65 61 72 63 68 20 rray(..</search
I.e., the installation process looks for a CR, LF, then 3 tab characters
then 'calendar' => array(
. After the "(", the installation
process looks for a carriage return (CR), represented by hex 0D, character
followed by a new line, aka line feed (LF) character represented by hexadecimal 0A -
see ASCII Table and Description.
represented by hexadecimal 0A.
The system on which I was installing TinyPortal was a Linux system.
Linux, Mac OS X, and Microsoft Windows systems use different conventions
for marking the end of a line - see
OS X Line Endings for a discussion of the differences.
So the TinyPortal developers appear to be expecting the software to be
installed on a Windows system or did their development on a Windows system. Thus
the presence of the CRL LF in the SMF2/tinyportal200.mod
. But, the code actually present in the Subs.php
file was
what one normally finds for line endings on a Linux system, i.e., a LF
character, though actually two LF characters, one after the other in this case.
Looking at previously installed packages on the system, I saw that
one, Tagging
System for Topics 2.4.2 had modified Subs.php
. I could see by
going to the
webpage for the module on the SMF site and clicking on the
Parse button with 2.0
selected for Manual Install
Instructions for SMF that code near the 'calendar' => array
line had been modified.
Find: [Select]
Replace With: [Select]
'tags' => array(
'title' => $txt['smftags_menu'],
'href' => $scripturl . '?action=tags',
'show' => true,
'sub_buttons' => array(
),
),
'calendar' => array(
I thought I might uninstall it to see whether TinyPortal would install
without error, but when I tried uninstalling it, I saw errors for other
files for the uninstall tests. I saw errors for the following files:
./Sources/ManagePermissions.php
./Sources/Display.php
./Sources/Admin.php
The installation of other packages must have modified code the uninstall
process for
Tagging System For Topics was expecting to find.
So I didn't uninstall it.
Instead, I dealt with the problem by editing Subs.php
with
the
Freeware Hex Editor XVI32. I transferred the file to a Windows system
and edited it there adding the extra tabs and making the file match what
the installation process expected using XVI32, then transferred the file
back to the Linux system. When I then retried the install, I didn't see
any error messages.
References:
-
TinyPortal
SMF Customization - Simple
Marchines
-
TinyPortal Support -
Developer's site
-
ASCII Table and Description
-
OS X Line Endings
Date: March 2, 2010
MoonPoint Support
[/network/web/forums/smf]
permanent link
Sun, Jun 19, 2011 1:59 pm
Installing Enhanced About Page 0.01 on an SMF 2.0 Forum
When I attempted to install version 0.01 of the
Enhanced
About Page package on a
Simple
Machines Forum (SMF) with SMF 2.0 Gold installed, I had to first
configure the SMF Package Manager to emulate SMF 2.0 RC5, since that is
the last version for which the installation file,
package-info.xml
,
expects. When you select
Browse Packages, you will find an
Advanced link at the bottom of the page. If you click on that link
you can put
SMF 2.0 RC5
in the
Emulate Version field.
Click on
Apply to use the new value. After the package is installed,
you can click on the
Revert link underneath
Emulate Version
to set the version back to the actual installed version of SMF. Click on
Apply again.
But I also encountered another problem while installing the
Enhanced About Page module. The install process couldn't find the
code it was looking for in the index.php
file for the forum.
Code: (Find)
'who' => array('Who.php', 'Who'),
Code: (Replace)
'who' => array('Who.php', 'Who'),
'about' => array('EnhancedAboutPage.php','EnhancedAboutPage'),
The install process was indicating it couldn't find the code it was
looking for,
'who' => array('Who.php', 'Who'),
. If it found
that code, it would add the following on a line beneath it:
'about' => array('EnhancedAboutPage.php','EnhancedAboutPage'),
When I looked at the code in index.php
, I found
'who' => array('Who.php', 'Who'),
in the file. I had to examine
index.php
and install2.xml
with a
hexadecimal editor
to discern the cause of the problem, which was due to two tab characters
appearing at the end of the relevant line in the index.php
file
that the installation procedure for Enhanced About Page was not
expecting.
Within a zip file for a package, there is an package-info.xml
file that tells the SMF install process what versions of SMF are supported
by the package and which install files to use for particular versions of
the forum software. In this case package-info.xml
had a line
indicating that install2.xml
is to be used for installing
Enhanced About Page on an SMF 2.0 forum.
When I examined the code in install2.xml
, I found it was
instructing SMF's install process to look for the line above, but
telling the process that immediately after the ),
at the end of the
'who' => array('Who.php', 'Who'),
it should find a linefeed
character, i.e., the
hexadecimal character 0A (see Ascii
Table for a table that shows the hexadecimal codes associated with
ASCII characters).
But when I examined index.php
with a hexadecimal editor, I found
that there were two tab characters (hex 09) after the ),
at the
end of the line. The tab characters were followed by a linefeed (LF) character,
i.e., a hexadecimal 0A character.
index.php
( ' W h o . p h p ' , ' W h o ' ) , tab tab LF
28 27 57 68 6F 2E 70 68 70 27 2C 20 27 57 68 6F 27 29 2c 09 09 0A
In the index.php
file, I deleted everything after the ),
at the end of the line, so that the line terminated immediately after
those characters. When I retried the installation for the Enhanced
About Page, it then completed successfully with no errors reported for
any file.
[/network/web/forums/smf]
permanent link
Fri, Jun 17, 2011 4:22 pm
Switching from 1 line for entries to 2 lines in Quicken 2011
If you prefer a 2-line display for entries in your checking and savings
accounts in Quicken 2011 rather than the default 1-line display, you can
switch for each account by viewing that account in Quicken and then
clicking on the
Account Actions dropdown menu and selecting
Two-line Display, which appears beneath
Register Views and
Preferences. You can also use
Ctrl-2 as a shortcut to
toggle between the one-line and two-line displays. If you are in 1-line display
mode,
Ctrl-2 will switch you to 2-line display mode for entries and
if you are in 2-line display mode,
Ctrl-2 will switch you to
1-line display mode for entries in your accounts.
References:
-
register: how to change from 1 line view to 2 line view
Date: June 2, 2011
BeanSmart.com - accounting ideas
exchange
[/os/windows/software/financial]
permanent link
Sun, May 08, 2011 10:38 pm
VIP Services Status
If you check the VIP services status on a Juniper NetScreen firewall, such as the
NetScreen-5XP, through the web management interface, which you can do by selecting
Network > Interface > Edit > VIP/VIP Services, you will see a
column labelled "Status" to the right of the "Server IP" column that displays an
"OK" or "Down" status for each service. The status is obtained by pinging the
server IP address.
[/security/firewalls/netscreen]
permanent link
Sun, May 01, 2011 9:20 pm
Off-Topic BBC Tag Installation
I attempted to again install the
Off-Topic
BBC Tag mod by (Ha)
2. I had
previously used an update to the mod provided by
JD82, as described at
Off-Topic BBC Tag 1.1.2 Installation of SMF 2.0 RC5
to eliminate error messages for the
installation associated with the core files, but I was still
getting an error message related to its installation for the Bean
and Grassland Curve Variation themes on the system. Note: see
Re:
Off-Topic BBC Tag posting by JD82 on April 19, 2010 03:01:32 PM in
regards to the update needed for the mod.
The relevant files are as follows:
Theme | File |
Bean | ./Themes/Bean/css/index.css |
Grassland Curve Variation | ./Themes/greengrass1/css/index.css |
It would show one test for each file being successful, but the other one failing.
It would find the following code:
/* The "Quote:" and "Code:" header parts... */ .codeheader, .quoteheader { color: #666; font-size: x-small; font-weight: bold; padding: 0 0.3em; }
It wanted to make an "Add After" modification of adding the following:
/* The "Off-topic:" header part... */ .off-topicheader { color: #696969; text-decoration: none; font-style: normal; font-weight: bold; font-size: xx-small; line-height: 1.1em; }
For the other "Add After" modification it wanted to make, it was looking for the following:
/* A quote, perhaps from another post. */ blockquote.bbc_standard_quote, blockquote.bbc_alternate_quote { font-size: x-small; color: #000; line-height: 1.4em; background: url(../images/theme/quote.png) 0.1em 0.1em no-repeat; border-top: 2px solid #99A; border-bottom: 2px solid #99A; padding: 1.1em 1.4em; margin: 0.1em 0 0.3em 0; overflow: auto; }
It wanted to then add the following:
/* Silly users may go off-topic */ .off-topic { color: #444444; background-color: #dadde2; border: 1px dotted #696969; margin: 2px; padding: 2px; font-size: x-small; line-height: 1.2em; }
When I compared the code in the index.css
files with
what was being sought, I found that the only difference was in the
border-top
and border-bottom
solid color
values. The installation process was expecting to find #99A
,
but other values were actually present for the two themes. I edited the
index.css
file for each theme to replace the solid color
values with the ones that were expected. I then went to the Browse
Packages page again and clicked on the Install link for
the package. This time, I didn't see any error messages for the themes
and installed the package checking the option to install for the two
themes as well. After I had installed the package, I put the color values
back to what they had been for the themes.
E.g., for the Grassland Curve Variation theme, the relevant section of code was as follows:
/* A quote, perhaps from another post. */
blockquote.bbc_standard_quote, blockquote.bbc_alternate_quote
{
font-size: x-small;
color: #000;
line-height: 1.4em;
background: url(../images/theme/quote.png) 0.1em 0.1em no-repeat;
border-top: 2px solid #267F00;
border-bottom: 2px solid #267F00;
padding: 1.1em 1.4em;
margin: 0.1em 0 0.3em 0;
overflow: auto;
}
Theme | File | Actual Color | Expected Color |
Bean | ./Themes/Bean/css/index.css | #000 | #99A |
Grassland Curve Variation | ./Themes/greengrass1/css/index.css | #267F00 | #99A |
Note: When you start the installation process and get to the point
where you see the error messages for particular files, you can find the
changes that will be made by checking package-info.xml
. Look
in the install for=
sections for the relevant entry related
to the version of SMF you are using. In this case the file referenced
was off-topic_2_0_curve.xml
. Then look for search
position=
sections to see what code the installation process is
searching for in various files.
[/network/web/forums/smf]
permanent link
Sun, May 01, 2011 6:29 pm
Emulating a Prior SMF Version
Sometimes, when you are trying to install a
Simple Machines Forum (SMF) forum
package, the installation fails because the installation process is looking for
a specific version or versions of SMF. A zip file you download for a mod
has a
package-info.xml
file within it. That file may specify that
the installation is valid for specific versions of SMF. For instance a
package-info.xml file might have the following lines within it:
<install for="2.0 Beta 4, 2.0 RC1, 2.0 RC1-1, 2.0 RC1.2">
<modification>off-topic_2.0.xml</modification>
....
<install for="1.1 - 1.1.99">
<modification>off-topic_1.1.x.xml</modification>
So, if the version of SMF on the system is 1.1 to 1.1.99, then the
installation process will use the off-topic_1.1.x.xml
file
contained within the zip file. If the version of SMF is one of the 2.x versions
listed, then the installation process will use off-topic_2.0.xml
.
But if you have SMF 2.0 RC5, it doesn't know how to install the mod. In this
case, you could emulate 2.0 RC1.2 and, hopefully, still install the mod.
To emulate a prior version of SMF, click on the Advanced link
you will see at the bottom of the page displayed when you go to
Browse Packages. You will see an emulate version field. Put in
a version number that the package is expecting, e.g., if the version of
SMF on the systems is SMF 2.0 RC5, I may still be able to install a package
that was written to work with versions up to 2.0 RC1.2 by putting
SMF 2.0 RC1.2
in that field and clicking on Apply. After the
installation completes, go back and click on the Revert link
under Advanced on the Browse Packages page or put in the
actual version and then click on Apply. When you do so, you may
no longer see an Uninstall
option next to the package name;
to uninstall the package, you would have to emulate the prior version again.
If a mod, aka package, is looking for an earlier version of SMF than
what you have on the system, then you also don't see an Install
option listed next to the package, if you haven't yet installed the package.
All you see are the List Files
and Delete
options
next to the package name.
[/network/web/forums/smf]
permanent link
Sun, May 01, 2011 1:45 pm
Reply Button in All Posts
When trying to install the
Reply Button
in All Posts, also named "Reply Button In Every Post" by its author, mod
I encountered an error when I tried to install the mod on a
Simple Machines Forum (SMF) 2.0 RC5 forum.
The installation process couldn't find code it was looking for in
./Themes/default/Display.template.php
.
The installation process was looking for two pieces of code, one it found
and the other it could not find.
It found the following:
// Can they reply? Have they turned on quick reply?
It would perform an "Add Before" for the following code:
// Simple Reply Button if ($context['can_reply'] && !empty($options['display_quick_reply'])) echo ' <li><a href="#quickreply">', $respond_button, '</a></li>'; else echo ' <li><a href="', $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'], '">', $respond_button, '</a></li>';
But that was just a comment that would be added, so would have no bearing on
the reply button actually appearing on every post on the forum. To actually get
the reply button to appear on every forum posting, so that someone wouldn't have
to do a lot of scrolling to reply to a long thread, the installation process needed
to find the following code:
$reply_button = create_button('quote.gif', 'reply_quote', 'quote', 'align="middle"');
That wasn't actually in the file. I looked in the file and couldn't find
anything even close to the searched for code.
There is a
Support Topic page for the mod and at
Topic: Reply Button In Every Post, I fond a posting by
gbsothere on September 27, 2010 02:41:33 PM stating that one only need look
for "// Can they reply? Have they turned on quick reply?" and then add
the following before it:
// How about replying at any point?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<li class="reply_button"><a href="', $scripturl, '?action=post;reply=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], '" onclick="doReply(', $message['id'], ');">', $txt['reply'], '</a></li>';
I did so and then a reply button appeared on all posts. I proceeded with
the install process on the forum, despite the error message then, just so
the mod would show up in the list of installed mods.
[/network/web/forums/smf]
permanent link
Fri, Apr 22, 2011 2:11 pm
Changing your keychain password
If your Mac OS X keychain password does not match your login password, you will
be prompted for the keychain password when an application needs access to
the keychain and your keychain is locked.
You can change your keychain password at any time by the following
procedure.
-
Using the Finder, go to the Applications folder and then
look for the Keychain Access utility within the Utilities
folder beneath the Applications folder.
-
Double-click on Keychain Access to start the utility.
-
Click on login under Keychains to select that keychain.
-
Click on Edit and choose Change Password for Keychain "login"...
.
-
If the keychain is not already unlocked, you will be prompted to supply
the current keychain password. Enter it.
-
You will be prompted to "Enter a new password for the keychain "login." You
will need to enter the current password again and the new password you wish
to use. You must also type the new password a second time to verify it.
There is a bar that shows the strength of the password you have entered.
I.e., how likely the password is to be resistant to someone guessing it.
If you click on Password Strength, you can have the system
suggest a password for you. Make sure you pick a password that is not
weak, i.e., easily guessed. You should strive for a minimum of "good", if
not "excellent".
-
Click OK.
Note: this procedure applies to Mac OS X 10.5 and possibly other
versions of Mac OS X.
References:
-
Mac OS X 10.4 Help: Changing your keychain password
Apple - Support
-
Mac OS X 10.5 Help: Changing your keychain password
Apple - Support
[/os/os-x]
permanent link
Wed, Mar 30, 2011 11:59 pm
System Defender Infection
A user reported that annoying messages kept popping up on his sysetm
every few minutes from System Defender stating his system was infected.
When I checked his system, I found the
rogue
anti-spyware/anti-virus software named System Defender on the system.
I was able to remove it with
Malwarebytes' Anti-Malware, which has a free version of the software that
can be used to remove spyware and viruses. The commercial version will run
continually while the free version can be used to manually scan a system.
[More Info]
[/security/malware]
permanent link
Wed, Mar 30, 2011 7:37 pm
Determining File Location for an Alias
Aliases on a Mac OS X system are similar to shortcuts on a Microsoft
Windows system. Just as with Windows, you will see a small arrow at
the lower left side of an icon when it represents a shortcut/alias.
Unlike Microsoft Windows, however OS X will keep track of the location
of the original file associated with the alias, so that, if you move the
file, the alias still points to the file's current location.
If you need to see the location of a file to which an alias points,
right-click on the alias and choose Get Info. You will see
the location for the file it points to after Original.
If the original file has been deleted, when you click on the alias,
you will see a message indicating the alias could not be opened, because
the original item cannot be found. E.g., in the case of a missing
Parallels .pvm file, I saw the following:
You have the option to select Fix Alias, which will allow
you to search for the original file, but if it has been deleted and
can't be recovered from the trash, you won't be able to find it.
References:
-
How to Use Mac Aliases
Dummies.com
[/os/os-x]
permanent link
Sun, Mar 27, 2011 7:16 pm
Off-Topic BBC Tag 1.1.2 Installation of SMF 2.0 RC5
I tried to install the
Off-Topic BBC Tag 1.1.2 by
(Ha)2 on a
Simple Machines
Forum (SMF) version 2.0 RC5 forum. The installation process reported
errors for its testing, however.
Type | Action | Description |
Execute Modification | ./Themes/default/languages/Modifications.english.php | Test successful |
Execute Modification | ./Themes/default/languages/Modifications.swedish.php | Skipping file |
Execute Modification | ./Sources/Subs.php | Test failed |
Execute Modification | ./Sources/Subs-Editor.php | Test failed |
Execute Modification | ./Themes/default/style.css | File not found |
Extract tree | ./Themes/default/images | |
At
Re: Off-Topic BBC Tag, I found a poster, JD82,
had posted an update to the mod for 2.0 RC3. When I used the mod, when I clicked on Install Mod, I no longer saw any of the
errors that I had seen above. However, I did see errors under Install in Other Themes for other themes that were available on the forum.
Type | Action | Description |
Execute Modification | ./Themes/default/languages/Modifications.english.php | Test successful |
Execute Modification | ./Themes/default/languages/Modifications.swedish.php | Skipping file |
Execute Modification | ./Themes/default/languages/Modifications.italian-utf8.php | Skipping file |
Execute Modification | ./Sources/Subs.php | Test successful |
Execute Modification | ./Sources/Subs-Editor.php | Test successful |
Execute Modification | ./Themes/default/css/index.css | Test successful |
Extract tree | ./Themes/default/images | |
For each theme, I saw two "Test failed" entries for the file ./Themes/core/css/index.css
.
Examing package-info.xml
within
Off-topic_BBC_Tag_RC3.tar.gz
, I saw the following:
<install for="2.0 RC3 - 2.99.99.99">
<modification>off-topic_2_0_curve.xml</modification>
<require-dir name="images" destination="$themedir" />
<readme type="file" parsebbc="true">readme.txt</readme>
</install>
That showed me that for SMF 2.0 RC3 or later 2.x versions, the
installation process would use off-topic_2_0_curve.xml
.
Checking the code it was looking for by examing the
off-topic_2_0_curve.xml
file within the
Off-topic_BBC_Tag_RC3.tar.gz
, I saw the following:
<file name="$themedir/css/index.css">
<operation>
<search position="before"><![CDATA[/* The "Quote:" and "Code:" header parts... */
.codeheader, .quoteheader
{
color: #666;
font-size: x-small;
font-weight: bold;
padding: 0 0.3em;
}]]></search>
<add><![CDATA[/* The "Off-topic:" header part... */
.off-topicheader
{
color: #696969;
text-decoration: none;
font-style: normal;
font-weight: bold;
font-size: xx-small;
line-height: 1.1em;
}]]></add>
</operation>
<operation>
<search position="before"><![CDATA[/* A quote, perhaps from another post. */
blockquote.bbc_standard_quote, blockquote.bbc_alternate_quote
{
font-size: x-small;
color: #000;
line-height: 1.4em;
background: url(../images/theme/quote.png) 0.1em 0.1em no-repeat;
border-top: 2px solid #99A;
border-bottom: 2px solid #99A;
padding: 1.1em 1.4em;
margin: 0.1em 0 0.3em 0;
overflow: auto;
}]]></search>
<add><![CDATA[/* Silly users may go off-topic */
.off-topic
{
color: #444444;
background-color: #dadde2;
border: 1px dotted #696969;
margin: 2px;
padding: 2px;
[/network/web/forums/smf]
permanent link
Sun, Mar 27, 2011 5:08 pm
Fri, Mar 25, 2011 3:11 pm
Obfuscating Email Addresses
If you need to post an email address on a webpage, you should be aware
that there are automated programs used by spammers to search webpages throughout
the web looking for email addresses that they can use. There are a variety
of techniques one can use to obfuscate an email address placed on a webpage.
If you don't use one of them, it is highly likely that the amount of spam
sent to the email address you post will dramatically increase, if it isn't
already on spam distribution lists.
[More Info]
[/network/email/spam]
permanent link
Thu, Mar 24, 2011 9:02 pm
Adding a Logo
If you wish to add a logo or other image at the top of
Simple Machines Forum (SMF)
2.0 sites, you can do so easily by taking the following steps.
- Place the image on the server hosting your forum.
- Log into the forum using an administrator account.
- Under Admin, select Features and Options.
- Select Current Theme from the Configuration drop-down
menu you will see when you click on Configuration.
- In the Logo image URL field, put the location of the
graphics file you placed on the server. E.g., if the image was in a
directory named "graphics" that was one level up from the forum directory
itself, you could use something similar to
../graphics/logo.png
. Or you can use a URL, e.g.,
http://example.com/graphics/logo.png
.
- Click on the Save button.
The image should then appear in the upper left-hand corner of forum pages.
Clicking on it from somewhere within the forum should return a visitor to the
forum's home page.
[/network/web/forums/smf]
permanent link
Tue, Mar 22, 2011 10:47 pm
Dealing with an err-disabled port
I experienced a problem with a Cisco switch periodically putting one
port in an
err-disabled
state. After checking the port,
I found that I needed to configure the speed and duplex settings to
specific values rather than letting them be autonegotiated.
[ More Info ]
[/hardware/network/switch/cisco]
permanent link
Sun, Mar 06, 2011 9:35 pm
The Rules
Because
TinyPortal was already installed
on an SMF 2.0 RC5 forum, when I installed
The
Rules package, I had to manually edit
./Sources/Subs.php
after the installation, since TinyPortal had already modified the section
of code in that file that the installation process for
The Rules
package was looking for, the installation process coldn't find the exact
code for which it was looking. I had to manually add the code that would
have been inserted by the install process after the following code in
Subs.php
.
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
'tphelp' => array(
'title' => 'TinyPortal',
'href' => $scripturl . '?action=tpmod;sa=help',
'show' => true,
),
),
),
By going to the webpage for
The Rules and choosing "Manual Install Instructions for SMF", selecting
the version of SMF installed on the system and clicking on Parse,
I was able to see the code the installation process looks for and what
it would add after that code, if it could find it.
When the package is installed, the rules can be configured by
clicking on Admin, Features and Options, and then
clicking on Configuration and selecting Modification Settings
and The Rules within it.
[/network/web/forums/smf]
permanent link
Installing Ultimate Profile 0.9.1 on an SMF 2.0RC5 Forum
I encountered a problem when attempting to install
Ultimate Profile 0.9.1 on an
Simple Machines Forum (SMF) 2.0 RC5 forum. I received the error message
"The package you are trying to download or install is either corrupt or not
compatible with this version of SMF." I was able to resolve the problem
by configuring SMF to emulate version 2.0 RC4.
[
More Info ]
[/network/web/forums/smf]
permanent link
Sat, Mar 05, 2011 10:18 pm
Upgrading SMF From 1.1.x to 2.0
If you wish to upgrade a Simple Machines Forum (SMF) version 1.1.x forum to a
2.0 forum you can follow the instructions
here.
[/network/web/forums/smf]
permanent link
Sat, Mar 05, 2011 10:16 pm
Backing Up a Simple Machines Forum (SMF) database
If you wish to back up the database for a Simple Machines Forum 1.1.x or
2.0 forum, you can use the forum's built-in backup capability to download
a file to your system containing the neccessary
SQL instructiosn that would
allow you to rebuild the tables in the database associated with the forum
and restore the data in the database if needed.
[More Info]
[/network/web/forums/smf]
permanent link
Wed, Feb 16, 2011 10:44 pm
Adjusting Space Between Bullets and Text for PowerPoint 2008 for MAC
If there is no space between the bullet character and the text that goes
with the bullets, you can insert space between the bullets and the text
by takng the following steps when using Microsoft Powerpoint
®
2008 for Mac:
- Select all of the bulleted text on the slide.
- Choose Format
- Choose Paragraph
- For the vaule of Special, choose Hanging and then
put a value in the By field, e.g. 0.38.
- Click on OK.
[/os/os-x/software/office]
permanent link
Sun, Feb 13, 2011 10:34 pm
Using suexec to run PHP under a different account
I wanted to run PHP for some virtual hosts on a webserver using the
user's account for her websites that were handled in Apache's
httpd.conf
via virtual hosts. To do so, I used
use
suEXEC, but
it took me quite awhile to get it to work..
[ More Info ]
[/languages/php]
permanent link
Fri, Feb 11, 2011 9:12 pm
Whoami - How to determine the account under which PHP is running
If you need to determine the account under which PHP is running on
a web server, you can use the code below:
<?php
passthru("whoami");
?>
On a web server running Apache as the
web server software, you can expect this to be the same as the account
under which Apache is running, so you may see apache
as the
result. Or, if the system is using virtual hosts and suexec
, e.g.,
with an SuexecUserGroup
directive in Apache's
httpd.conf
file for the virtual host, then you may see the userid
associated with the website listed.
If you wish to see the user ID, group ID, and groups for the account under
which PHP is running, you can use the following code:
<?php
system("id -a");
?>
If PHP and Apache are running under the apache userid, you might see output
similar to the following:
uid=48(apache) gid=48(apache) groups=48(apache)
Reference:
-
How to find out what user PHP is running as
Date: December 13, 2007
PHP, MySQL and Affiliate Marketing Technology | davidmorison.com
[/languages/php]
permanent link
Tue, Jan 18, 2011 9:17 pm
Installing SMF 2.0
You can download the 2.0 version of the Simple Machines Forum
(SMF) software from
http://download.simplemachines.org/. After you've placed the
software on your server and extracted the files to an appropriate
directory (you can use
tar -zxvf smf_2-0-rc4_install.tar.gz
on a Linux system, if you downloaded the .tar.gz 2.0 RC4 file),
you can commence the installation process.
Next, point your browser to the name of the domain and the directory where the
forum software was extracted and put install.php
at the end of
the URL, e.g. http://www.example.com/forum/install.php
.
-
At the first step of the installation process a welcome screen appears.
You should see "We've completed some initial tests on your server and
everything appears to be in order. Simply click the "Continue" button below to
get started." Click on the Continue button.
-
The next step is the Writable Check. You will be informed
of which files should be writable. The installation script will attempt to
make the changes for you.
Some files need to be writable for SMF to work properly. This step allows you
to let the installer make them writable for you. However, in some cases it
won't work - in that case, please make the following files 777 (writable, 755
on some hosts):
* attachments
* avatars
* cache
* Packages
* Packages/installed.list
* Smileys
* Themes
* agreement.txt
* Settings.php
* Settings_bak.php
You will be prompted for the FTP userid and password. This installer
can connect via FTP to fix the files that need to be writable and are
not. If this doesn't work for you, you will have to go in manually
and make the files writable. Please note that this doesn't support SSL
right now.
The Install Path should be the relative path in relation
to the FTP login directory, e.g. public_html/forum
if you
created a forum
directory directly under your public HTML
directory.
Click on the Connect button.
-
You will next be prompted for the userid and password to connect to
the database where your SMF tables will be created. E.g., this could be
your MySQL userid and password, which might or might not be the same
as your FTP userid and password. You will also need to provide the
database name for your account and any table prefix you wish to use
for the forum. Keep in mind that if you wish to have multiple forums
supported by the database, you need to have a unique table prefix for
each one. Once you've completed the fields, click on Continue
.
-
At the Forum Settings screen, provide the name you
wish to use for the forum. The other default values may already be fine.
Change them, if not. Click on Continue.
- Next you should see the Populated Database screen and
something like the following:
Your settings have now been saved and the database has been populated with all
the data required to get your forum up and running. Summary of population:
- Created 63 tables.
- Inserted 779 rows.
Click on Continue
-
You will next be asked to create an administrator account for the forum.
You need to provide a username, password, and email address for the
account. You will need to provide the password that grants access to
your database as well (you need that before even installing SMF).
Click on Continue when you've completed the fields
on this page.
-
At the last step, you should see Congratulations,
the installation process is complete! Make sure you check
the box next to Click here to delete this install.php file now.
You don't want someone reinstalling your forum software.
Just checking the box will delete the file.
You can then access your forum, e.g.
http://example.com/forum
, if your domain name was
example.com
and you installed it in a directory named
forum
underneat your public HTML directory.
[/network/web/forums/smf]
permanent link
Sun, Jan 16, 2011 6:53 pm
SMF Packages Not Installing
On two
Simple Machines Forum (SMF)
forums, whenever I tried to install a package, I would see a message that
the package installed successfully, but whenever I checked
Installed
Packages, I would see "No mods currently installed".
I would click on Browse Packages, then click on Apply
Mod.
In some cases, if there was no forum/Packages/temp
directory,
I would see the message below:
An Error Has Occured!
You cannot download or install new packages because the Packages directory or
one of the files in it are not writable!
If I created the temp
directory and gave it permissions
of 777 with mkdir temp; chmod 777 temp
, I would be able
to click on Apply Mod and see the Installation Readme
page where I could click on Install Now. I would then see
a message that I would be redirected to the application's configuration page,
if it had one, but I would instead just be redirected to the forum's main page
or, if the package didn't have a configuration page, I would see the message
below:
Extracting Package
The package was installed successfully. You should now be able to use whatever
functionality it adds or changes; or not be able to use functionality it
removes.
But when I would check Installed Packages afterwards, the package
would never be there.
When I checked the Forum Error Log which is under the Admin
link for the forum, I would see lots of entries similar to the following:
fopen(/home/jdoe/example/forum/Sources/ManagePermissions.php) [function.fopen]: failed to open stream: Permission denied
File: /home/amy/www/moondreaming/forum/Sources/Subs-Package.php
Line: 1918
Some entries might have fclose
, copy
, or
gzwrite
instead of fopen
. E.g.,
2: gzwrite(): supplied argument is not a valid stream resource
File: /home/jdoe/example/forum/Sources/Subs-Package.php
Line: 2098
Under
Download Packages for
FTP Information Required,
I saw "To download packages, the Packages directory and files in it need to be
writable - and they are not currently. The package manager can use your FTP
information to fix this." I put in the FTP username, password, and forum
information. I replaced "/forum" with the full path to the forum in the
Local path to SMF field, e.g.,
"/home/jdoe/example/forum". The message went away when I tested the settings.
I was then able to select a package from beneath Browse Packages,
choose Apply Mod, then Install Now and then see the package
appear when I checked Installed Packages.
[/network/web/forums/smf]
permanent link
Sun, Jan 16, 2011 5:07 pm
Adding httpBL to Block Forum Spammers
There is a
Simple Machines Forum
(SMF) module,
MOD httpBL, that can help you combat forum spammers. This mod uses the
http:BL API from
Project Honey Pot to stop spammers from accesing your forum. The mod
is completely compatible with M-DVD's
MOD Stop
Spammer. You can have both mods installed or only one of them to stop the
spammers in your forum, but I would recommend you use both.
The developer of the httpBL module describes the differences between
the two modules as follows:
- MOD Stop Spammer checks
the database from Stop Forum Spam
while MOD httpBL checks the database from
Project Honey Pot. A lot of spammers are already in both databases,
but some spammers are only in one of them, so it won't be a bad idea
anyway to check both databases.
- MOD Stop Spammer cheks if the visitor is a spammer when
they try to register inside the forum while MOD httpBL
checks them as soon as they arrive to the forum and redirect them
to a file called warning.php making the whole site
invisible to them. This way even harvesters (robots that never
post in a forum, but search for email addresses to send them spam
later) and any other kind of malicious web robots cannot even see
any part of the site.
As recommended on the
httpBL mod webpage, you should read the well-written
tutorial prior to installing the module.
There are some steps you need to take prior to using the module as is
explained in the tutorial.
Once you've taken the above steps, you can install the
httpBL module the way you normally would install an SMF module.
E.g., you could take the following steps to install it after you
download
the httpBL module.
- Log into your SMF forum with an administrator account.
- Click on Admin.
- Click on Packages.
- Click on Download Packages.
- Under Upload a Package, click on the Browse button
to browse to where you've downloaded the module then click on the
Upload button once you've selected the zip file you downloaded.
- To the right of the module name, which is httpBL, you will
see an Apply Mod link; click on it.
- You will then see the installation readme file. Click on the
Install Now button at the bottom of the page. Provide the
password for the administrator account, if prompted. You should then
be taken to a forum webpage where you can configure http:BL. If
you need to reconfigure it later, you should see the option
Mod httpBL
listed under Members when you click
on Admin.
Note: if you aren't using the default theme, you may need to edit
index.template.php
manually as explained in the
tutorial.
[/network/web/forums/smf]
permanent link
Sat, Jan 15, 2011 9:22 pm
Upgrading SMF from Version 1.1.11 to 1.11.12
I was able to upgrade two
Simple Machines Forum (SMF) forums from version 1.1.11 to version 1.1.12
without problem, but encountered a problem with a third forum.
[ More Info ]
[/network/web/forums/smf]
permanent link
Privacy Policy
Contact