XAMPP: Error 1! Couldn’t start Apache! … Sorry, I’ve no idea what’s going wrong.

Today I helped my friend to install XAMPP on a Debian system. When I tried to start the Apache webserver, I got the following message:

#/opt/lampp/lampp startapache
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Sorry, I've no idea what's going wrong.
XAMPP: Please contact our forum http://www.apachefriends.org/f/

This problem is likely related to your Apache configuration file. To drill down to the root of the problem, we can take a look to the Apache error log:

tail /opt/lampp/log/error_log

and it should give you some info on how to solve this computer problem.

–Derrick

Our sponsors:

What can you do with A8M2N-LA / NodusM-GL8E?

Recently, I decided to turn my HP m7557c computer (motherboard: A8M2N-LA / NodusM-GL8E) to an Unix server. The nightmare began. After trying nearly 10 different operating systems and distributions, I found that only very few of them worked with A8M2N-LA / NodusM-GL8E. I think it is worth to share my experience with this beast – an experiment result that took more than 100 hours.

I have not failed. I've just found 10,000 ways that won't work.
-- Thomas A. Edison
The following operating system are listed in alphabetically:

Fedora 13
Status: No
Comment: Installation went well, but the system was very unstable due to kernel panic. This mother board may not compatible with the newer Linux kernel.

FreeBSD 7.3
Status: No
Comment: Does not support USB keyword, i.e., can’t start the installation.

FreeBSD 8.1
Status: Yes
Comment: Stable, however the harddrives are very unstable. Sometimes the system complains about the harddrive. See the full story here.

FreeBSD 8.2
Status: Yes
Comment: Very stable. No problem found so far.

OS X 10.4
Status: No
Comment: Installation failed.

OS X 10.5.8
Status: No
Comment: Installation completed, but very unstable. The system reboots itself.

OS X 10.6
Status: No
Comment: Installation failed

Ubuntu 9.10
Status: Yes, stable.

Ubuntu 10.04
Status: No
Comment: If install directly from the disk, the system will not boot. The only possible way is to upgrade from an earlier version. See Ubuntu 10.04 – Can’t boot / Can’t install for details.

Ubuntu 10.10
Status: No
Comment: Cannot even load the installation disk.

Hope my experience is helpful to you.

–Derrick

Our sponsors:

Finally, Ubuntu uses a more updated Linux kernel than Fedora

Historically, Ubuntu focuses on the user experience such as beautiful graphical user interface, while Fedora focuses on performance. In the other words, the kernel in Fedora distribution is more up-to-dated.

I just upgraded by Ubuntu 10.04 to 10.10 (released on October 10, 2010), I found that the Linux Kernel in Ubuntu is more advanced than Fedora. I am surprised!

#cat /etc/lsb-release && uname -a

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"
Linux 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 i686 GNU/Linux

and for Fedora 13:

#cat /etc/redhat-release && uname -a
Fedora release 13 (Goddard)
Fedora release 13 (Goddard)
Linux 2.6.34.7-56.fc13.x86_64 #1 SMP Wed Sep 15 03:36:55 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

Our sponsors:

Comments on running webservers at home – Part 1

I like to experiment all kind of computer technologies especially server applications. I am not one of those who is satisfied with just making a website and putting it in somewhere. I like the full control of the server because I like to try different combination of applications for performance tuning. For example, I doubt regular web hosting company allows you to host the entire system on a ram disk with a reasonable price tag. That’s why I choose to host a server at home. That’s a lot cheaper, plus I have the full control. However, running server application may generate lots of upstream traffic. That’s why most internet server providers (such as Charter) do not allow their customers to run any server related applications using their internet connection service. They do it by blocking most service related common ports, e.g., 80 (HTTP), 21 (FTP), 22 (SSH) etc. So there is really nothing you can do other than hosting your applications on different ports.

Two years ago, I started hosting all of my websites using my own computers. I found a number of benefits.

Benefits of hosting websites at home

1. It saves me tons of money.

I was paying $72/year per domain for web hosting. Since I have more than ten domains, the total running costs per year is pretty high. This amount is really nothing comparing to the cost of the electricity.

Monthly cost for web hosting:

$72 per domain/yr * 10 domains / 12 months
= $60 per domain / month

My monthly electricity cost at home, which includes everything such as running 10 non-gaming computers, washer, dryer, lighting etc:

$80 / month

I haven’t tried measuring the exact energy but you can imagine the electricity used by computers should be under $10 / month.

2. It is fun (and environmental friendly too).

