Items filtered by date: December 2015

This article is to help me remember the basic syntax of MySQL statements. It is as simple as that.

Select

SELECT *
FROM dbprefix_menu
WHERE menutype = 'main'
AND alias = 'com-projectfork'
LIMIT 0 , 30

SELECT * FROM dbprefix_menu WHERE menutype = 'main' AND alias = 'com-projectfork' LIMIT 0 , 30


SELECT * FROM `zims_categories` WHERE `extension` = 5 
SELECT * FROM `zims_categories` WHERE `extension` = "com_hwdmediashare" 
SELECT * FROM `zims_categories` WHERE `extension` = 'com_hwdmediashare'
SELECT * FROM `zims_categories` WHERE extension = 'com_hwdmediashare' 

Update

UPDATE `fcenb_k2_items`
        SET `created_by`=784
        WHERE `created_by`=43

UPDATE `fcenb_k2_items` SET `created_by`=784 WHERE `created_by`=43


UPDATE `fcenb_hwdms_media` SET `created_user_id`=784 WHERE `created_user_id`=43;
UPDATE `fcenb_hwdms_media` SET `modified_user_id`=784 WHERE `modified_user_id`=43;

Update wp_post_notification_emails SET gets_mail = '1' WHERE gets_mail = '0'
UPDATE zims_k2_categories SET access = '3';

Other

ALTER TABLE zims_pf_access_flags_tmp ENGINE=Innodb;
ALTER TABLE zims_pf_access_levels_tmp ENGINE=Innodb;
ALTER TABLE zims_pf_comments ENGINE=Innodb;

 Notes

  • MySQL processes each row in order from the beginning of the database for each statement.
  • All statements are row dependant.
  • i dont think that UPDATE/SELECT/ALTER etc.. have to be in capitals but it seems the convention
Published in MySQL
Sunday, 16 November 2014 00:00

Diagnose ADSL Dropping Out - Engineers Notes

These are my notes on some BT engineer visits that were scheduled to try and fix my constant broadband drop out. The signal to noise ration would completely drop at random times usually monday to friday and between 09.00 and 17.00 causing the broadband to go off. This is obviously something on our estate but after checking all of our kit and having a look around the small industrial estate for the source of the interference which we could not find, it was time to call BT to try and fix the problem.

First Visit

These notes were told to me by the reins engineer that came out the other day with gary

  • Copper pair should be at standard sin349

  • 612 mw/am is wavelenght bb runs at

  • wideband noise

  • tester 44b – BT reins checking kit with gain control to help get a direction on the signal

  • impulse noise – noise caused by reins interference

  • JBSU – tester kit used by BT (the one with the ADSL stuff in it)

  • impulse noise cout – scale for checking imuplse

  • white band noise (possibly wide band noise)

  • AC balance – the ability of the twisted pair to reject/prevent noise. Must test each cable seperately?

  • 60db is the minimum signal strength for a reins case, ours is 68db. 8Db over the limit. The higher the signal the better the quality fo the line

  • impule noise test

  • Dside, E side [premesis to box, box to exchange]

  • print out graph for engineer and leave on router

  • kitz.co.uk is run by a woman !!!

Second visit

gary and laurence

  • rf3 filter (small one) but better than normal

  • Line Filter 3a , double size filter, a lot more precise, excellent for sorting reins issues

  • when the line drops try a quiter line test and see if there is any crackling (use normal handset)

  • try a quite line test when the broadband modem is dialing up to se if any crackling

  • 621AM get a radio and see if there is any interferece at the time of the issue

  • put draytek back on so they can see the sync drop. They dont nessasarily see the PPP drop (ie plusnet router)

  • the guys tried both of their new filters which both caused crc error

Published in DSL / Broadband

I have Windows 7, when I upgraded all my outlook contacts transferred to Windows Live mail. I entered the pop 3 info for my comcast email account, I have never had to sign in for over a year. Now for some reason everytime I check my email, a  sign in window appears, the email still seems to work, maybe a little more sluggish but the sign in keeps popping up. How do I disable the sign in? If I wanted to get my hotmail mail I know I would need to sign in, but I use it just like I did my outlook account that is connected to Comcast email account.


To disable the sign in window, open Windows Live Mail and go to:
 
  • The Windows Live Mail drop-down menu icon (top left above 'Email Message' icon). 
  • Select 'Options', then click on 'Mail' from the selection offered.
  • In the mail 'Options' property pages, select the 'Connection' tab and click 'Stop Signing in' from the 'Connecting to Windows Live Services' section.
  • Click 'stop signing in' to any warning messages.
  • Click 'OK' to exit the 'Options' Property pages
