Trouble Tips

Naturally, these tips are time-sensitive but most may still be valid or at least helpful. Check the "Page Body Last Modified" date at the bottom of this web page.

-3. PC won't boot
If there is no sound or activity from the PC, check to make sure it is
plugged in to a live socket and that the power supply switch (on the 
back of the PC), if there is one, is turned on.
If it says:
	Remove disks or other media
	Press any key to restart
You probably left an unbootable floppy, disk or flash drive or card 
plugged in and the BIOS is set to boot from that medium first.

Mostly on older systems:
The systems will not finish starting (i.e. startup freezes before 
completion) if there is a USB device plugged in.

If the BIOS posting halts and the operating systme (e.g. Windows, Linux)
never boots, remove all the USB plugs and try again.  Typically, I have
found that the USB devices which cause this problem are USB devices
that mount a digital (camera) memory card as a removable drive. It does not
seem to matter if the memory card is in the device or not. 

If there is no video but the fans are going, check that the monitor is
plugged into the back of the computer and that the monitor is turned on
and plugged in.  More tips about starting up at number 1. below.

-2. BIOS access
Most computers typically show which key to press to get to the BIOS (also 
called CMOS or Setup) where the hardware settings lie.  The newer computers
are so fast that you must already have pressed the key before it shows on
the screen.  You may have to restart a second or third time to catch the
opportunity.  On custom PCs, the key to press is often "Del" or "Delete"
but on commercial PCs (Dell, HP, Compaq, Gateway, E-Machine) the key may
be a function key like "F1".  Acer BIOS access can be had by simultaneously 
pressing ctrl-Alt-ESC during the power-up. Yes, you may need to read the
manual.  Use another computer or smart phone to find an online version.

-1. USB Mac Keyboards and USB PC keyboards (U.S.) are mostly compatible.
See number 39 near the end of this list for old PowerMacs.

0.  HTML - tooltips
To give an HTML item a tooltip (when holding cursor on an item, it will display a
tiny popup with a message) just add a title="<some message>" clause to the
(beginning) tag. If the tooltip does not work or if there is no appropriate tag
for the item (i.e. a specific word or phrase within a body of text) use the link
"anchor" tag with the href equal to '#': 

<a href="#bog" title="wet muddy ground too squishy to support a heavy

1. HARDWARE: POWER BUT NO POST: (posting is the writing during bootup)
power's on to everything, the pilot light, the fans, even the drives - but there's
no lights on the CD or floppy drives and there's no post and no beeps at all - the
screen does not power up. Everything appears to be hooked up correctly; the
monitor and video card are known to be good and hooked up correctly. 

DIAGNOSES: (1) the PS2 keyboard and mouse plugs are reversed (often a PC boots 
this way but neither keyboard or mouse will work and it may beep) -or-
	   (2) the video card is dead (usually elicits beeps of some kind from the
motherboard) -or-
	   (3) the monitor is dead (may not be detected by the video card or
motherboard) -or-
	   (2) the processor is dead (the disk light will not be flashing) -or-
	   (3) the motherboard is damaged	

Look to see if the hard drive is flashing in a non-repeating pattern - this
usually means that the processor and motherboard are OK.  To check the monitor,
try using the menu or adjustments on the front of the monitor.
If the monitor adjustments show a normal readable picture, the VGA interface on the
monitor could still be broken or the cable is unplugged or bad.
If the monitor shows a white dot in the center, or a line, either horizontal or
vertical, and these cannot be adjusted with the monitor controls, a video driver
circuit or two in the monitor is at fault in the monitor: the monitor is bad.

2. Windows XP Pro - after installing, cannot see security tab (missing) 
to change permissions: 

In an explorer window, go to the Tools menu, select Properties 
and click the view tab.
Scroll to the bottom of the list and UNcheck "use simple file sharing".
If this option is not listed, you may be using XP Home or XP Media.  
For the latter two, you may have to use the management console 
(for advanced users only.)