I have few stone-age computers including a Pentium II laptop, a Mac G3 (speed wise similar to Pentium II), a Pentium M Celeron laptop etc. I integrated them to a web server farm (web clusters). Since running a web server does not require a lot of CPU power, they are doing okay for hosting low-traffic websites. Also, it is cool to show off my friends the global data center that I build for my websites.

3. Your data is secured!

Have you ever heard of any bank host their web sites on web hosting? No matter what type of encryption you use for your web applications, you still need to process the raw, original, and unencrypted data on the server side at one point. Processing confidential information on a shared server is like talking your secrets in a study room in a public library. You think you are in an isolated environment, but you can be surveillanced, it’s very simple and easy.

Here is an example:
Supposes I have a web application which accepts the confidential information from my users, and all traffics are encrypted. After the confidential information is decrypted on the server-side, my web application processes the raw information and do further things.

Let’s say the server environment is Apache + PHP + MySQL, the most popular combination of web application environment. Since they are all open-source, it is very easy to modify the source codes and log every single thing into a file, including the raw, original, unencrypted data processed by my web application.

You may think this may require lots of work and it will never happen on you. What if your competitor wants your confidential information? It doesn’t cost much to hire someone to do it.

Sounds scary?

More scary things come along. Shared web hosting (hosting multiple domains on one single server) always come with lots of trouble that many people are ignored. In theory, every website on a shared hosting lives in a virtual, independent environment, think about it as a virtual machine like VMWare or Hyper-V. Practically, it is not easy to set up such environment (e.g., FreeBSD Jail) and many web hosting companies choose to go with a less difficult path, because customers will not realize it anyway. Now here is the interesting part, supposes my domain and your domain are hosted on the same server. I can access the resource at the operating system level first (which will required some hacking), then access your file after that. Now I have access your source code and I can do whatever I want.

The most secure place in the world is the place that can be accessed by you, and no body else, i.e., your home, or any place you have full control

Our sponsors:

Softlink / Symbolic Link doesn’t work on Samba – Solved

After upgrading my Samba servers (One is Ubuntu Linux, and the other one on Fedora Linux), I found that I can no longer access the symbolic links / soft links from Windows. It keeps returning “permission error”, “You don’t have permission to access this folder” etc. I am pretty sure that it has nothing to do with my user permission settings because it was working just fine before the upgrade. After trying several solutions, here is what I come up:

Edit your samba configuration file:

sudo nano /etc/samba/smb.conf

Add the following into the global section, i.e.,

[global]
...
follow symlinks = yes
wide links = yes
unix extensions = no
...

Save your file and restart Samba:

sudo /etc/init.d/samba restart

It should work now.

Our sponsors:

[Solved]Fedora Linux Repository Error ([Errno 14] PYCURL ERROR 6)

I was having trouble to update my Fedora Linux system by running sudo yum update.

sudo yum update
Loaded plugins: presto, refresh-packagekit
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora.
Please verify its path and try again

sometimes I see different sets of error:

http://download.fedoraproject.org/pu...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""

or

http://download.fedoraproject.org/pu...ta/repomd.xml: [Errno 14] PYCURL ERROR 7 - ""

After searching these error messages on Google, I found tons of the workaround methods. Unfortunately, none of them works! Finally, I came up a way to fix this problem.

The reason why you see this error message because your system could not connect to the main Fedora server(At the time of writing this blog, fedoraproject.org has been downed for at least 4 days.), so that your computer is not redirected to any Fedora mirror servers. The easiest way to fix this problem is by specifying a mirror server in your yum repository configuration file.

First, let’s find a mirror that is closed to your location:

Fedora Mirror (Fedoraproject.org)

or

Google Cache

If you have any trouble to access the information, here is a copy of the list:

North America

ftp://limestone.uoregon.edu/fedora/extras
http://limestone.uoregon.edu/fedora/extras
ftp://fedora.bu.edu/extras
http://mirrors.kernel.org/fedora/extras
ftp://mirrors.kernel.org/fedora/extras
rsync://mirrors.kernel.org/fedora/extras
ftp://ftp.muug.mb.ca/pub/fedora/linux/extras/
http://www.muug.mb.ca/pub/fedora/linux/extras/
rsync://rsync.muug.mb.ca/fedora-linux-extras/
http://mirror.hiwaay.net/redhat/fedora/linux/extras/
ftp://mirror.hiwaay.net/redhat/fedora/linux/extras/
rsync://mirror.hiwaay.net/fedora-linux-extras/
ftp://mirror.phy.olemiss.edu/fedora/extras/
http://mirror.phy.olemiss.edu/mirror/fedora/extras/
http://fedora.mirrors.tds.net/pub/fedora-core-extras
ftp://fedora.mirrors.tds.net/pub/fedora-core-extras
rsync://fedora.mirrors.tds.net/fedora-core-extras
http://mirror.cpsc.ucalgary.ca/mirror/fedora/linux/extras/
ftp://mirror.cpsc.ucalgary.ca/mirror/fedora/linux/extras/
rsync://mirror.cpsc.ucalgary.ca/fedora-linux-extras/
http://www.gtlib.gatech.edu/pub/fedora.redhat/linux/extras/
ftp://ftp.gtlib.gatech.edu/pub/fedora.redhat/linux/extras/
rsync://rsync.gtlib.gatech.edu/fedora-linux-extras/