Published in Microsoft Other
Sunday, 16 November 2014 00:00

Public DNS Servers

Here is my list of public DNS servers that offer faster DNS resolutions speeds, security by preventing successful DNS lookups of poisoned or malicous sites and some also offer control of what content is delivered.

ProviderIP addressesServices Offered
Quad9 9.9.9.9  
OpenDNS 208.67.222.222
208.67.220.220
Security, Monitoring, Filtering, Free
Google Public DNS 8.8.8.8
8.8.4.4
Uses threat intelligence from more than a dozen of the industry's leading cyber security companies to give a real-time perspective on what websites are safe and what sites are known to include malware or other threats.
Comodo Secure DNS 8.26.56.26
156.154.70.22
 
Norton Connectsafe 199.85.126.30
199.85.127.30
There are several levels of protection and are controlled by selecting a different set of DNS servers. Free for home use.
Level3 209.244.0.3
209.244.0.4
I have not verified these
FreeDNS 37.235.1.174
37.235.1.177
I have not verified these
ViperDNS 208.76.50.50
208.76.51.51
I have not verified these

Not Public

These might not be public but if you want to temporarily revert your settings locally on your PC and not network wide, these settings can save you a bit of time.

PlusNet
212.159.6.9
212.159.6.10

Links

Published in DNS

Most designers know about lists and occasionally want to center them, but when we apply center (style="text-align: center;"), the list does indeed centers but so do all the <li> items so the list will display as below.

  • Electrician in Kent
  • Electrician in Canterbury
  • Electrician in Dover
  • Electrician in Ashford

Solution

Now to those in the know there are some easy solutions to get the the list centered without loosing the left align of the <li> items, just like the examples below.

Table Method (Prefered Option)

This method is by far the easiest. The display: table; (Centered Table / Center Table) option treats the <ul> as a table. This has the affect of allowing it to be centered. This is not the same as display: block; as this method does not work.

<ul style="display: table; margin: 0 auto;">
    <li>Electrician in Kent</li>
    <li>Electrician in Canterbury</li>
    <li>Electrician in Dover</li>
    <li>Electrician in Ashford</li>
</ul>
  • Electrician in Kent
  • Electrician in Canterbury
  • Electrician in Dover
  • Electrician in Ashford

Static Width Method

This method requires you to set a fixed width for the <ul>. This has the downfall that you must figure out what size you want the <ul>, but you can use other width descriptors not just px. You should note that if you make the width too small the <li> items will span lines and if you make the width too large you will get whitespace. A width must be set otherwise the centering will not work.

<ul style="width: 165px; margin: 0 auto;">
    <li>Electrician in Kent</li>
    <li>Electrician in Canterbury</li>
    <li>Electrician in Dover</li>
    <li>Electrician in Ashford</li>
</ul>
  • Electrician in Kent
  • Electrician in Canterbury
  • Electrician in Dover
  • Electrician in Ashford

Further Notes

If you want to get rid of the left-side padding, thus genuinely centering the list, add to the <ul>

ul {padding-left: 0;}

If you want to remove the bullet points

ul {list-style: none;}
Published in HTML
Thursday, 13 November 2014 00:00

Clearing Floats

These are examples of hot to clear a float in different ways.

Clearing a Float with <div>

This is the standard way of clearing a float that works in all wysiwyg

<div style="clear: both;">&nbsp;</div>

Clearing a Float with <p>

This is another standard way of clearing a float that works in all wysiwyg. Sometimes it is better to use this in a wysiwyg as a <p> usually adds a gap below and above it.

<p style="clear: both;">&nbsp;</p>

 Clearing a Float with <span>

I have not really testest this. i am not sure this actually works because it is not a block element.

<span style="clear: both;"></span>  		- this seems wysiwyg (but does not clear)
<span style="clear: both;">&nbsp;</span> 	- this seems wysiwyg (but does not clear)

 Clearing a Float with <br>

a <br />  can be used to clear a float from within an <p> element (or <div>)

<br style="clear:both;" />   -  it gets removed
<br style="clear: both;">&nbsp;</br> - (tested at the end) it gets converted into <br style="clear: both;" />&nbsp;

 at the end, and note the escaped space, this prevents it from getting wiped by the wysiwyg

<li><br style="clear: both;" />&nbsp;</li>

WYSIWYG Notes

dont forget that empty tags will be removed, either give them an 'id' or put something in the tags to prevent removal

<div style="clear: both;">&nbsp;</div>
<p style="clear: both;">&nbsp;</p>
<br style="clear: both;">&nbsp;

