Web Thing
Error Code Stuff
PHP code doesn’t execute – shows in webpage
Had a situation where PHP code was no longer executing and was just appearing on
the page with attendant errors.
Specifically an error was caused by using the ?> short tag format rather
than format.
As it transpired later versions of PHP set the short tag format to OFF by default
so in the php.ini file the following line needed to be set –
short_open_tag = On
As a further trap for amateurs (as I am) I had installed a standard version of PHP
for Windows on my machine and this install of course wrote the \PHP folder into the
Windows Path so when I installed the PHP5 tailored for Abyss the Path remained incorrect.
The Abyss PHP installed into \PHP5 and didn’t update the Path so when my web app used PHP
it went to the \PHP folder and of course the php.ini file was still at default for the
short tag format.
Uninstalling the standard PHP fixed the problem since the web app then
used the \PHP5 folder that had the short tag set to ON.
Javascript Error - Uncaught Exception
The following error (using JS console) was encountered when using a mouseover function (NAV panel on the wanderinghippo web page) from a Mac.
Error: uncaught exception: [Exception... "Not enough arguments [nsIDOMWindowInternal.scroll]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: <unknown filename> :: onmouseover :: line 1" data: no]
Silly error really - the .js file that drives the NAV scrolling wasn't on the server.
This can also be caused with files that are in another subfolder and don't have a correct path (eg: javascript/whscroll.js specified rather than ../javascript/whscroll.js ).
javascript:open_window('wombat.html') broken
With Firefox 1.0 and a few versions prior I had a problem with
hyperlinks that would not open. This involved any link with using the
"javascript:open_window("wombat.html")"
function. I also found that FF intermittently wouldn't
launch and this was due to the firefox.exe still running as a process
despite the fact the app wasn't in use.
The source of the problem turned out to be a buggy extension (Open Java
Console) - when this was disabled and the browser restarted the links
worked fine. On closing the browser the firefox.exe closed down as it
should also.
Although the Open Java Console extension was 0.6 I downloaded a 0.6.1
version and this worked fine (interestingly the
"about" still shows 0.6 for the version)
Incidentally, quite a good site to test this is
HERE
Outlook.exe - ordinal not found error
... the ordinal 36 could not be located in the dynamic link library MAPI32.dll
This error pops up when clicking an email link on a website. This was on a system running XP with OE not installed. The mail client happens to be Mozilla Mail and the problem occurred when using Mozilla Firefox. The problem seems to occur when the browser being used is not set as the default browser (the default browser was Mozilla 1.6) with associated mail client.
Mouseover produces "missing ; before statement" error
This problem had me going for a while - a javascript image mouseover wasn't working, all I would get was an error "missing ; before statement" in the Javascript Console.
The result was I had used ) instead of } at the end of line 3 (need glasses....)
1 <td width="33%"><a href="flinks.html" img border="0"
2
onMouseOver="if(document.images){document.backpage.src=
'images/bbpon220w.gif'}"
3
onMouseOut="if(document.images){document.backpage.src=
'images/bbpoff220w.gif'}"
4 <img name="backpage" src="images/bbpoff220w.gif" alt="Goto Next Page" width="220" height="72" border="0"></a></td>
Gethostbyaddr() warning error on Hyperbook
Straight forward install but when an entry for the guestbook was submitted I got the error -
Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /home/wanderin/public_html/guestbook/index.php on line 1214
Everything worked OK but the Warning being displayed was annoying however.
To get around the issue an @ was placed in the failing line which in effect forces PHP to suppress the error codes.
$new_remotehost = @gethostbyaddr($new_ipaddress);