Europe

http://sunsite.mff.cuni.cz/pub/fedora-extras/
ftp://sunsite.mff.cuni.cz/pub/fedora-extras/
rsync://sunsite.mff.cuni.cz/fedora/extras/
ftp://alviss.et.tudelft.nl/pub/fedora
http://ftp.lug.ro/fedora/linux/extras/
ftp://ftp.lug.ro/fedora/linux/extras/
http://ftp.uni-bayreuth.de/linux/fedora/linux/extras
ftp://ftp.uni-bayreuth.de/pub/linux/fedora/linux/extras
rsync://rsync.uni-bayreuth.de/fedora-linux-extras
http://ftp1.skynet.cz/pub/linux/fedora/extras/
ftp://ftp1.skynet.cz/pub/linux/fedora/extras/
ftp://ftp.tu-chemnitz.de/pub/linux/fedora-core-extras/
http://wftp.tu-chemnitz.de/pub/linux/fedora-core-extras/
ftp://ftp.chl.chalmers.se/pub/fedora/linux/extras/
ftp://ftp.udl.es/pub/fedora/linux/extras/
http://ftp.udl.es/pub/fedora/linux/extras/
rsync://ftp.udl.es/pub/fedora/linux/extras/
ftp://gd.tuwien.ac.at/opsys/linux/fedora/extras/
http://gd.tuwien.ac.at/opsys/linux/fedora/extras/
rsync://gd.tuwien.ac.at/opsys/linux/fedora/extras/
http://fr.rpmfind.net/linux/fedora/extras/
ftp://fr.rpmfind.net/linux/fedora/extras/
rsync://fr.rpmfind.net/linux/fedora/extras/
http://mirror.etf.bg.ac.yu/fedora/linux/extras
ftp://mirror.etf.bg.ac.yu/fedora/linux/extras
rsync://mirror.etf.bg.ac.yu/fedora/linux/extras

http://mirror2.etf.bg.ac.yu/fedora/linux/extras
ftp://mirror2.etf.bg.ac.yu/fedora/linux/extras
rsync://mirror2.etf.bg.ac.yu/fedora/linux/extras
ftp://klid.dk/fedora/linux/extras/
http://klid.dk/homeftp/fedora/linux/extras/

Russia

http://ftp.rhd.ru/pub/fedora/linux/extras/
ftp://ftp.rhd.ru/pub/fedora/linux/extras/
ftp://ftp.chg.ru/pub/Linux/fedora/linux/extras/
http://ftp.chg.ru/pub/Linux/fedora/linux/extras/
rsync://ftp.chg.ru/fedora/linux/extras/

Taiwan, Asia

http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/extras/
ftp://ftp.isu.edu.tw/pub/Linux/Fedora/linux/extras/

Australia

http://planetmirror.com/pub/fedora/linux/extras/
ftp://ftp.planetmirror.com/pub/fedora/linux/extras/
rsync://rsync.planetmirror.com/fedora/linux/extras/
http://mirror.pacific.net.au/linux/fedora/linux/extras/
ftp://mirror.pacific.net.au/linux/fedora/linux/extras/

In my example, I will use the following parameters:
Mirror: http://fedora.mirrors.tds.net/
Version($releasever): 12
Architecture($basearch): x86_64

If you are not sure how to determine the version and the architecture, you can type:

cat /etc/redhat-release && uname -a

It should say something like:

Fedora release 12 (Constantine)
Linux 2.6.31.6-145.fc12.x86_64 #1 SMP Sat Nov 21 15:57:45 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

Next, run the following:

sudo nano /etc/yum.repos.d/fedora.repo

and edit the following from:

[fedora]
...
baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/

[fedora-source]
baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/

to:

[fedora]
...
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
baseurl=http://fedora.mirrors.tds.net/pub/fedora/releases/12/Everything/x86_64/os/

