Tag Archives: xampp

How to access XAMPP from external address – HTTP and MySQL

Assuming that your internal firewall is open (this is not the right thing to do BTW). you can open a connection from any IP address to your XAMPP server.  This small tutorial will take you through the changes that you will need to do in order to be able to access XAMPP host and MySQL remotely.

for Apache go to the following line “c:\xampp\apache\conf\extra\httpd-xampp.conf” and do a search for “<LocationMatch”.  Once you find it, make a change to the “Deny from all” to have a # in front of it.  See code below.

 <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
 Order deny,allow
#Deny from all
 Allow from ::1 127.0.0.0/8
 ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

Now the next thing is to fix MySQL
Once you find the “my.cnf/my.ini” file, open it up and find the line that has “[mysqld]”.  Under that set of line add skip-name-resolve.  This should fix the issue.  Note that once you enable this, you might have some issues if you are trying to login on MyPHPAdmin.  See code for example.

# The MySQL server
[mysqld]
port= 3306
socket= "C:/xampp/mysql/mysql.sock"
basedir="C:/xampp/mysql" 
tmpdir="C:/xampp/tmp" 
datadir="C:/xampp/mysql/data"
pid_file="mysql.pid"
skip-external-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error="mysql_error.log"
skip-name-resolve

Sources:
Apache Friends Support Forum • View topic – How to access XAMPP from external adress
XAMPP MySQL Server Remote Access
MySQL: Can’t get hostname for your address

Upgrading Fedora 8 to Fedora 9

Last night I just got finish upgrading my Fedora box from Fedora 8 to Fedora 9. It took me about 1 hour the whole process of downloading the packages and installing them. I did it though the terminal because I don’t have a DVD ROM on that machine and I though that was the best way. I mean I could just format the whole drive but I would need to setup my configurations again and I didn’t wanted to do that. So this tutorial will illustrate how to upgrade your Fedora box from 8 to 9 using the terminal.

Steps:

  1. Go to the “Terminal
  2. Type “su” to become a super user
  3. Now do a “yum update” to install all the packages needed
  4. Now do a “yum clean all” to clean all packages no needed
  5. Now do steps 3 and 4 again. Just to make sure that we have the latest packages
  6. Run the following command on your box “rpm -Uhv http://mirror.liberty.edu/pub/fedora/linux/releases/9/Fedora/i386/os/Packages/fedora-release-9-2.noarch.rpm http://mirror.liberty.edu/pub/fedora/linux/releases/9/Fedora/i386/os/Packages/fedora-release-notes-9.0.0-1.noarch.rpm
  7. Next do a “yum clean all
  8. Now do “yum -y update“. This will actually install all the packages needed in order to have your box upgraded from Fedora 8 to Fedora 9.

I had some problems with with my XAMPP when it was going to load.

root@localhost]# /opt/lampp/lampp start
cat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
Starting XAMPP for Linux ...
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
XAMPP for Linux started.

I resolved this error by doing this…

  1. Go to your XAMPP root folder
  2. Type “cp lampp bk-lampp
  3. Type “cat lampp.bak | sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" > lampp
  4. Type “./lampp start
  5. Then if you get the following error
    ./lampp: line 94: syntax error near unexpected token `fi'
    ./lampp: line 94: `fi'
  6. Type “gedit lampp
  7. Before line 93 insert “echo "XAMPP is working"
  8. Now run “./lampp start

That should take care of that problem and everything should work perfectly.

XAMPP

XAMPP is an application that it would help you to facilitate the hassle of installing Apache web server, MySQL, Perl and PHP individually. This tutorial will show you step by step on how to install XAMPP in Lunix and have it auto started with your computer. This tutorial was tested on Ubunut and Fedora. Replace x.x.x for the XAMPP version.

Steps:

  1. Go to http://www.apachefriends.org/en/xampp-linux.html and download “XAMPP Linux x.x.x”
  2. Open up the “Termial
  3. Become a root user bu typing “su
  4. Type the administrator password
  5. Go to where the file “xampp-linux-x.x.x.tar.gz” is downloaded
  6. Extract the files by typing this “tar xvfz xampp-linux-1.6.7.tar.gz -C /opt

Now XAMPP will be under “/opt/lampp” folder. In order to run XAMPP you will need to run this… “/opt/lampp/lampp start” as a root. If you want to stop it just replace start for stop.

To test whether your server is up go and open your web browser and type “http://localhost“. If it works you are now good to go to the next step.

This step is setting up XAMPP security. In order to do that being the root type “/opt/lampp/lampp security“.

To remove XAMPP from your system type “rm -rf /opt/lampp

If you want to have XAMPP starting with your machine when it turns on follow this steps.

  1. Find out your default runlevel type “egrep :initdefault: /etc/inittab
    You should no see a line containing a number between two colons. In most cases 3 or 5 (2 if you’re using Debian).
  2. Go into the directory which configures this runlevel. If for example your runlevel is 3, then you have to change directory into the “/etc/rc.d/rc3.d” directory.If your system didn’t provide /etc/rc.d/rc3.d please try also /etc/init.d/rc3.d and /etc/rc3.d.
  3. Now setup XAMPP to start when your computer turns on type”ln -s /opt/lampp/lampp S99lampp
    ln -s /opt/lampp/lampp K01lampp

    Now XAMPP should start and stop automatically if you boot or shutdown your machine.

And that’s it.  Hopefully you had success like I did 😛