TIP:  Make sure you load all the Microsoft software you bought: 
go to the control panel, click Add/Remove Programs and after it fills up,
click on Add/Remove Windows Components.  It's on the left hand column
at the bottom of the list.  After the Windows Components window shows, 
go through the scrolled list and check everything.  If a check box is gray,
double-click the item to open it up and click all the boxes.  
When all the boxes are white and checked, click "next".  You may be
required to reboot and you may need to insert the recovery disk..

3. PHP - do not use "session_register('somevariable');" session_register() is
deprecated. Rather use

4. PHP or Javascript - "===" is true iff the operands not only have the 
same value but also have the same type. (getttype() is used to determine type.)

5. PHP - to create a database in mysql, use the SQL CREATE DATABASE statement
rather than the deprecated mysql_create_db() function.

6. mysql names: size, character set (mysql 5.x)

Identifier Maximum Length in bytes (2010) of	Allowed Characters
Database 64 	Any character allowed in a directory name, except '/', '\', or '.'
Table 	64 	Any character allowed in a filename, except '/', '\', or '.'
Column 	64 	All characters
Index 	64 	All characters
Alias 	255 	All characters

7. PHP - if there's no error detected and yet a file is not being written, then
it's probably because the file ownership, group and permissions are not all correct.

8. PHP - strings - escape character sequences for double-quoted strings:
    * \n - linefeed or newline (LF or 0x0A (10) in ASCII)
    * \r - carriage return (CR or 0x0D (13) in ASCII)
    * \t - horizontal tab (HT or 0x09 (9) in ASCII)
    * \\ - backslash
    * \$ - dollar sign
    * \" - double quote
    * \[0-7]{1,3} - a character in octal
    * \x[0-9A-Fa-f]{1,2} - a character in hexadecimal

9. PHP - strings - double-quoted strings - are string constants, BUT
	variable names are interpreted only on the first assignment of
	a double-quoted string.  Variable names within strings already stored
	in string variables are NOT interpreted when assigned to new string
	variables.  An escaped dollar sign, "\$" is never interpreted but 
	becomes a (single character) dollar sign character after assignment.
	A variable name immediately preceded by a backslash, "\", within a
	double-quoted string will NOT be replaced by contents of that variable.
	It also appears that two successive dollar signs, "$$", within double
	quotes will not be interpreted at all, i.e. they will both remain in the

10. PHP - there's a "@" pair, like parentheses, which return a variable of type
	"resource" from a mysql function call but I haven't yet figured out why or
	what to do with the resource or what is the structure of this specific
	resource type.  It appears that a single '@' in front of an IO command
	suppresses error messages that would otherwise be written to the HTML page.

11. PHP and MySQL - saving text data in the database: if you get a 1064 error,
	try using addslashes() before saving and then stripslashes when retrieving
	large text variables containing single and/or double quote characters.

12. MySQL - Accent marks, NOT single quotes, are used to identify field names. 
	Allfield names used in MySQL SQL statements must be "bracketed" by 
	ACCENT MARKS, not other punctuation. (The key is usually left of '1'.)
	Remember: field names are surrounded by a pair of ACCENT MARKS.

13. PHP - found this wiki comment on
cameron at prolifique dot com
11-Jun-2005 01:29
I use a custom PHP 404 page that does several things:

# Checks the database for a "virtual" page matching the missing page address, and
if found, includes and displays it, issuing an HTTP 200 OK status. The client
browser receives the page contents and never even knows that the page doesn't
actually exist on the server.

# Checks the database for a redirect from this missing page address to another
address, and if found, does the redirect by issuing an HTTP 302 Object Moved
status and Location header.

# Tries to fix common address errors, such as removing periods or extra slashes at
the end of the address, and then checks for a physical page with a matching
address, a virtual page with a matching address, or a redirect, and takes the
appropriate action.

# If all of the above fail, it simply shows a friendly "Page Not Found" error.