[fedora-source]
...
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
baseurl=http://fedora.mirrors.tds.net/pub/fedora/releases/12/Everything/source/SRPMS/

Now, let’s do something similar to another file:

sudo nano /etc/yum.repos.d/fedora-updates.repo
[updates]
...
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/$basearch/
baseurl=http://fedora.mirrors.tds.net/pub/fedora/updates/12/x86_64/

[updates-source]
...
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/SRPMS/
baseurl=http://fedora.mirrors.tds.net/pub/fedora/updates/12/SRPMS/

Now, try to run the update again by:

sudo yum clean all
sudo yum update

It should work now. Enjoy your update!

Thoughts:

The reason why this problem happens because the Fedora server is down for at least 4 days(From 12/31 to 1/4, 2010, for four days.), and the problem is not fixed! Yes I know it is in the holiday, but it is not an excuse.

One reason why my company prefers using Fedora Linux is that it has a long history and it is backed by Red Hat. Now the quality of their service seems going down. (Their servers have gone down multiple times in December, and each down time lasted longer than a day.) I think it is probably about time for us to move to a different Linux distribution, such as Ubuntu.

Fedoraproject.org has downed.

FYI, I personally use FreeBSD for all of my server applications.

–Derrick

Our sponsors:

Installing XAMPP on Fedora 12 64-bit system

I was installing XAMPP on Fedora 11 64-bit today, and I saw this famous message:

sudo /opt/lampp/lampp startapache
XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.

The message is very clear that XAMPP doesn’t like 32-bit system. So, we will need to cheat XAMPP that the system is 32-bit. First, we will need to install some libraries:

sudo yum -y install glibc.i686 libgcc.i686 libstdc++.i686

and now, we need to skip the 32-bit annoying check. Use Nano or your favorite editor to open this file: /opt/lampp/lampp

sudo nano /opt/lampp/lampp

Replace the following from:

# XAMPP is currently 32 bit only
case `uname -m` in
       *_64)
       if /opt/lampp/bin/php -v > /dev/null 2>&1
       then
               :
       else
               $de && echo "XAMPP gibt es zur Zeit nur als 32-Bit Applikation. Bitte verwende eine 32-Bit Kompatibilitaetsbibliothek fuer Dein System."
               $de || echo "XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system."
               exit
       fi
       ;;
esac

To:

# XAMPP is currently 32 bit only
#case `uname -m` in
#       *_64)
#       if /opt/lampp/bin/php -v > /dev/null 2>&1
#       then
#               :
#       else
#               $de && echo "XAMPP gibt es zur Zeit nur als 32-Bit Applikation. Bitte verwende eine 32-Bit Kompatibilitaetsbibliothek fuer Dein System."
#               $de || echo "XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system."
#               exit
#       fi
#       ;;
#esac

Now run the following the start XAMPP:

sudo /opt/lampp/lampp startapache

Wow! Everything is working great!

–Derrick

Our sponsors:

Fedora Linux 12 is out today

Fedora Linux 12 is out today.

Here are the links to download Fedora 12:

  1. Download Fedora 12 64-Bit
  2. Download Fedora 12 32-Bit
  3. Download Fedora 12 PowerPC
  4. All versions

Suggestions:
I found that the downloading speed varies depends on which mirror you get. I suggest to test the download speed first, and re-try it (using a different mirror) if the speed is too slow.

For example, run the following command in terminal:

wget http://download.fedoraproject.org/pub/fedora/linux/releases/12/Fedora/x86_64/iso/Fedora-12-x86_64-DVD.iso

Which will show you the speed. Simply terminate the command and re-try it if the speed is too low.

Have fun with Fedora 12.

–Derrick

Our sponsors:

Can’t send mail from Fedora Linux … Solved!

I was having problem today to send out an email from my Fedora 11 Linux box. By default, the mail server software, Sendmail, comes with the standard installation and no configuration is required. I didn’t understand why the Sendmail didn’t work.

After a very detail investigation, I finally found out why. Here are the steps I went through to solve the problem.

1. Make sure the Sendmail is running.

netstats -na | grep LISTEN

You should see something is running on port 25.

2. Make sure the stupid SELinux Firewall is disabled.

3. Make sure the Linux Firewall allows port 25.

4. Try to connect to the port 25.

telnet localhost 25

If you have trouble to connect to the port, that means something is not work.

5. Make sure you are not blocking port 25 at the system level:
In /etc/hosts.allow

sendmail: localhost: allow

That should work!

Our sponsors: