Moodle – Exception – Call to undefined function xml_parser_create()

Symptoms

The following error message occurs during moodle upgrade attempt whether it be on command line or admin back end:

# php moodle/admin/cli/upgrade.php 
Default exception handler: Exception - Call to undefined function xml_parser_create() Debug: 
Error code: generalexceptionmessage
* line 76 of /lib/xmlize.php: Error thrown
* line 307 of /lib/environmentlib.php: call to xmlize()
* line 355 of /lib/environmentlib.php: call to load_environment_xml()
* line 101 of /lib/environmentlib.php: call to get_latest_version_available()
* line 116 of /admin/cli/upgrade.php: call to check_moodle_environment()

!!! Exception - Call to undefined function xml_parser_create() !!!
!! 
Error code: generalexceptionmessage !!
!! Stack trace: * line 76 of /lib/xmlize.php: Error thrown
* line 307 of /lib/environmentlib.php: call to xmlize()
* line 355 of /lib/environmentlib.php: call to load_environment_xml()
* line 101 of /lib/environmentlib.php: call to get_latest_version_available()
* line 116 of /admin/cli/upgrade.php: call to check_moodle_environment()
 !!

Read more

Learning Linux Commands: cut

If you think that you can do Linux System administration without cut command, then you are absolutely right. However, mastering this fairly simple command line tool will give you a great advantage when it comes to the efficiency of your work on a user as well administration level. To simply put, cut command is one of many text-filtering command line tools that Linux Operation System has to offer. It filters standard STDIN from another command or input file and sends the filtered output to STDOUT.

Read more

Learning Linux Commands: man

Introduction

One of the essential reflexes every new Linux user must develop is the reflex to search for information when something’s amiss. But despite the fact that we live in a connected world, with search engines, wikis and huge quantities of information at our fingertips, it’s always good to have the info we need already installed on the system we’re working on. This makes for easy and fast access, and also for higher availability, should we lack access to an Internet connection. Besides, one can’t always trust what one finds on the Web, and the manual pages are available in a consistent form, ready to answer questions to the impatient. One of the design philosophies standing behind Unix, and by inheritance Linux as well, is that the system should be well documented. This is how man pages came into being. While all Unix-based OSs have man pages, there are differences between them, so what works on Linux might not work on Solaris, for example. There is an issue, though: the writing style of these pages is terse, minute, impatient to the newcomer, so you might want to read a manpage a few times until you get accustomed.

Read more

Making use of your older hardware with Linux/BSD

Introduction

Some of you may wonder what is the purpose of this article. First, because hardware nowadays is pretty cheap, you don’t need older hardware anymore. Second, there are some articles across the Internet dealing with this already. The answer to the first problem is: well, you’ll see in the article. The answer to the second is we have some experience with older hardware first-hand, and we found it to be very useful to this day, so we want to share this with you. Older hardware, PC or not, is to be found everywhere, sometimes for free, and you can get to it easily. You will get some ideas from this article, but of course we don’t say the following list is exhaustive. Only your imagination sets the limit. The only knowledge we expect from you is to have some idea what you want to do. If you don’t yet, our article may be of help.

The hardware

Before we start, there are some variables that need some comments. First, the word “older” means different things for different people. To some, it may mean a 6 year-old AMD Athlon processor and 1GB of RAM. To others, “older” may be a PentiumII with 128 MB RAM. This article is mainly focused on the latter part, meaning really old hardware that’s still of some use with Open Source operating systems. Of course, if you have something more powerful, even better. The other variable is the hardware. People can find an old SPARC machine with < 100$ that is still usable, depending of course on what you want to do with it. The places you can find such machines, SPARC, SGI or Intel-based are Ebay, some local shop that sells older computers or even your friendly sysadmin that can’t wait to get rid of old machines. Take note that non-Intel machines will be more expensive, so think twice if you really need some exotic piece of hardware.

Read more

netbootcd grub

One CD disk, multiple Linux distributions: Netboot CD

Introduction

