Read me blog in Dutch at this site.

(Joomla) Review: Lazybackup

March 9th, 2010 Toretto No comments

Who says blogging can’t be usefull?  Until today, I used to make manual backups of Joomla databases.  It was a time-consuming, boring process.  When I complained about this process, I got a slap on the wrist by one of my readers.  I should’ve done my research better!

So today, I tried implementing a solution that was suggested by Joomla big shot Brian Teeman (who, might I add, has an awesome blog built on Joomla 1.5.  I’m jealous).  He suggested using Lazybackup.  Man, do I wish that I found out about this tool earlier!

Lazybackup 2; which can be found at lazybackup.net, is a small plug-in which makes backing up your Joomla Mysql database easy.  Once you install the plug-in, it takes you two minutes tops to configure the automated back-ups.  These back-ups can either be stored in a (sub)folder or e-mailed to your adress(es). 

This plug-in is going to be a huge timesaver for me.  I gladly recommend it to anyone who meets the following Joomla requirements:

-  you run one / more Joomla 1.5 websites

-  You’ve got 2 minutes to spare to set up the plug-in. 

Wether you have only one website to manage or multiple, this plug-in is a must-have for anyone. 

How to: Fix Virtuemart links!

February 19th, 2010 Toretto No comments

When building a Joomla website, it’s good practice to create the site in a test environment first. Then, when the work is done, you can migrate it to a “live” environment. 

Unfortunately, migrating such a site requires work than it should.  When you’re also integrating Virtuemart, you can run into even more problems.

The biggest problem is that, unless you’re extremely lucky, all your links will be pointing to the wrong website – and thus, will have to be fixed.  Realizing that costed me 30 minutes of my life once.  Because, since our “test” server is also hooked up to the internet, the links had once opened the test site, identical to the live site. 

Anyway, you’re not hear to read about my mistakes, but to learn from them.  Here’s what you should do when your links are “broken” after a Virtuemart integration.

Instructions

  1. Find the Virtuemart Configuration File: /administrator/components/com_virtuemart/virtuemart.cfg.php
  2. Open the file, and search the following:  define(‘url’, ‘the broken url’).  Replace the broken URL with the URL of the live site.  e.g define(‘url’,’http://www.joomla-and-more.com/virtuemart’)
  3. Edit the URL in the line below as well: e.g define(‘secureurl’,’http://www.joomla-and-more.com/virtuemart’)
  4. Save the changes, and re-upload the file to the server.
  5. Open your website, and look at the Virtuemart links.  They should now work properly. 

How to: Migrate DHCP reservations between servers

February 16th, 2010 Toretto No comments

Are you trying to find a way that allows you to migrate DHCP Reservations from one Windows server to an other?  Look no further, as I’ve found the solution for you (and a few millions before me, but who cares, really?)

Today, I wrapped up the migration of SBS 2003 to SBS 2008 when I realized that I really didn’t want to add all the DHCP reservations we use manually.  So I did some googling, and found a solution.  After some experimenting, I came up with the following.

The requirements for this to work are simple:

1)  The Source and Target server must be members of the same domain.

2)  You must log in w/ an account that has sufficient rights for both servers, like a domain admin account. 

The steps to follow

1.  Log in to the target server.

2.  Open a command window (you know, the creepy black box) and type the following:

netsh dhcp server (I.P of Source Server) scope (DHCP Scope of Source Server) dump>sometextfile.txt

As usual, you’ll have to provide your own info

  • I.P of Source server: IP of the server where the reservations are available
  • DHCP Scope of Source server:  this is  the address range scope.  You can find it easily when opening the DHCP MMC
  • sometextfile.txt should be replaced by your own file name; of course.

Live example:  netsh dhcp server 192.168.0.126 scope 192.168.0.0 dump>reservations.txt

3.  Open the file you just created; and use find / replace.  Replace the IP address of the source server w/ the IP adres of the target server; and save the file.

4.  In the command window, type the following command:

exec c:\pathtotextfileyoujustcreated

You’ll now see how the reservations are being loaded into the target server! 

Installing SBS 2008? Check your disk size!

February 15th, 2010 Toretto No comments

If you’re going to install SBS (or Small Business Server) 2008; you should know that not every partition size will do – even though you get no fair warning.  Read our post at Joomla-and-more or at the Toralko portal for more information. 

Adprep fails when migrating SBS 2003 to SBS 2008

February 13th, 2010 Toretto No comments

If you’re following the Microsoft paper to migrate SBS 2003 to SBS 2008, at one point you’ll be using the Migration Tool to prepare your SBS 2003 server (Or “Source Server”) for the migration. 

At this point, you can run into the problem that preparing the AD scheme fails.  You’ll see an Adprep error.  This can be because of two reasons.  Two can be found in a Microsoft KB article (Don’t have the link, sorry), but the third one isn’t documented.  The reason for this might be that it’s a problem only non-English peeps (like me) can run into.

Research has taught me that the Migration File will fail when you’re using different versions of SBS.  Make sure that your SBS 2003 you’re using; and the SBS 2008 server you’re going to use, are of the same language!  As stupid as this might sound, this problem bugged me for hours.  I hope that this post will save you the valuable time that I lost on this problem. 

How to: Add fields to the Joomla registration form

February 5th, 2010 Toretto No comments

[This post was originally posted on joomla-and-more, a site of the Toralko group.]

For the most part of this week, I was working on the i-Sana website.  If you’re interested, it’s a Dutch website that offers a free digital magazine (or e-magazine) on Health.  Anyway, this was an important project for me and  I wanted to do everything just right.  So, when the bosses requested that we collected the ZIP codes of users, I tried to find a solution. 

Since we’re going to be using AcyMailing to send our newsletters, we wanted to use the “core” Joomla registration form, which meant that we had to add a zip code field to it.  We pulled it off, of course.  I’m not being snobbish, but you know by now that I only discuss “problems” when I managed to solve them, right?

Anyway, below you can find the solution to add custom fields to the registration form yourself. 

The steps

1. Edit your Joomla database: The first step is to edit your Joomla database; because you’ll need to store the input for your new field somewhere.  So,  open your  database using phpmyadmin (or another solution; I prefer phpmyadmin myself as it’s a tool that many ISP).  Then, make a back-up of the table (something)_users 

Add a field to the table (something)_users.  The field has to be a text field.  Choose a field name that’s related to the extra field you want to create in your form; as you’ll be using this name in the next steps.  

2. Editing the registration form: To add the new field to the registration form, you’ll need to edit the following file: 

/components/com_user/views/register/tmpl/default.php

In the part of the code where the form is defined, add the following code:  
<tr>

<td height="40">

<label id="zip" for="postcode">

<?php echo JText::_( ‘postcode’);?>:

</label>

</td>

<td>

<input class="inputbox required" type="text" id="postcode" name="postcode" size="40">

</td>

In this example, a new text field is added for “Postcode”.  You’ll want to changet the references to post code to the field name you used in the previous step. 

3. Changing the registration logic: To ensure that the input is written to the Joomla database, you need to edit the following file:

libraries/joomla/database/table/user.php

Under “class JTabeUser extends Jtable”  you’ll see the declaration of variables.  Add the following code:

"var $postcode = null;"

SUPER IMPORTANT WARNING:  the code above must be typed EXACTLY as shown.  I accidentaly forgot the space after the =, and I broke the ENTIRE registration process; wondering where I made a mistake.  

Of course, you’ll want to change “postcode” to the value you gave your field in step one.

4. Editing the user profile in the back-end: The extra data are now being stored in the database, but you’ll also want them to show up in the Joomla back-end.  To achieve this, edit the following file:  

/administrator/components/com_users/views/user/tmpl/form.php

Under <form action="index.php" method="post" name="adminForm" autocomplete="off">, add the following code :

<tr> <td class="key">

<label for="postcode"> <?php echo JText::_( ‘Postcode’); ?></label>

</td>

<td> <input class="textbox" type="text" name="postcode" id="postcode" size="40" value="<?php echo $this->user->get(’postcode’);?>"/>

</td>

</tr>

Once again, you’ll want to change “postcode”.

And bam!  You’ve added your field to the registration procedure of Joomla.   

Update