# In the case of redirects and genuine missing pages, the missing page address
(and the number of hits on it) is logged to the database. In the case of genuine
missing pages, an email is also sent to me so I can identify and fix broken links.

The "virtual" page behavior is perhaps the most useful, as it allows me to create
totally dynamic pages on the server but use static addresses for them.

However, on one particular server on which I used this system, my HTTP 200 header
wasn't getting sent correctly:

header("HTTP/1.1 200 OK");

Instead, the browser received a 404, and even if the virtual page content was
included and sent correctly (it was), IE showed its typical 404 error page instead
based on the status code (but only if "show friendly HTTP error messages" is
checked, which is not the default).

Finally found this note in an older or alternate version of the PHP manual (at

Note: In PHP 3, this only works when PHP is compiled as an Apache module. You can
achieve the same effect using the Status header.

header("Status: 404 Not Found");

Though our server uses PHP/4.3.10, I thought this was worth a try, so I tried
issuing both commands:

header("HTTP/1.1 200 OK");
header("Status: 200 OK");

And, in fact, it worked.

So if you find that using header("HTTP/1.1 ###") isn't working, try the
header("Status: ###") instead or as well.

14.  OS X Development or Enhancement:  to get applications, especially open
there are several tools that make things much easier: Fink, DarwinPorts, GentooOSx,
and pkgsrc.  Each has its own pros and cons.  Research them on the internet in the
formums, newsgroups and discussion groups.  We are currently using DarwinPorts and
find it is working but there is a start-up learning curve to get it running nicely.
To get an idea of what DarwinPorts requires to get running, see the Hula Mac OS X
installation at

15. It seems that google would not allow me service if I constantly
elected to see 50 returns but seldom used more than 4 or 5.  These are the URLs
that brought up the busy server page VERY consistently.

16. PHP - session_register() is deprecated because of security issues. The
configuration setting of the directive register_globals defaults to off since PHP
4.2.0.  You'll use _SERVER['DOCUMENT_ROOT'] instead of $DOCUMENT_ROOT,
$name=_GET[name] to get $name off the URL or $HOME=_ENV['HOME'] instead of

17. PHP templates - There are several (!) template engines available for PHP.
Here are some links:

"brands" are "smarty", "vlibTemplate","patTemplate", "FastTemplate", "PHPLib",

There are various arguments that are pro and con templates and template engines.

Discussions, URLs contributed to by Harry Fuecks:
OO to build a table "control":

Harry Fuecks on said:
The only technology which has anything to offer that PHP can't do a better job of
on it's own is XSLT. Using XSLT you could start with an XML file containing all
your content then transform it to HTML, WML, WDDX, XML-RPC or even SOAP (among

Software of interest by Michael Glazer:
PHPortal is a PHP replication of Zope.

While Xpc is a PHP replication of JSP.

XLST on the other hand is a means to create a common protocol across disparate
systems. Systems that have no common language, architecture or data model.
That is why you would need to be able to go from XML --&gt; HTML --&gt; 
WML and the

From Hobbit on

&lt;?= $title ?&gt;

foreach ($userNamesArray as $username)

foreach ($usersArray as $user)


18. PHP/MySQL/HTML/URLs and escaped characters in strings: For a MySQL queries et
al containing character that need to be escaped, don't use addslashes() but
mysql_real_escape_string().  For HTML output, convert the string with 
htmlspecialchars() or htmlentities().  To go in the opposite direction, from HTML
to an uncoded string, use functions such as html_entity_decode(), nl2br(),
urldecode(), get_html_translation_table().  To encode a URL to a form acceptable
to browsers and (Apache) servers, use urlencode().

19. PHP/MySQL: getting and parsing rows:
mysql_connect() - use this function to connect to the database
mysql_query(string query[, resource database_link]) - returns a resource from a
mysql_num_rows(resource myqueryreturn) - will reveal the number of rows returned
mysql_fetch_array() - changes return value of mysql_query into a an array of rows,
			each row is (in turn) an array of field/cell/column values.
mysql_result() - given a mysql_query(), returns the value of the first field in a
	specific row -or- a particular field/cell/column value in a specific row
	depending on the arguments.

20. PHP 4.3.11/Mac OS Tiger 10.4.4  Print_r bug
The php function print_r() generates a parse error when used as
$some_string = print_r($varname,TRUE);
This form is specified to work from PHP 4.3 forward but does not work in this
context.  Don't know if that is a bug introduced by zend but I don't appear to
have that extension installed.

21. Cookies - When setting cookies, protect them from being read on other servers
by setting the path and domain so that they cannot be accesses from other domains
or other paths within the same domain.

22. PHP - start and end tags:  Always use &lt;?php and ?&gt;.  
Avoid using &lt;? as a start tag.  
Pearl and many other 3rd party additions require the use of &lt;?php as the
start tag.

23. PHP - Warning: Cannot modify header information - headers already sent by
(output started at
/Library/WebServer/Documents/JON/com/presents/versionfixes.php:1) in
/Library/WebServer/Documents/presents/qasha/index.php on line 79:
a) This usually means that there is whitespace before or in the one of the php
tags of the first file mentioned (e.g. here that is versionfixes.php) The reason
is that php regards anything outside of the php tags ( &lt;?php, ?&gt; ) 
to be html and
the first html output will cause php to send the headers before any html.
b) setcookie() must be called before the headers are sent - that's on line 79 in
the second file mentioned in the warning message. 
c) Various code anomalies MAY cause the headers to be sent - I'm not clear on
whether this is the case - the versionfixes file mentioned is short and simple but
causes the problem.

24. PHP/HTML - if the method in a form is a php file, the full path and filename
must be given, otherwise there will be an error.  If the http daemon does not know
that the file is a php file, then the form variables will not be passed to the
method but there will be no other indication of a problem such as a warning or an

25. Apache restart (linux or Mac OS X)
sudo /System/Library/StartupItems/Apache/Apache restart
to fix permissions:
chmod go+r ~/Library

26. Javascript - FrameBuster
is the javascript code that will break your web page out of an HTML frame if it
linked into the frame by another site.  The javascript for this is simple and all
the internet for free, so you don't need to pay for it.  There are many
Here is one:

function breakOut()
	if(parent.frames.length != 0)"&lt;your URL&gt;";

function breakOut2() 
	if (self.parent.frames.length != 0)

27. Windows XP Pro - not enough memory (you must understand the XP register
structure to fix this!)
If you get complaints from your PC, especially running WinXP, when trying to mount
an (SMB) network shared
folder that there is not enough memory and you are sure that the workgroup and
permissions are good, then
the problem is probably on the PC serving up the shared folder. Using regedit, go


and click on the parameters hierarchy to expand it.  There should be a key called
"IRPStackSize" in the
list.  If there is not, add it as a doubleword.  The default value tends to be 11
decimal. Change it to 15 decimal or if you have at least 512MB, try 15 hex (= 23
decimal).  I have seen this problem arise after a hardware upgrade from a 32-bit
to a 64-bit processor and other situations which involved upgrades or updates.

28. PHP/HTML - checkbox in a form
Since a checkbox can be defaulted to on or off, the checkbox variable is set ONLY
if the box is checked.
Otherwise, the variable is not set.  In PHP, you must check to see if the variable
is unset to see if it
is left at the default value.

29. PHP - header problems

If you see the error that starts like this:

"Cannot modify header information - headers already sent by (output started at" .
. . 

then despair not.  The first page and line reference is the triggering code and
the second is the page and line that originally sent the headers.  It may not be
obvious why the headers were sent the first time.   Some versions of PHP do not
handle this very well.  Note that any actual output to the client page will cause
php to send the HTML headers beforehand.  Any HTML code (outside of the PHP tags),
or print, print_r or echo functions will cause the headers to be sent.