With ID - not 100% tested
<div id="keep-me" style="clear: both;"></div>
<p id="keep-me" style="clear: both;"></p>
<br id="keep-me" style="clear: both;">
Published in HTML
Wednesday, 12 November 2014 00:00

Black background in JCE editor

When you open up JCE editor you see the following black background.

  • This does not occur when i use tinyMCe
  • Reset Editor Styling make no difference
  • jce 2.3.4.4, joomla 3.3.0 does not do it
    jce 2.4.2 joomla 3.3.0 does not do it
    jce 2.4.2 joomla 3.3.3 does not do it
  • browser makes no difference

 


Causes

  • JCE is possibly incorrectly loading CSS files

  • compressing of JS and CSS files in JCE editor causes this + set use Default.css in JCe configuration. this fixes it (not custom or template). it must be getting the html{} setting from a template and then when you comperesss it, JCE stores a cached version somewhere. turning the css and js compression of must purge its cache.

  • This black background can be template specific
  • Template JS and CSS compressors are causing issues
  • 3rd party JS and CSS compressors (not come across this yet but is a logical extension)
  • the template.css has a statement in setting the background for HTML or BODY

    html{
    	background-color:#000
    }

    or

    body{
    	background-color:#000
    }

Solutions

Make sure you disable your cache while trying to get this to work, especially in firefox where i disable cache using the Web Development Toolbar.

Disable CSS and JS compression in

  • JCE editor
  • your template
  • in any plugins that do these functions

You should be able to get away with just disabling CSS compression and once you identify the dodgy compressor you can turn the others back on.

Edit the template.css

the offending line in template.css might vary but it is most likely the following or similiar:

html {
	background-color: #000;
}

or

body {
	background-color: #000;
}

If you edit this template.css this will change the styling globaly and might affect the template as a whole, so this method should not used routinely

Add editor specific code to your template.css

you can add the following to your template.css file (not good to edit direct on template files) to overide this for the JCE editor only
i have not found any that works but you need to attack the BODY or HTML tag with a class similiar to .mceEditor only {add code here}

These will get removed if you upgrade the template, but are not hard to re-add.

Examples

.mceContentBody html {background: white !important;}

.mceContentBody {
height: 100%;
min-width: 90%;
padding: 5px;
background: white !important; // Add background here
color: red !important; // Add color here
}

Edit the Editor content.css

some of this is taken from the joomlashine forum thread i was involved in here.

The CSS file to edit is located here

components/com_jce/editor/tiny_mce/themes/advanced/skins/default/content.css

Option 1

Add this code into the content.css

.mceContentBody {
height: 100%;
min-width: 90%;
padding: 5px;
background: black !important; // Add background here
color: white !important; // Add color here
}

This code also does not affect fonts in a table.

Option 2

edit the 2 following sections (if the content.css is not minified, if it is! figure it out)