Every Linux user, after a while, starts creating a toolbox that he/she takes with him/her everywhere. However, that depends on the task at hand. You might need to install a distribution, you might just need a livecd, doing security-related work or just backup. And so the toolbox gets bigger and bigger, thus becoming less and less convenient. The subject of today’s article is NetbootCD. NetbootCD is not a supplement for a live Linux environment, but rather it is designed to help you install multiple Linux distributions using a single multiboot disk as oppose to requirement of 7 Linux installation disks.
In this sense NetbootCD is a CD disk that will allow you to netinstall various distributions by offering you a simple menu so you can choose distro/version and other simple options. From this reason a decent Internet connection is absolute must. You will only need the knowledge to install your distribution of choice, which nowadays is a walk in the park, with simple and easy to use installers present in many Linux distributions. We will show you how to use the NetbootCD and also how to hack it in order to add more distributions to the list, provided you have some scripting knowledge. Actually, you can use the disk also as a basic live Linux distribution, but more on that later.

Getting NetbootCD

NetbootCD is based on Tiny Core Linux, so you won’t have to get some huge ISO. One can download disk images and put it on a CD. There is also an option to put it on floppies, but that will not be dealt with here, since floppies are error-prone and almost extinct. The above link will guide you, however, should you really want to choose the floppy way. We recommend at least 512 MB of memory, more with Fedora, because the kernel and initrd images of the distros you choose will be downloaded to RAM. Now, let’s see what we get with NetbootCD.

Read more

Linux kernel scheduler

Learning Linux Commands: nice & renice

Introduction

User’s ability to attach a priority value to its own process upon execution determines whether you are being nice to your fellow users on the same system. Are you being nice or you simply abuse system resources for no apparent reason? In this article you will learn how to manage your processes in terms of how much processing power they consume and how to change a priority value of your processes using nice & renice Linux command. We will start with some basic theory about what is process, process scheduling, how to fork new process and then we move to nice command and explain how to change process priority value.

Read more

How to instruct XenServer’s host virtual machine to boot from ISO CD/DVD image

Objective

Here we assume that you have already created VM’s device to link to desired ISO image you wish to boot from. The objective is to instruct XenServer’s host virtual machine to boot from ISO CD/DVD image instead of default VDI disk. Failure to do so may result in following error message:

The bootloader returned an error
msg: Unable to find partition containing kernel

Read more

Terminator

Multiple Terminals Using Terminator On Linux

How about if you could have a multi-window terminal where, at will, you could press a key and it would be immediately copied to all (or a selection of) windows? How about if you could fit all terminal windows in one big window, without big and bulky borders loosing “precious” screen real estate? These, and more, are basic features of terminator, the handy Linux terminal utility.

Read more

KVM virtualization on linux

Virtualization solutions on Linux systems – KVM and VirtualBox

Introduction

Virtualization packages are means for users to run various operating systems without “bare-metal” hardware – basically, you can run more than one operating system on a single computer without dual-booting or similar approaches. Virtualization software emulates a real machine and “fools” the guest operating system into thinking it’s running on a real computer. Besides the more obvious advantages, virtual machines help create a greener and easier to administer computing environment. Looking at the trends in the IT industry, virtualization has seen quite a boom in the last few years, because it fits the concepts of utility computing and/or software as a service. Virtualization can be useful to you if you are an enterprise architect, developer, a home user or basically everything in between. We will begin with a short introduction about virtualization in general, then we will specifically treat VirtualBox and KVM as they seem to be most popular open source full virtualization solutions. You are expected to know your way around Linux systems, how to install a Linux distribution and how to install software on it, although we will show you how to install the two aforementioned virtualization packages on some of the popular Linux distributions.

There are two types of virtualization : one that can run the guest system as-is (as in, unmodified) and another that request a modified kernel on the guest’s side in order to run. The first category is named full virtualization, because it emulates a complete hardware environment, the second is named paravirtualization , because it doesn’t emulate hardware and hence needs special modifications at guest level, a good example of this type of virtualization being Xen. These are part of a bigger category named hardware virtualization, but there are also other (software, network or storage, amongst others) virtualization types, which we will not detail here. The two pieces of software we will talk about fit into the full virtualization category. Other popular hardware virtualization technologies include QEMU, Bochs, VMware, Parallels, HyperV or OpenVZ.