Here are the things to check:

a) Remove any existing whitespace outside of the PHP tags of the second refenece,
that's one that first sent headers.  While you are at it, you might want to check
the remainder of your PHP files as well.

b) Remove or disable any print, print_r, echo or fwrite, etc. statements that
write to standard out (the HTML page.)

c) If the above does not work, bracket the php code with ob_start() and
ob_end_clean() function calls immediately inside the php tags.  Some versions of
PHP appear to set the headers sent flag whenever ANY output is done, for instance,
a write to a file on the hard drive. Buffering the output and throwing it away
should fix this problem.

d) If the preceding does not work, go to the php.ini file and turn "output
buffering" On, then (stop and) restart Apache or the resident http daemon (e.g.
IIS) to make sure the php.ini file is read.

30.  HTML - open a new window - does this work or is it useful?
&lt;form method="post" target="myWindow"

31. Apache: mod_rewrite=on
From "Mod_rewrite allows you to rewrite a webpage's url on the fly, and
you can rewrite the url to almost anything. It has a lot of uses everything from
redirecting multiple WebPages to a new domain without actually changing the title,
to making dynamic pages appear static.

32. FIREFOX - fine tune the configuration
In the empty address bar type "about:config" without the quotes of course.
Go there. Double-click the line to change the value.

33. FIREFOX - Google & MapQuest maps won't load - are blank
Go to about:config by typing about:config in the address bar.
Change this parameter to false:

dom.disable_image_src_set   default boolean false

The setting below will reduce the occurrence of unfilled blocks within the map:

network.http.pipelining     default boolean false

34. Windows File Sharing Permissions
For a shared folder to be properly shared, set the following permissions
on the host computer:

For public read AND write access,
in the security tab set full control for CREATOR OWNER, SYSTEM, Administrators and
Everyone and THEN, in the command line interface (Start,Run,cmd) find the folder
and use the attrib command to remove the
read-only flag (it will still show in the properties General tab as  "grayed out"
or dim, but LAN users will be able to write to the folder.

For public read only access, follow the above with 2 exceptions:
Give Everyone only the necessary permissions to read and search
AND omit the attrib command. 

35. Legacy Macintosh SE
If your old SE can see no more 2MB of RAM no matter what memory you 
install, then completely remove or disable the jumper that is just above
the memory slots on the logic board (motherboard.)  The jumper, if there,
will probably have three (3) pins labeled "2/4M   1M" below it on the board.
Remove any jumper(s) to have all available memory.

36. Eudora 6.2.3 SMTP Relay 
Setting up SMTP Relay email in Eudora 6.2.3 (Mac OS X): 20061206
(this tip may also be applicable to other versions including windows)

This may be necessary in order to send SMTP email from a site that is not your
internet service connection provider or if you are sending email from work and
want the return address to be from another email service domain, e.g. return
address to be instead of

Two things must be set:
A.) In the settings, "Personality Extras" dialog, check 
"Use relay personality if defined"
b.) In the settings, "Sending Mail" dialog, set the "SMTP Relay Personality" in the
drop-down menu.

You may also need to set up SMTP Relay in your remote host or web site.

37. 20070721 - PHP 'include' verb causes "garbage" characters to show up 
at the left-hand side of your web page when using UTF-8 character set, for example:

Some say that you must change the character set to 
ASCII but my take on the solution is to (1) use "UTF-8, no BOM" in your editor,
and (2) use this header in the head section of your web page:

'http-equiv="content-type" content="text/html; charset=utf-8"'

just put it inside a 'meta' tag.  

It appears that part of the problem was conflicting character sets
in the header such as 

'http-equiv="content-type" content="text/html; charset=iso-8859-1' 

which is WRONG for UTF-8! I discovered that the 'garbage' characters 
are a byte-order code that tell some applications what the character 
encoding is, e.g. ASCII, ISO, UTF, 8-bit, 16-bit, etc.