body,td,pre{color:#000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;margin:8px;}

body{background:#FFF;}

Option 3

At the very beginning of the content.css the HTML and BODY tags are reference

html,body{height:100%;}

change this to

html,body{height:100%; background-color: #FFF !important;}

This will change the background for both BODY and HTML style background setting to white

Also Try

  • in configuration 'Reset Editor Styling' which will force black writing on a white background amongst other things. This will not work for all templates. This option will only reset backgrounds based on BODY and not HTML . You should not use HTML to theme a site anyway.
  • de-select using template.css (from your template) as the styling css that is loaded by JCE. This is not a prefered options because you will loose some template specific styling.
Published in Extensions

If you get the following message, usually in firefox, and most likely just after you have installed a new SSL.

The OCSP server has no status for the certificate.

(Error code: sec_error_ocsp_unknown_cert)

the-ocsp-server-has-no-status-for-the-certificate-error-message

It is caused by a new service offered by the SSL companies and only supported by some browsers (firefox for one). It is a revocation service which the browser uses to check to see if a SSL certificate has been revoked. The reason why you get this after installing a new certificate is that the new certificate details need to be synced up with this service.

Some companies sync their data quicker than others.

In Firefox

This feature can be turned of in (options/advanced/cetificates/certificate validation)

Links
StartCom • View topic - Certificate OCSP Validation Failiure in Firefox - forum thread on startssl.com
How to resolve the ''The OCSP server has no status for the certificate'' error? - a work around

Published in SSL
Saturday, 05 July 2014 00:00

Get PC working after a failed update

This is a collection of my notes whilst i fixed a PC that would not boot after a failed update.

I am pretty sure the issue was down to reboot.xml and pending.xml, these needed to be altered toa llow the completion fo the update.


 

  • element not found when rebuilding the boot loader, possibly a winx86 x64 issue. ie not compatable
  • remove the other drivers, then rebuild the boot thing
  • if you get an error when using a 64 bit repair disk, try a 32bit disk, this sometimes will repair enough so you can then finish the repair with a win7 PE.
  • dont forget that the boot error with the 64 bit disk could be a memory configuration issue. also check windows installation failure issues in wiki as they will be related.


when running SFC

"there is a system repair pending which requires reboot to compltete. Restart windows and run SFC again."

read this - How to removing a pending update that is preventing a successful boot

read this - How to Perform an Offline System Integrity Verification

NB

  • the repair option on the hdd prompts for username and password where the one of the disk does not
  • disableds that auto repair thing, also if you hit esc quick it will cancell the scan.
  • ran sfc offline repair from the bootable dvd, not the hdd. maybe try this.

there was an update performed on 30/09/12 but all system restore before this are removed. this might be because of the several drive phils PC has, and then they got mixed up when recovery was run because of all the external drives. maybe this is wehere all his system restores are.


 

i replaced all the missing driver files on phils pc with ones of mine. this then stop taht issue but a 0x0000007B is not present.

windows crashes when loading classpnp.sys according to the netblo.log file

i am now trying ren classpnp.sys to classpnp.old and then run startup repair off the hdd. i rebooted the pc aswell because when i tried to run the startup repair immediately after renaming the file said there was no startup issues.


dism will only load the drivers into the driver store and not make them active.

i have also tried diosabling all usb and, ACHI - IDE - RAID setting to see if it would load as this is the usual  cause of the 0x0000007B issue


 

NB

  • This is issue might be caused by the location of the system reserved partition
  • try pulling all hardware
  • Look at dpinst for driver injection
  • when sfc run there were errors, cbs.log it appears an update has not finished. can this be removed.
  • ren classpnp.sys and then startup repair from hdd did not work, maybe retry sfc

the system reserved partition if present ,should be set to boot. if needed do set to boot and then re-run the startup repair, alternatively you can remove the system reserved partion by following the article (this partition is caused by there not being a ntfs partition selected on install or the selected parttion not having 4k cluster size)

  • try removing the reboot.xml in the winsxs folder. this can cause similiar issue tot he pending.xml. i am going to removve it and then try system restore again.
  • Windows 7: Cannot clear "System repair pending which requires reboot to complete" - this briefely exaplains on how to revert changes using the dsim manager
  • use diskpart method (article ) to properely select partiontons for offline repair. not 100% if this all works. ie c:\ c:\ rather that the system reserve being a different partion that need to be selected for the boot dir
  • when doing a bcdedit it will try and repair the boot sector on the active partiotn, so say your system reserve partition is not set as active but the windows partition by acident or not then the BCD will try and rebuild the boot files on the wrong partition and might cause it not to work. solution, make system reserved active and then rebuild bootsector
  • bcdedit works on the active partitions bootsecotr config files etc...
  • bootrec command to rebuild boot sector and rebuild bcd
  • be aware of the partitions and this sytem reserved partition. it might be better deleteing this and moving the boot files as per the article
  • dism /cleanup reapir thing didnt work
  • remove secondary disk while trying to fix
  • bcdedit  /store  c:\boot\bcd  /set  {bootmgr}  device  partition=C: did not fix 0x0000007b
  • turning trusted installer on before running offline sfc does nothing. the error is most likley a missin non windows system file
  • dont foget drive letter matters, make sure boot drive is C: etc
  • sometimes the system repair on the hdd will not locate the Os, so use the boot DVD

 

  • 7hd thing gets you to load drivers ans then adds the best one and can enable drivers
  • terabyte has a scripting language which can add the driver in to an offline install
  • use partition magic and stretch the partition to fill the gap and then delete and reload mbr, fixboot and delete teh BCD store

  • edit the bcdstore offiline on another computer. located usually c:\boot\bcd
  • if netlog file in windows is not created updated (delete file and see what happens when bootloggin enabled) this indicates that the drive is never mounted pointing to driver issue and 0x0000007b
  • loading windows in safe mode and watching which file crashews and then remove it. does not work as some are corrupt or absoulutely required.
  • install a fresh copy of windows and then copy the driver files from the standard install back in to phils install.
  • windows loader loads all drivers in c:\windows\system32\drivers alphabetically reguardless of any settings in the registry
Published in Windows Family
Saturday, 05 July 2014 00:00

Pendrive not showing label

you have a pendrive that works ok but will not show you its drive label in the my computer window but it does if you look at its properties.


Try these

  • uninstall microsoft AV my usb pendrive is now recognised as Kingston
  • formatting the pendrive allowed the name to be displayed again
Published in Hardware
Page 57 of 96