February 4th, 2010 Toretto No comments

It’s time for a new update, since the last one was ages ago.  What’s there to report?  Well, there’s some good news and even better news.  The domain name has been secured for another 5 years, and our hosting will remain free for quite a while.  This gives us the chance to focus on other, more important topics:  Updating the website content.

After starting Toralko.info; another site of mine, started to pick up a lot of traffic.  So, logic dictated that I invested my time in the website that had the most success.  That other website, which you can find at www.joomla-and-more.com is actually my old blog which has been adapted to suit my audience’s taste.

Unfortunately, that sites’ succes lead to me neglecting other sites, like Toralko.  To fix this problem; I’m going to "mirror" my posts on Joomla-and-more on this site once again, like I used to do back in the days. This should make the site interesting once again; and hopefully it’ll create some audience for Toralko.info.

Categories: Toralko Projects & News Tags:

How to: Allow users to start / stop (server) services

December 11th, 2009 Toretto No comments

If you’re working for a huge coorporation, you’ll probably shiver at the idea of allowing any users to start or stop services on your Windows Servers.  In small companies, however, it’s not always easy or even possible for the System Admin to follow the “perfect safety instructions”. 

Take my example.  I work for a company, Drenco N.V.  Although we’re active in different markets (IT, Media, Health and Food), there’s only a few people that actually work at the main office.  Of those people, there’s only one System Admin, and that’s me.  So, if I want to have some rest during my vacations it’s of the upmost importance that others can “fix” problems that occur often.  One of these errors happens to be the DNS server on our SBS 2003 box that needs a restart.  Just recently, I found a way to allow users to stop / start this service (and others), so they’ll be able to perform this common task, without much risk to the rest of the network.

Are you in a situation like mine? If you need certain non-admin users to be able to stop / start services on a Windows server, the following guide will be usefull to you. 

How to do it.

  • First of all, we need to install a component of the Microsoft Resource kit.  The file in question is SUBINACL.  Google will point you in the right direction; download the version that matches your server. 
    Link to the download:
  • If you’ve downloaded the file, install it on your server.  note: choose an installation location that’s easy to find.  You’ll need to navigate there w/ the command prompt. 
  • Open your command prompt, and navigate to the folder where you installed the tool. (Default: c:\Program Files\Microsoft Resource Kit\Tools)
  • Run the following command –replace everything between ( ) with your own parameters and, obviously, get rid of the ( ). 
    SUBINACL /service \\(target machine)\(short name of service to restart) GRANT= (domain)\(user).
  • Now that the server side is all taken care off, you’ll want to make it as easy as possible for your user in question to start / stop the service.  Open notepad, and use the following lines:
    sc \\(target machine) (command) (service)
  • Save the file as (somename).bat and send it to the user; who then only needs to run the file.

Examples:

And that’s it!  Remember, be carefull which rights you’re giving to what user.  The only person you can trust in a network, is you. (Unless you’re unreliable, in which case your IT department is doomed).

How-to: Install Apache, Mysql and PHP on Ubuntu

December 8th, 2009 Toretto No comments

I’ve noticed that a few of my readers are interested in learning how to install Apache on Ubuntu.  I can relate to that (I forget how to get the job done from time to time), so I present to you:  My Guide on how to install Apache, MySQL and PHP on a Ubuntu box (be it virtual or physical).  I’ll also throw in three tools you could use to make the management of said server easier. 

Assumptions

During this guide, I’ll be making the following assumptions:

  1. You’ve already installed Ubuntu (Or know how to).
  2. You know how to open the terminal, and use it (It’s simple, really).
  3. You’ve got access to the super-account and his cool moves. 

Requirements

  1. You’ve installed Ubuntu
  2. Optional: You’ve got a second PC / machine to verify access

Let’s get started

First of all, allow me to explain something: the installation of lamp-server we’re going to do, will install Apache2, MySQL and PHP5.  So there’s no need to install any of those manually. 
Bottom line: this guide will help you install Apache and more.  (bonus!)