The "garbage" characters are called a "BOM" or Byte Order Mark. 
[See the discussion at 
It's about PHP's session_start.]  Anyway, all I needed to do to be rid
of them is to change the encoding type in BBEDIT to "Unicode* UTF-8, no BOM"
and the problem goes away.  Whatever you are doing, make sure all your 
files have the same encoding, especially for web pages.  

If your web page loads source from more than one text file, all those text 
files should have the same encoding. BTW, if you choose ASCII, apparently no
BOM is sent (but you won't be able to use ISO codes for foreign languages.)

38. 20070806 - antidote/cure/remedy for skunk spray, possibly that used on 
MythBusters TV show:

o	1 US Quart (approximately 1 liter) of 3% hydrogen peroxide  (H2O2-3%)
o	1/4 cup (about 45 ml) of baking soda (Sodium BiCarbonate, NaHCO3)
o	1 teaspoon (about 5ml) of liquid (dish) soap (the type used in the sink, 
	NOT in a machine)

Skunks produce a stinky chemical, called a thiol similar to that used 
in natural gas  (methane, ethane, propane, butane) to give it an oder.  
The chemical used in gas is ethanethiol or ethyl mercaptan (archaic) 
and the chemical formula is CH5SH.  It's the sulfer atom that gives it
the oder! 
(Formerly I understood the chemical used was from methyl mercaptan, CH3SH

39.  You can use a PC keyboard in place of your old PowerMac USB keyboard!
You can replace your PowerMac USB keyboard with a Windows (PS2) keyboard by using
at a USB to PS/2 Adapter.  
As you might hope, the "Windows" key maps to the Mac "Command" key and the 
"alt" key maps to the Mac "Option" key or vice-versa. The rest of the key 
mappings are pretty much as expected.  

One unexpected bonus: the sleep key on my Microsoft (brand) keyboard is 
also a power down button for my old PowerMac (but it won't turn the PowerMac on!) 

You may lose the ability to open the CD-ROM tray. This can soThis can be worked 
around by using an aftermarket software
program that allows you to map the keyboard keys to computer functions. I use 
"Keyboard Maestro" from Stairways Software, Ltd. On my Logitech keyboard, the
marking for the command and option keys is reversed.  
but good ol' wikid-pedia showed me my error.)

To get to the Key Caps on Mac OS X Panther and Tiger:
System Preferences-->International-->Input Menu
At the bottom of the window, check
    x Show input menu in the menu bar
	-- this will immediately show your country flag in the menu bar at the top
	of your display.
In the languages window, check
    x Character Palette (optional but useful)
    x Keyboard Viewer
In the menu bar click on the country flag (USA for most) and select
	Show Keyboard Viewer
Hint: If you don't check "Keyboard Viewer" in the System Preferences language
window as indicated in step 2, you won't see the Keyboard Viewer selection
when clicking the country flag in the menu bar.

"no mountable file systems" error message when double-clicking .dmg files
[This seems to be fixed in Tiger - 10.4.x]
I found this to be the case on my dual cpu Panther some time after
installing Roxio Toast Titanium (6).  Cause? an Apple update or Toast?
I could not get the OS X (panther) disk utility (aka DiskImageMounter in 
the Get Info dialog) to mount any .dmg file.  I get the above message.  
However, browsing the internet for solutions, I found Roxio Toast mentioned 
several times as a solution. I couldn't see how this would make any sense
until, out of desparation, I started looking through the Toast menus -- and
there it was, under 
	Utilities-->Mount Disk Image...
It works, but not the way OS X did - the mounted image icon is a CD, as though
one had physically inserted a CD or DVD which uses the default CD icon.  At
first the icon is the mounted image icon (like a removable disk icon) then
almost immediately it changes into the CD icon. An upgrade to Tiger (10.4) 
made this problem go away.


kx Software Aesthetics

This web site is best viewed with FireFox, Chrome or Safari.

Valid XHTML 1.1 Valid CSS!