One cool tool for tidying up your HTML, as well as notifying you of coding errors is TIDY. For an overview of what TIDY can do for you see this overview. Installation is quite easy: root@srv-1 src # tar -xzf tidy*.tgz root@srv-1 src # cd tidy root@srv-1 tidy # ls Makefile Makefile.bcc32 Makefile.nmake Makefile.vc6 console […]
Tidy Up Your HTML
Programming With PHP – Part 3
In this article we will pass a parameter to a PHP script via a URL, and we will get a little more sophisticated in our conditionals and regular expressions. One problem with accepting parameters is that there are often security issues. It is very important to ensure that the parameters passed by the user conform […]
Parsing Web Logs Into Calendar Text/Stats
We aren’t quite happy with the web stats software we use. The information is not brief enough. Mostly, we want to see the last couple months, with the weekends visible, and the unique hosts and pages viewed. Also, we have a lot of content that gets snagged that isn’t really what we consider a valid […]
Apache Tip – Take Clues Away from Bad Guys
Like the needy stranger who tells us his or her entire life story on the occassion of our first meeting, Apache spews out way too much information in every HTTP header. And like the unscrupulous sharpies who take advantage of lonely folks they meet on buses, there are those who would use this information to […]
Having Fun With Forums and RedirectPermanent
One thing that is quite prevalent in forums is sharing images as postings or as avatars. We saw that our RoboCoop was getting some hits, and wondered what was up. Well, there is a forum that has a daily discussion in Texas here that had put up a link to the image of our chicken […]
Using Tab2space to Convert Tabs to Spaces in Source Code
We often need to convert source code into html format. We use the pre tag; however, the default tab values are to wide. For instance: this is one tab this is another If we were to put some of our funner source code up, it would push the right margin over too far. Well, we […]
Installing and Configuring the Java SDK
Grab the sdk from java.com. For us, we are going to install this on Lobstora, which is a GNU/Linux box. Just make the binary executable and run it: [root@srv-1 opt]# chmod 700 j2*.bin [root@srv-1 opt]# ./j2sdk-1_4_2_03-linux-i586.bin We like putting this in /opt with a symlink to j2sdk. [root@srv-1 opt]# ln -s j2sdk1.4.2_03 j2sdk [root@srv-1 opt]# […]
Installing Tomcat
Tomcat is part of the Apache Project. Tomcat, which is free and open-source, can serve up JavaServer Pages (JSP). For more info on this, see J2EE JavaServer Pages Technology. The JavaServer Pages FAQ is here. We were a bit lazy, and grabbed a binary from here. Make sure you have Java installed. We installed Java […]
Setting Joomla Directory Permissions
The main thing that needs to be changed during a Joomla install is the directory permissions. Here is a shot of the install application before fixing the permissions: administrator/backups Unwriteable administrator/components Unwriteable administrator/modules Unwriteable administrator/templates Unwriteable cache Unwriteable components Unwriteable images Unwriteable images/banners Unwriteable images/stories Unwriteable language Unwriteable mambots Unwriteable mambots/content Unwriteable mambots/editors Unwriteable mambots/editors-xtd […]
Changing Administration Port on SharePoint 2007
SharePoint 2007 chooses a random port for administration. This is particularly difficult when choosing the single server configuration. Use the stsadm command to change the administration port number on MOSS 2007 / WSS 3.0. Go to this directory: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN> Enter this command: stsadm -o setadminport -port 4444 It will take […]
Fixing Access Denied Error When Activating Office SharePoint Server Publishing Infrastructure
If you don’t activate Publishing Resources when you first install SharePoint (MOSS 2007), when you try and activate it later via site collection features, you might see an access denied error when activating. You can manually activivate Publishing Resources via stsadm: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN> stsadm -o activatefeature -name PublishingResources -url http://website Operation […]
HTML Color Chart
Here is an HTML Color Chart:
Quick and Reasonably Secure WordPress install
Rather than relying on the security provided by the default WordPress install, we have utilized some other security measures. We changed the prefix to the wordpress table names so zero-day SQL exploits which depend on default installations will not work. Defeating zero day exploits is significant because new WordPress vulnerabilities emerge often, and exploits may […]
Apache and System V IPCs
Apache and some other programs need System V Inter-Process Communication (IPC) enabled in the Linux kernel. If you get this error when starting Apache: [emerg] (38)Function not implemented: Couldn’t create accept lock then it is possible that System V IPC is not enabled. If you are creating a custom Linux kernel, the option you want […]
We’re Back on Mosaic Again…
Back when NetAdminTools started out in 1997, NCSA Mosaic was still being maintained (back when a friend was a friend). Mosaic was a decent choice for a browser back then, especially on GNU/Linux distributions. Today it is useful to see just how Frankenstein your site looks without Javascript and CSS. Sure… it is less and […]
Adding Hostname to WordPress
We often move our WordPress install around to different machines, and wanted to know what host the WordPress install serving the page was. We are using the mon-caheir theme, as part of MCJ, but this should work similarly with other themes. Edit wordpress/wp-content/themes/mon-cahier/header.php, find the line that contains site-description, and change it so it looks […]
Backing up WordPress via Import/Export
It is quite easy to back up and restore WordPress with the WordPress Importer plugin. First, back up your blog by going to your dashboard, and tools/import: To restore your articles to another system, just select import and the WordPress: Choose the file that you exported: Assign the author as you wish. For us, we […]
Customizing the Chrome Frame Image
It is possible to put background text on the frame of Chrome by creating a custom extension. Generally, I’m pretty conservative about browser themes, because too much noise makes it difficult to scan a page. The web is noisy enough as it is. I have a need to constantly look up some information that id […]
Creating an htpasswd file for NGINX
There is a python script available here that will create an htpasswd file. Here is how you configure the NGINX configuration file: location / { ……………………….. auth_basic “Restricted”; auth_basic_user_file /opt/nginx/conf/htpasswd; ……………………….. } Here is how you use the utility: /opt/nginx/conf# htpasswd.py -c -b htpasswd username password Just restart NGINX and you will get a basic […]
Creating Your Own WebID Using Openssl
Create a configuration file like this: [ req ] default_md = sha1 default_bits = 2048 distinguished_name = req_distinguished_name encrypt_key = no string_mask = nombstr x509_extensions = req_ext UID = netadmintools UID_default=”https://netadmintools.com/foaf.rdf#me” [ req_distinguished_name ] commonName = netadmintools.com commonName_default = WebID for NetAdminTools Webmaster [ req_ext ] subjectKeyIdentifier = hash subjectAltName = critical,@subject_alt basicConstraints = CA:false […]