The steps to follow

  1. Open a Terminal window.
  2. Use the following command to start the installation:
    • sudo tasksel install lamp-server
    • note: Ubuntu is CaSe-SenSITIve; write the command above exactly as I did
  3. A “wizard” will start.  The first, and only, question that will be asked is to provide a password.  This password will be used for the Root-account of the MySQL Server.  Provide the password, and provide it again when asked to. 
  4. The “wizard” will install Apache2, MySQL and PHP5.  Now is the time to get a coffee or something.  When the installation is done, you’ll be taken back to the Terminal window. 

Your Apache server is now up and running!  You can test this by browsing to http://localhost (on the box) or to http://(machinename) or http://(machine IP)

Next thing on the list is to set the proper permissions for the folder where your websites will be stored (the folder /var/www).  I’ve written the instructions in a previous post, so I’m not going to write it all again.

Link to Article: how to set your permissions

With that problem solved, you’re all good to go!  Your APache server is running (or it should be); your MySQL server is ready and your PHP framework is compiled and installed.  What are you waiting for?  Start creating those websites!

Some tools

There are some tools I always install on a new Ubuntu box, and you might find them usefull as well:

  • phpmyadmin: must-have for any LAMP server.  This tool allows you to manage your MySQL server, using any browser. 
  • phpmybackuppro:  An usefull tool to create back-ups of said MySQL databases.  Offers many great options. 
  • Webmin:  a tool to manage or install various services on your UBuntu box.  Can be downloaded or installed from the terminal command line. 

You should be all set now.  I hop that this how-to answered the question of some of you.  If not, feel free to contact me (info can be found on this site) or leave a comment. 

How-to: Install Apache, Mysql and PHP on Ubuntu

December 8th, 2009 Toretto No comments

I’ve noticed that a few of my readers are interested in learning how to install Apache on Ubuntu.  I can relate to that (I forget how to get the job done from time to time), so I present to you:  My Guide on how to install Apache, MySQL and PHP on a Ubuntu box (be it virtual or physical).  I’ll also throw in three tools you could use to make the management of said server easier. 

Assumptions

During this guide, I’ll be making the following assumptions:

  1. You’ve already installed Ubuntu (Or know how to).
  2. You know how to open the terminal, and use it (It’s simple, really).
  3. You’ve got access to the super-account and his cool moves. 

Requirements

  1. You’ve installed Ubuntu
  2. Optional: You’ve got a second PC / machine to verify access

Let’s get started

First of all, allow me to explain something: the installation of lamp-server we’re going to do, will install Apache2, MySQL and PHP5.  So there’s no need to install any of those manually. 
Bottom line: this guide will help you install Apache and more.  (bonus!)

The steps to follow

  1. Open a Terminal window.
  2. Use the following command to start the installation:
    • sudo tasksel install lamp-server
    • note: Ubuntu is CaSe-SenSITIve; write the command above exactly as I did
  3. A “wizard” will start.  The first, and only, question that will be asked is to provide a password.  This password will be used for the Root-account of the MySQL Server.  Provide the password, and provide it again when asked to. 
  4. The “wizard” will install Apache2, MySQL and PHP5.  Now is the time to get a coffee or something.  When the installation is done, you’ll be taken back to the Terminal window. 

Your Apache server is now up and running!  You can test this by browsing to http://localhost (on the box) or to http://(machinename) or http://(machine IP)

Next thing on the list is to set the proper permissions for the folder where your websites will be stored (the folder /var/www).  I’ve written the instructions in a previous post, so I’m not going to write it all again.

Link to Article: how to set your permissions

With that problem solved, you’re all good to go!  Your APache server is running (or it should be); your MySQL server is ready and your PHP framework is compiled and installed.  What are you waiting for?  Start creating those websites!

Some tools

There are some tools I always install on a new Ubuntu box, and you might find them usefull as well:

  • phpmyadmin: must-have for any LAMP server.  This tool allows you to manage your MySQL server, using any browser. 
  • phpmybackuppro:  An usefull tool to create back-ups of said MySQL databases.  Offers many great options. 
  • Webmin:  a tool to manage or install various services on your UBuntu box.  Can be downloaded or installed from the terminal command line. 

You should be all set now.  I hop that this how-to answered the question of some of you.  If not, feel free to contact me (info can be found on this site) or leave a comment.