Read more

Learning Linux Commands: top

System monitoring is an important aspect of any more-or-less advanced Linux user, because there comes a time when you want to know what is taking precious resources or simply how much it does take. And despite what some people think, this is not applicable only to server systems. Desktop applications go haywire too, and you find your system slowed down to a crawl because some “rogue” app decided to eat up all your memory. For enterprise users there are lots of potent free or commercial solutions for monitoring, but for the old-school Linux user and/or someone that prefers to keep it simple, there is always top(1). If you’re somewhat familiar with the command line, you will probably benefit more from this article, but that doesn’t mean GUI-centric users won’t.

Read more

Installing and using gentoo linux

Installing and using Gentoo Linux: Getting Started Guide for Beginners

Introduction

Installing and using gentoo linuxIf you ask around about Gentoo, chances are you will get mixed reviews : some will say it’s a waste of time, others will say it’s only for ubergeeks, yet others will tell you it’s the only way, but no one can deny the power that Gentoo offers in terms of choices and speed. Gentoo is a rolling release distribution, which means it has no release numbers and it’s updated continuously.Gentoo is also a source-based distribution, which means that everything you install you must compile first. What Gentoo is not : it certainly isn’t for everyone. If you prefer the comfort of binary package managers that install desired software on-the-fly, if you like to install your distro in an hour or so, then you might not like Gentoo. That being said, if you’re curious, aren’t afraid of the command line and some compilation, if you want to have your system just the way you want it or you just want to be more 1337, this article is just what you need. You will learn how to install, what to install, how to get the most out of your system and of course have some fun in the process. We must warn you before we start : Gentoo has some of the best written documentation of all the Linux distributions and this article cannot and does not want to take its place, by no means. Although you will have a working Gentoo system after going through our tutorial, you are advised to read the handbook and all other sections of general interest, like Portage (the software management tool), for example. That said, let’s get ready and start installing Gentoo.

Read more

Internal vs External Linux shell commands

Introduction

It is our firm belief that Linux, despite its advances on the desktop side, as well as on tablets, should be taught starting with the command line. That’s because it’s an operating system that borrows heavily from Unix(TM), and there was nothing more than a text interface on it at the very beginning. Studies have shown that, if applicable, one is more efficient on the command-line rather than using a graphical user interface (GUI). “If applicable” means that we’re not referring at photo/video editing or some other task that requires a graphical environment. It means that when there is a task that can be solved either via the command line interface (CLI) or via GUI, the CLI way is more efficient. Another thing to be considered is the fragmentation of the Linux world. For example, OpenSUSE’s YasT won’t be available on any other distro, so it’s a specific piece of software. This fragmentation is seen also in the CLI world, especially when it comes to the locations of various files, but we will make you aware of it, should that be the case. In case you’re not convinced yet, remember that you don’t know Linux, or any other similar operating system, until you know your way around its CLI. The power of Linux lies there, and if you want to make a career out of it, follow along: it’s an interesting and fun journey.

Internal vs external Linux shell commands

You may be puzzled by this choice of words, and with good reason. But it’s a terminology you will encounter often, along with the term “(shell) built-in” when referring to internal commands and perhaps “the rest” for the external ones. But before we go that far, let’s make sure we’re on the same page. The shell we’re gonna work with is bash, as it’s the most used on Linux distributions. That’s not saying it’s the best, but that’s a subjective term anyway. I don’t know of any popular and still maintained Linux distribution that uses any version of bash prior to 4.xx, so that’s what we will use too. Regarding the ever-controversial distribution support, LPI seems to focus mainly on Red Hat and Debian or derivative distributions (e.g. Fedora or Ubuntu), so this is what we’ll support as well. However, at this level at least, the distribution is less relevant: what is important is an up-to-date shell and distribution.

Read more