Wednesday, April 25, 2007
PHP - LDAP over SSL
The server would connect when not using SSL, but as soon as I added the port 636 to the ldap_connect() function as the second argument (ldap_connect("server1", 636)) I would get an error 81 Can't connect to ldap server.
After exhaustive research I tried using ldap_connect("ldaps://server1") and low and behold it connected perfectly.
If you are having similar problems, you may want to try above. If this also doesn't work, try changing your hostname to IP address, but keep the ldaps://
Sunday, April 15, 2007
OpenOffice - Getting Spellcheck to work properly.
- Open OpenOffice Writer
- Open the file in your OpenOffice directory /share/dict/ooo/DicOOo
- Click on the button that says 'Start DicOOo'
- Follow the wizard to download the appropriate dictionaries.
Tuesday, April 10, 2007
A Brief UNIX shell comparison
Most people who use UNIX will be perfectly content to use whatever shell is set as their default environment and never venture into anything else. For the rest of us I will list some of the more popular shells in alphabetical order (so as to not show favourtism and a brief description of each.
ASH - A fully functional shell with a very small footprint, used in systems where resources are at a premium.
BASH - Bourne Again Shell. A more robust version of the Bourne Shell.
Bourne Shell - The original UNIX shell. Still widely used and most likely is on your system somewhere.
CSH - C Shell. A shell which more closely resembles the C programming language.
KSH - Korn Shell. Similar to the Bourne shells. Very good scripting support.
TCSH - TENEX C Shell. A slightly more robust CSH.
ZSH - Z shell. A more modern Bourne variant. Almost endless options.
Sunday, April 8, 2007
What is PHP?
PHP stands for PHP Hypertext Processor and it is primarily used as a server side scripting language akin to ASP (Active Server Pages) or JSP (Java Server Pages). A server side scripting language allows someone to create a dynamic web page. Traditionally, web pages were/are created using static HTML. Server side scripting languages allow you to create a program that creates HTML on the fly, normally based on user input or back-end database queries.
PHP also allows you create stand-alone applications via a command line interface. PHP can be used through either IIS or Apache web servers and can be installed on a multitude of operating systems.
PHP is a pivotal part of the LAMP architecture as well. LAMP stands for (Linux Apache MySQL PHP) and refers to a set of free software that, when combined, gives a complete, enterprise worthy web server.
Being fortunate enough to know how to program in all three of the languages mentioned (ASP, JSP and PHP) I can say that PHP is my language of choice, both for it's ease of use and good learning curve. That being said, I have also found PHP to be the hardest of the three to install and properly configure.
Wednesday, April 4, 2007
Hard Lessons - Disconecting A Serial Terminal From A Sun Server
I was fortunate enough to recently get a brand new Sunfire v890 server. Oh how excited I was to see what this baby could do. I had to wait, unfortunately, until we could make space in our server room for it. Then the day finally came where I could power it on for the first time.
As you may, or may not, know Sun servers don't come with video cards out of the box and we had scheduled a rep to come down and install it for us. I am more than capable of this feat, but had not intention of taking the responsibility for it or possibly losing a warranty becuase it wasn't installed by a certified Sun installer. Nevertheless I wanted to see what it could do so I unplugged a laptop we were using as a serial terminal in an older v880 that we never put a video card in. That's where I learned the hard lesson.
NEVER UNPLUG A SERIAL TERMINAL FROM A RUNNING SUN SERVER
What could go wrong, I'm only unplugging a serial cable, I thought to myself. That's akin to disconnecting a vga cable right? WRONG. This apparently will make the server go down into single user mode. You won't be able to ping, telnet or do anything else with the server until it is plugged back in. Fortunately, this all occured at the end of the day and no one really seemed to notice.
Tuesday, April 3, 2007
Oracle SQLplus Copy Command - a DBA's best friend
They syntax for the command is as follows:
COPY FROM [source database] TO [target database] [ACTION] [table name] USING [select statement]
Source Database - The database or sid you wish to retrieve information from (pretty self explanatory I know, but I figured I'd put it in there for good measure), you will also need to include the security credentials (ex. scott/tiger@orcl)
Target Database - The database or sid you will be putting information into (I know, I know....)
Action - The operation to be performed:
CREATE - create a new table
INSERT - put the rows from the select statement into the target database, if it exists.
APPEND - put the rows from the select statement into the target database, if it doesn't exist, create it as well.
REPLACE - drop the table and recreate it using the select statement
Table Name - Name of the table that the operation will affect, this is located in your target database
Select Statement - This statement is used to populate your specified table, the select statement is run against your source database.
NOTE: If you are only doing an operation within one database (ex. creating a backup table) then you don't need to specify the TO [target database] portion.
Lesson Learned: Don't try to use the copy command from an oracle 9 client when copying between two 10g databases, Oracle doesn't like that for some reason.
Once you've got the syntax down, you'll wonder how you did without it.
Monday, April 2, 2007
Microsoft Access - Fuzzy Text Search And An Empty Prompt Box
Check back tomorrow for another helpful hint from The Well Rounded Geek
Welcome!!!!!
A blog dedicated to all of the completely random tasks that I.T. workers are expected to know/perform/excel in on a minute by minute basis. Obviously it is impossible for us to know off the top of our heads all of the, ever expanding, areas of I.T. but hopefully this blog will help you solve those pesky problems that can take hours to solve on your own.
This blog will touch on every area of I.T. imaginable (Hardware, Networking, Operating Systems, Databases, Applications, Business Intelligence, Project Management and Programming to name but a few). What would a well rounded geek blog be, however, if we also didn't touch on the fun things we do as well (Gadgets, Gaming and, quite frankly, anything else we feel like discussing).
So check back daily or subscribe to the RSS feeds because you never know when you might come across something that will save your day (or more importantly, your job)