PDA

View Full Version : HOWTO: Setup easy web development environment (XAMPP)



Pages : [1] 2

petervk
July 26th, 2006, 03:55 PM
This is a how-to for setting up a web development environment easily. This guide will install the XAMPP lampp stack into /opt, setup an easy way to start it up and shut it down, and link a folder in your home directory to the webserver.

WARNING
This guide is aimed at a development environment only and should not be used as a public webserver. To setup a public webserver follow the directions on the Ubuntu wiki https://help.ubuntu.com/community/ApacheMySQLPHP

As this is Ubuntu, all the major parts of a typical web server are included (in the main repo, or on the Ubuntu Server CD) and this is a great way to setup a server. The ubuntu developers have prepared a great web server and have made the process as seemless as possible.

But what if even the official way is still to complicated? What if you just want a quick web server for development?

Fortunately there is the XAMPP project: http://www.apachefriends.org/en/xampp.html. The XAMPP project bundles Apache, PHP4 & 5, Perl, mySQL, and a bunch of other utilities/applications into an simple package for Mac OSX, Windows, Solaris, and Linux. Obviously this HOWTO only deals with the linux version.

For those of you with already existing Apache/mySQL/php installations it installs everything into /opt so it doesn't conflict with any other installation, and it is completely setup and ready to run.

Install XAMPP

Two easy steps:

Download the most recent version of XAMPP: (at time of writing 1.5.3a)
http://prdownloads.sourceforge.net/xampp/xampp-linux-1.5.3a.tar.gz?download
(Source URL: http://www.apachefriends.org/en/xampp-linux.html#374)
Extract the archive to /opt using sudo: (make sure you are in the directory that you downloaded the archive to)
sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt


Start XAMPP

To start it up, open a terminal and type this:

sudo /opt/lampp/lampp start

Stop XAMPP

To stop it, open a terminal and type this:

sudo /opt/lampp/lampp stop

Additional XAMPP commands

To see additional commands, open a terminal and type this:

sudo /opt/lampp/lampp

Sweet XAMPP Control Panel

http://img108.imageshack.us/img108/5647/screenshotxamppcontrolpanelfj6.png

To use the sweet gtk/python control panel:

Run in a terminal:
gedit ~/.local/share/applications/xampp-control-panel.desktop

Paste the following into the open file and save and exit.

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg
"XAMPP Control Panel" will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.

Test to see if XAMPP is running

Once XAMPP is up and running open firefox and go to: http://localhost/

You should see the XAMPP test page:

http://static.apachefriends.org/images/380.jpg

Location of files and uploading

XAMPP by default uses /opt/lampp/htdocs as the root web directory. The easiest way to start working on files is to link a folder in your home directory into this directory.
My user name is peter so I have /home/peter/public_html linked to /opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I get a listing of all the files/folders in that directory. (As long is there isn't a index.php/html/etc file)
To set this up, run in a terminal:

Make public_html directory in home directory:
mkdir ~/public_html
Link to /opt/lampp/htdocs
sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

Now any files and folders you place in ~/public_html will be published to your personal webserver.

Bookmark http://localhost/username to make this easy to access.

WARNING - SECURITY
http://www.apachefriends.org/en/xampp-linux.html#381
Open holes:

The MySQL administrator (root) has no password.
The MySQL daemon is accessible via network.
ProFTPD uses the password "lampp" for user "nobody".
PhpMyAdmin is accessible via network.
Examples are accessible via network.
MySQL and Apache running under the same user (nobody).

This doesn't leave your whole system wide open, but someone could hack your XAMPP installation, so be wary.
To fix most of the security weaknesses open a terminal and run:
sudo /opt/lampp/lampp security

Feedback
Please read this post (http://www.ubuntuforums.org/showpost.php?p=1310039&postcount=5).

---- EDIT - July 28, 2006 ----
Minor Edits

---- EDIT - August 1, 2006 ----
Re-did xampp control panel shortcut to make it easier.

---- EDIT - August 16, 2006 ----
Added warning for public web servers and edited intro to make it more accurate.

---- EDIT - September 1, 2006 ----
Added sudo to security command.

gorilla_king
July 27th, 2006, 12:54 AM
contained a link to my site which had this tutorial but the one i wrote.

removed because i shut down the site

petervk
July 27th, 2006, 04:34 PM
The url is broken for me. It could be the wierd port and the firewall here at school. Do you have it mirrored somewhere else?

gorilla_king
July 27th, 2006, 06:07 PM
The url is broken for me. It could be the wierd port and the firewall here at school. Do you have it mirrored somewhere else?
yeah if your at school then i'm about 95% sure that it's broken from the firewall, and no i don't mirroed at the moment because i'm just using it as a developement server.

petervk
July 28th, 2006, 02:18 PM
So far this post has just under 200 views, So great. If you read this and use it could you leave a reply saying if it was useful/useless? I'd like to keep improving this how-to, so feedback would be good.

Plus, replies bump it up the list.

DC@DR
July 28th, 2006, 09:52 PM
This is a very nice Howto for me, I was wondering how to make php5 and php4 developements working seamlessly together in a handy way, and now I find out that XAMPP will be my best shot now. Thanks so much for this, and I bet that many ppl will find this helpful also, keep up the good work, petervk ;)

millerk123
July 30th, 2006, 02:42 PM
Very useful. That link trick alone was worth it. The .tar file didn't download for me but I just went to the XAMPP website and downloaded from one of the mirrors and then followed the rest of the instructions here.

Kevin

Soclix
July 31st, 2006, 12:32 PM
http://localhost/soclix works great but how to make it work with my ip, for my friend to have acces to http://myip/soclix ?

adamkane
July 31st, 2006, 12:44 PM
I'm biased against XAMPP. It's too unwieldy. I will be following this thread though.

Can you advise us the version of PHP and MySQL that the latest version of XAMPP installs? PHP 5.0? MySQL 5.0?

A CMS may require the use of PHP4.0 or PHP5.1 and MySQL 4.0 or MySQL 5.1.

XAMPP is pretty though.

gorilla_king
July 31st, 2006, 02:32 PM
I'm biased against XAMPP. It's too unwieldy. I will be following this thread though.

Can you advise us the version of PHP and MySQL that the latest version of XAMPP installs? PHP 5.0? MySQL 5.0?

A CMS may require the use of PHP4.0 or PHP5.1 and MySQL 4.0 or MySQL 5.1.

XAMPP is pretty though.

xampp installs the latest mysql version and gives you the option (after the install) about which version of php you would like run.

adamkane
August 1st, 2006, 09:06 AM
Would that be php 5.1 and mysql 5.1 or php 5.0 and mysql 5.0?

Does XAMPP install php/mysql from the repositories or from inside the XAMPP package?

Does phpmyadmin need to be installed separately?

louieb
August 1st, 2006, 08:52 PM
Very nice. I got a lamp development server up and running in about an hour. Download time was most of that. It took most of the day when I put a dev server of fendora 5. Now I would like to add the "sweet gtk/python control panel" to a menu. but I guess i will just use the command line till I get that one figured out. It all works Apache, mysql, php, phpmyadmin. You get a :KS from me.

petervk
August 1st, 2006, 11:37 PM
Crazy huge bold text.

I updated the XAMPP Control Panel section to hopefully make it easier.

petervk
August 1st, 2006, 11:45 PM
This is what the XAMPP package contains: (Version 1.5.3a)
From XAMPP website:

Apache 2.2.2, MySQL 5.0.21, PHP 5.1.4 & 4.4.2 & PEAR + SQLite 2.8.17/3.2.8 + multibyte (mbstring) support, Perl 5.8.7, ProFTPD 1.3.0, phpMyAdmin 2.8.1, OpenSSL 0.9.8b, GD 2.0.1, Freetype2 2.1.7, libjpeg 6b, libpng 1.2.7, gdbm 1.8.0, zlib 1.2.3, expat 1.2, Sablotron 1.0, libxml 2.4.26, Ming 0.3, Webalizer 2.01, pdf class 009e, ncurses 5.8, mod_perl 2.0.2, FreeTDS 0.63, gettext 0.11.5, IMAP C-Client 2004e, OpenLDAP (client) 2.3.11, mcrypt 2.5.7, mhash 0.8.18, eAccelerator 0.9.4, cURL 7.13.1, libxslt 1.1.8, phpSQLiteAdmin 0.2, libapreq 2.07, FPDF 1.53, XAMPP Control Panel 0.6

It installs each one of these into /opt. Nothing is taken from the repos, and nothing in the XAMPP package needs anything outside of the XAMPP package to run. It is a self contained, presetup LAMP stack that just works. Everything listed above is installed, configured, and ready to run.

adamkane:

Would that be php 5.1 and mysql 5.1 or php 5.0 and mysql 5.0?
MySQL 5.0.21
PHP 5.1.4 and 4.4.2


Does XAMPP install php/mysql from the repositories or from inside the XAMPP package?
Inside the package.


Does phpmyadmin need to be installed separately?
No. It is installed and ready to run.

rlynch
August 1st, 2006, 11:54 PM
I install this, and nothing happens when I go to http://localhost

I get this error


The connection has timed out













The server at 127.0.0.1 is taking too long to respond.








* The site could be temporarily unavailable or too busy. Try again in a few
moments.

* If you are unable to load any pages, check your computer's network
connection.

* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.


When I do a ps -ef I get this, so I see httpd is running

nobody 9986 9945 0 18:47 ? 00:00:00 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --nobody 9988 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5
nobody 9989 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5
nobody 9990 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5
nobody 9991 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5
nobody 9992 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5
nobody 9993 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5

petervk
August 2nd, 2006, 12:22 AM
Try restarting XAMPP first:

sudo /opt/lampp/lampp restart

Other then that, there is a Apache Friends forum:
http://www.apachefriends.org/f/viewforum.php?f=17&sid=48cfb0ee1c82ea7359984ccbbe4184c7

XAMPP Linux FAQ:
http://www.apachefriends.org/en/faq-xampp-linux.html

I'll try to help, but I really don't know much.

Oh, do you have some form of firewall running? That may be blocking local http. (Port 80)

Face1
August 2nd, 2006, 02:58 AM
I have a question about this. I have a fat32 partition that I would like to have my development websites on. Is this possible to do? I tried creating a soft link in /opt/lampp/htdocs to a folder on the fat32 partition, but it does not seem to do anything...In the directory listing for localhost/ there is only one html file that I put there. (I took out the default files)

petervk
August 2nd, 2006, 03:13 AM
I don't think it is possible to create a soft link to a fat32 drive. I'm pretty sure its a ext2/3 only thing and cannot span different filesystems.

What you can do is change the "DocumentRoot" in the httpd.conf file for XAMPP.

Open a terminal:


sudo cp /opt/lampp/etc/httpd.conf /opt/lampp/etc/httpd.conf.backup
sudo gedit /opt/lampp/etc/httpd.conf


Now Scroll down to the line:

DocumentRoot "/opt/lampp/htdocs"
and change it to point to your fat32 drive. (? "/media/fat32/" ?)

I'd suggest to point it only to a web subdirectory on the drive as serving up the root of the drive will put all of the files on it onto the webserver and allowing anyone to view them.

Changing this will make the fancy http://localhost/xampp test stuff stop working. (It is installed into /opt/lampp/htdocs/) Everything else should work.

Hope that helps.

adamkane
August 2nd, 2006, 03:30 AM
Nice.

Has anyone tried to add new users to mysql through phpmyadmin? Are you able to easily add new users for each database you've
created?

Can the XAMPP /opt directories be zipped up whole, and redeployed after a meltdown?

petervk
August 2nd, 2006, 03:42 AM
From phpmyadmin.net site:

Features of phpmyadmin:
manage MySQL users and privileges

So I'm assuming yes. I haven't tried it, but I'm sure you can do everything with phpmyadmin as it is the best web interface for mysql.

Backup:
http://www.apachefriends.org/en/faq-xampp-linux.html#backup
(The site's a little screwed up, just ignore the "XAMPP runs, but none of the images are shown?" section there, the backup how-to is right after it.)

According to the above guide all you have to do is keep the original tar.gz XAMPP archive and the xampp-backup-DD-MM-YY.sh file and you should be good. Just reinstall XAMPP and run the sh script to restore the backup.

Face1
August 2nd, 2006, 03:57 AM
I don't think it is possible to create a soft link to a fat32 drive. I'm pretty sure its a ext2/3 only thing and cannot span different filesystems.

What you can do is change the "DocumentRoot" in the httpd.conf file for XAMPP.

Open a terminal:


sudo cp /opt/lampp/etc/httpd.conf /opt/lampp/etc/httpd.conf.backup
sudo gedit /opt/lampp/etc/httpd.conf


Now Scroll down to the line:

DocumentRoot "/opt/lampp/htdocs"
and change it to point to your fat32 drive. (? "/media/fat32/" ?)

I'd suggest to point it only to a web subdirectory on the drive as serving up the root of the drive will put all of the files on it onto the webserver and allowing anyone to view them.

Changing this will make the fancy http://localhost/xampp test stuff stop working. (It is installed into /opt/lampp/htdocs/) Everything else should work.

Hope that helps.

I did this but I get a 403 forbidden error.

Dylan103
August 2nd, 2006, 05:51 AM
I followed the tut, but when I goto http://localhost, i get this


Index of /

Icon Name Last modified Size Description

Apache/2.0.55 (Ubuntu) Server at localhost Port 80

Dylan103
August 2nd, 2006, 05:51 AM
I followed the tut, but when I goto http://localhost, i get this


Index of /

Icon Name Last modified Size Description

Apache/2.0.55 (Ubuntu) Server at localhost Port 80

adamkane
August 2nd, 2006, 07:58 AM
I would assume yes too, but that isn't always the case with new apps on Ubuntu. Most apps that deal with users and permissions need to be packaged by a MOTU to function properly in Ubuntu.

See mysql-admin for example. Very hard to add new users thanks to the unique way that Ubuntu deals with sudo and permissions. Many other apps will not install/run thanks to sudo.

Right now the only reason to recommend xampp is that you have access to php 5.1, which is necessary for certain applications.

For those that require mysql4 or php4, xampp looks to be no good. Perhaps there are earlier versions of xampp that allow this.

And of course, if you can backup and redeploy, then it's, "Yeah, baby! Yeah!"

It will be a few days before I can find out for myself and report.

fireflymantis
August 2nd, 2006, 11:39 AM
I'm just wondering how upgrading is handled. Is the functionality built in or do you have to manually do updates?

adam.tropics
August 2nd, 2006, 12:53 PM
All was great and working until I did the reccomended security settings. So I am new to this side of things, but should the passwords I set not work with my username, or is there a default username, or is this an issue because in Ubuntu i have to run the security thing as sudo?

bulldog
August 2nd, 2006, 04:16 PM
If I'm correct the default username is set to "lampp".
This should work with the password you have set.
This info I saw when I run the security options.
Set another password myself and shall now test :p to see if it will work again.

petervk
August 2nd, 2006, 04:33 PM
Face1:
That looks like a permissions problem. Check the permissions on the directory you are accessing. It's possible that the httpd program cannot access the data therefore giving you a 403 error. If you keep having problems you could consider changing your fat32 drive to ext3 and use the ext2ifs driver for windows: http://uranus.it.swin.edu.au/~jn/linux/ext2ifs.htm Or possibly shrink your fat32 partition and create a special ext3 web development partition.

One thing about the ext2ifs driver: I would not recommend enabling access to your root directory through windows. Windows may screw it up. I wouldn't even give it access to your home partition (If you have it on a seperate partition). Windows makes a lot of files secretly and can mess up ext3 partitions so its best to limit its access to a controlled area.

Dylan103:
Did you do the "DocumentRoot" change over? Because it looks like it is pointing to an empty directory insted of the normal "/opt/lampp/htdocs"
Open the /opt/lampp/etc/httpd.conf file and check where the "DocumentRoot" is pointing too. It should be /opt/lampp/htdocs. If you changed it on purpose make sure there is something in the directory. XAMPP will not display just any file in the directory, because it hides some for security. Insert a text file or a folder to see if it is working. Apache will not just display your *.html files as it hides them, it will only start displaying your webpage if the home page is named index.html/.php.

Keep posting your questions, and I'll try to keep answering them.

petervk
August 2nd, 2006, 04:41 PM
adamkane:

Adding a user in phpmyadmin:

http://img208.imageshack.us/img208/5792/screenshotlocalhostlocalhostphpmyadmin281firefoxtx 1.th.png (http://img208.imageshack.us/my.php?image=screenshotlocalhostlocalhostphpmyadmi n281firefoxtx1.png)

http://img308.imageshack.us/img308/181/screenshotlocalhostlocalhostphpmyadmin281firefox1q y1.th.png (http://img308.imageshack.us/my.php?image=screenshotlocalhostlocalhostphpmyadmi n281firefox1qy1.png)

Everything seems to just work. I'm no mysql expert, but I just created a random user with any permissions I wanted.

rlynch
August 2nd, 2006, 10:56 PM
I install this, and nothing happens when I go to http://localhost

I get this error


The connection has timed out













The server at 127.0.0.1 is taking too long to respond.








* The site could be temporarily unavailable or too busy. Try again in a few
moments.

* If you are unable to load any pages, check your computer's network
connection.

* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.


When I do a ps -ef I get this, so I see httpd is running

nobody 9986 9945 0 18:47 ? 00:00:00 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --nobody 9988 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5
nobody 9989 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5
nobody 9990 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5
nobody 9991 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5
nobody 9992 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5
nobody 9993 9919 0 18:47 ? 00:00:00 /opt/lampp/bin/httpd -k start -DSSL -DPHP5


bump. . .are there maybe some logs I could paste or something?

petervk
August 3rd, 2006, 04:08 PM
I don't really know. What have you tried?

I replied to you in this post: http://ubuntuforums.org/showpost.php?p=1326864&postcount=16

Did you try restarting XAMPP?

Did you check to see if a firewall is blocking the connection?

You could try removing XAMPP and reinstalling.

Try the above things and re-post what you did and what happened.

rlynch
August 4th, 2006, 01:23 AM
I don't really know. What have you tried?

I replied to you in this post: http://ubuntuforums.org/showpost.php?p=1326864&postcount=16

Did you try restarting XAMPP?

Did you check to see if a firewall is blocking the connection?

You could try removing XAMPP and reinstalling.

Try the above things and re-post what you did and what happened.



I've definately tried restarting it. Rebooting, stopping, and starting it. I don't get errors when starting, each service(apache,php,mysql,proftpd) all start and stop without errors(reported by the stopping and starting).

how can I check for a firewall?

I have did the rm command posted on the xampp site, to uninstall. reinstall it, and repeated this each time I decide to try and get it working again.


Sorry I didn't reply to your last post, I thought you were talking to someone else.

petervk
August 4th, 2006, 01:30 PM
Thanks for replying.

If your still getting a "Connection is timed out" error it could be a firewall. By default Ubuntu doesn't have any form of firewall, so nothing should stop xampp.

Have you installed firestarter? or another firewall program? Have you modified anything to do with iptables? What version of Ubuntu are you using?

louieb
August 5th, 2006, 02:52 AM
Crazy huge bold text.

I updated the XAMPP Control Panel section to hopefully make it easier.

I tried the method you sugested for adding the control panel to a menu, it did not work.
What I wound up doing was going into the alacarte menu editor and open up the group I wanted the xxamp control pannel to be in. Then opened File > New Entry Gave it a name and in the command text box entered:
gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Works liked a champ. and I learned how to add a python program to a menu.

Aurdal
August 5th, 2006, 11:52 PM
How can I use Mysql-Administrator with XAMPP when I tried to connect to localhost with it I got the following error:


Could not connect to host 'localhost'.
MySQL Error Nr. 2002
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Click the 'Ping' button to see if there is a networking problem.

stryderjzw
August 6th, 2006, 02:33 AM
Oops.

petervk
August 8th, 2006, 02:28 PM
I'm sort of confused, is the mysql-administrator something included in the XAMPP package, or are you trying to get a Ubuntu package to interface with the XAMPP mysql?

I looked at the mysql-administrator page at MySQL AB's site and you should be able to do everything in phpmyadmin, which is included with the XAMPP package. I've heard rumors of a problem with the mysql-administrator package in Ubuntu (Sudo issues? Could someone confirm?) You could try downloading the tar.gz package from MySQL AB and installing that into /opt to try out the official package.

This is really outside my experience and I'm sort of shooting in the dark. If someone else could better help Aurdal it would be greatly appreciated.

Contrid
August 12th, 2006, 07:27 AM
I tried the method you sugested for adding the control panel to a menu, it did not work.
What I wound up doing was going into the alacarte menu editor and open up the group I wanted the xxamp control pannel to be in. Then opened File > New Entry Gave it a name and in the command text box entered:
gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Works liked a champ. and I learned how to add a python program to a menu.

Thanks alot for that! Though I guess I don't really need the control panel, it's nice to have it. :)

az
August 12th, 2006, 12:51 PM
But it isn't that easy. Installing Apache, PHP, mySQL, Proftp, perl, etc and setting them all up to work properly together could take someone a week. (Someone with experience could probably do this in a few hours)

Actually, it takes about four minutes using Ubuntu Dapper.

Not that Xampp is a bad thing, but that statement is wrong.

petervk
August 13th, 2006, 07:21 PM
Ok, you may be right. I haven't actually tried it. I'll add a disclaimer.

jonny
August 15th, 2006, 12:56 AM
I hate to sound negative, but I can't recommend this method of getting a development environment up and running unless you absolutely need MySQL 5. In particular, do not under any circumstances be tempted to use XAMPP on a PC that has any ports exposed to the internet unles you're absolutely certain that you know what you're doing. XAMPP is a development tool and should not be used on production boxes.

The Ubuntu way is to use software out of the repositories wherever possible. That means that you get:

- automatic security updates
- secure default settings
- guaranteed interoperability of software packages
- an effortless upgrade to Edgy.

These things are important, and shouldn't be lightly dismissed.

In Warty, Breezy and Hoary, setting up a LAMP server needed a fair bit of fiddling, but everything is superbly well engineered in Dapper. Just do
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server phpmyadmin and everything will work perfectly.

I've used XAMPP in Windows, as a WAMP server is a real pig to get running smoothly. But it's really not appropriate for ubuntu.

petervk
August 15th, 2006, 01:12 AM
I found this:
https://help.ubuntu.com/community/ApacheMySQLPHP

Still a little confusing though.

I'll try it out and possibly write a new how-to using official Ubuntu sources.

az
August 15th, 2006, 02:19 AM
I found this:
https://help.ubuntu.com/community/ApacheMySQLPHP

Still a little confusing though.

I'll try it out and possibly write a new how-to using official Ubuntu sources.

Any improvements you can give that page are welcome. Anyone can edit the wiki to improve it.

And what would really rock is if you could find out all of the ubuntu packages in universe that match Xampp applications and how to install and configure them. I'm certain that the xampp control panel and some artwork is not packaged for Ubuntu, but most of the other tools are.

The advantage would be that someone could take only the neccessary bits they want from an xampp development environment and put it on a production box more easily that way.

Contrid
August 15th, 2006, 09:48 AM
I really wish I knew how to install an SMTP server.
This is simply for the use of the PHP mail(); function.
Maybe someone has a link to a resource for me.

petervk
August 15th, 2006, 03:01 PM
I really wish I knew how to install an SMTP server.
This is simply for the use of the PHP mail(); function.
Maybe someone has a link to a resource for me.

This may help:
https://help.ubuntu.com/community/PostfixBasicSetupHowto

Still rather complex, and I don't know what you would do for a local computer without a domain name... Maybe set the domain name to localhost? Check it out though. Postfix is a Mail agent, so basically an STMP server.

Seriously though, this: https://help.ubuntu.com/community/ is a great resource. All of the forum how-tos should be migrated here.

dmeehan
August 15th, 2006, 08:47 PM
thanks, its just what i was looking for

3r14nd
August 16th, 2006, 03:52 AM
Thanx for the tut...working on getting things setup now.

Got xampp installed and openssh installed and now just to download my website from the host its on now and edit it for capitalization errors and set up the picture gallery and the vBullitin and i'm done....yeah...

Thanx a million..

petervk
August 16th, 2006, 03:22 PM
Are you using XAMPP to host a public site on your computer? I'd really recommend not using XAMPP to host a publicly accessible site. You should really use the MySQL/apache/php that is included in dapper.

XAMPP on dapper should only be used for developement.

If it is for a public webserver you should use this:
https://help.ubuntu.com/community/ApacheMySQLPHP

Dapper includes everything that is in the XAMPP package (minus mySQL 5, Dapper has mySQL 4) in the main repo (or on the Dapper server cd) so it is bug tested and supported by Canonical and it the best way to get a full server running.

Please don't use the XAMPP package for a public webserver. You are just looking for problems and insecurity.

jonny
August 17th, 2006, 09:27 AM
petervk, I'm glad to see that you've updated your how-to to make it perfectly clear that your target audience is developers. XAMPP is an excellent development tool as it installs the entire LAMP stack with the latest MySQL and a few extra useful bits in next to no time. The caveats that I raised a few posts back were purely because I was concerned that XAMPP might be misused to create publicly accessible sites.

This is now a great how-to and, although I haven't tested it myself, I wholeheartedly endorse what you're trying to achieve.

foxy123
August 17th, 2006, 01:47 PM
I tried to set up XAMPP on my laptop and desktop, following this howto. Laptop works fine, but on the desktop I've got th efollowing error, when try to access http://localhost/myusername/


Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Warning: Unknown: Failed opening '/opt/lampp/htdocs/myusername/index.php' for
inclusion (include_path='.:/opt/lampp/lib/php') in Unknown on line 0

any idea what is wrong?

petervk
August 17th, 2006, 02:33 PM
jonny:
Thanks. I appreciate the comment.

I did originally intend it for a development environment (that is what I use it for) but I did have to edit the How-to to make my intentions more clear.

foxy123:
Looks like a permissions error to me. Check the permissions on the link you created. It should be readable by everyone, writeable by only the owner, and executeable by everyone. (Excute on a folder is just being able to open it) And check that the php files in the directory are readable by everyone.

If this doesn't work for you, reply again.

foxy123
August 17th, 2006, 02:49 PM
foxy123:
Looks like a permissions error to me. Check the permissions on the link you created. It should be readable by everyone, writeable by only the owner, and executeable by everyone. (Excute on a folder is just being able to open it) And check that the php files in the directory are readable by everyone.

If this doesn't work for you, reply again.

cheers a lot, it helped!

louieb
August 19th, 2006, 01:47 AM
Actually, it takes about four minutes using Ubuntu Dapper.

Not that Xampp is a bad thing, but that statement is wrong.

Please point me to the directions and I'll check that 4 min statment out.

hypnoticstate
August 20th, 2006, 02:58 AM
Nice guide, I'm finding it very useful for testing portals and forums etc etc, but I would really like ftp access, I've used the public_html link to the correct xampp folder and everything works fine when I goto http://localhost/grant however if I start an ftp client and try ftp://localhost/grant I get asked for username and password, which is my default login, I get a directory listing that has my home folder "grant" "webalizer" and "Xampp" I can browse the files in webalizer and xampp but if I click "grant" I get

error 550 /grant : no such file or directory.

Is this because it is just a link ? is there a workaround, I really need local ftp access, because a portal I like relies on having ftp access to the server it resides on, ie my machine.

thx in advance.

guyweb
August 21st, 2006, 11:05 AM
Having installed Xampp to these instructions (worked perfectly, cheers!) I have a query which ive not seen anybody else ask.

I cant write anything to the htdocs directory nor can i change the permissions on the directory using the GUI - it says i am not the owner.

Therefore i cant add any webpages to the directory which is a problem!

I have not tried to create my own web root as per the instructions though. I assumed i might not need to do this and just be able to put stuff in the htdocs folder in lamp. Seems to not be the case.

Some posts here seemt o suggest that it should be possible to put things in the lapm htdocs folder. If this is the case, how do i do it?

Many thanks, Guy.

az
August 21st, 2006, 12:42 PM
Please point me to the directions and I'll check that 4 min statment out.

https://help.ubuntu.com/community/ApacheMySQLPHP

1. Install LAMP and phpmyadmin and whatever else (ftp server)
2. Set mysql root password
3. You're done. Apache2, php5 and mysql already talk to each other by default.

mobal
August 22nd, 2006, 06:25 PM
Can i online Update XAMPP ?

petervk
August 22nd, 2006, 07:21 PM
Pardon?

I don't understand what your asking about. Could you please restate the question with more detail.

louieb
August 24th, 2006, 04:50 AM
There has been a lot of discussion in the thread about using xampp vs installing the Ubuntu lamp packages. So I now I've done both and this has been my experience so far.

Because I am an expert at screwing Ubuntu up I've also become a expert at installing it. Both machines started with a fresh install from the Ubuntu 6.06 LTS Live CD. and then software updates were installed.

XAMPP was installed on a PII 400 348MB ram.
Using the instructions posted at the start of this thread XAMPP was downloaded and installed in about 30 minutes. Mysql is running and Phpmyadmin works. and I had my browser displaying one of my web pages about 10 min later.

Ubuntu Lamp was installed on a PIII 433 256MB ram.
Using instructions at https://help.Ubuntu.com/community/ApacheMySQLPHP
the lamp package was downloaded an installed in about 30 minutes.

sudo aptitude install apache2 php5-mysql libapache2-mod-php5 mysql-server
sudo aptitude install of phpmyadmin

MYSQL is running. At this point Apache is running but is not talking to PHP.

The instruction page has a troubleshooting section for PHP. Took 5-10 minutes to follow and run the commands in that section. Restarted Apache and tried again. Apache is still not talking to PHP.

For what I wanted to do which is set up a development web server XAMPP was the easiest. I followed the installation instructions and it worked.

Ubuntu lamp install was the second easiest even after I take the time to go over the Apache - PHP interface to figure out what is wrong. When I say it is the second easiest I mean it is mostly working now after spending only about 35-40 minutes.

It took me most of a day to set up a LAMP development server on Fedora 5.

This is the reason I took up Linux. I was trying to set up a development server using Windows XP, IIS, PHP5 and MYSQL. It was a pain to get the parts to work together. I finally scraped IIS and installed Apache on the windows box and it was able to get that working. At that point I realized I was close to having my own LAMP machine all I needed was Linux. So I went to Fry's and bought a book that had some Linux distributions. It's been interesting.

amaechler
August 24th, 2006, 12:30 PM
Thanks for that great tutorial, that's exactly what I've been looking for! Works out of the box on dapper=D>

petervk
August 24th, 2006, 03:28 PM
louieb:
Thanks for that test. I always meant to do that myself just so I could see how hard it is.

I still think the official *AMP packages are the best way to do it, but the XAMPP package is really quick and easy. (And no messing around with trying to get php & apache talking, as it just works)

But I'm confused, azz said eailier in this thread:

https://help.ubuntu.com/community/ApacheMySQLPHP

1. Install LAMP and phpmyadmin and whatever else (ftp server)
2. Set mysql root password
3. You're done. Apache2, php5 and mysql already talk to each other by default. (bold added by me)

azz:
Could you help clear this up? Is there any reason that for louieb php & apache didn't get setup right?

GordonWright
August 31st, 2006, 11:11 AM
Tried following the instructions but being a complete noob I'm having difficulties (at the risk of sounding like a heretic I had no problems installing Xampp on my XP machine, guess I'll grow to love Ubuntu).

I downloaded Xampp tarball to the desktop and then followed the instructions as best I could but at the first stage


sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt

I keep getting file or directory does not exist/ can't be found (or similar, I'm at work right now so don't have the machine to hand to transcribe exactly).

I suspect my problem may be with


(make sure you are in the directory that you downloaded the archive to)

Tried extracting and copying across to /opt but I get the you do not have permission message. Do I need to log in as root to allow this process?

petervk
August 31st, 2006, 02:24 PM
GordonWright:
"make sure you are in the directory that you downloaded the archive to" means if you downloaded it to your home directory you should be in your home directory.

You may have typed the file name wrong, try typing:

sudo tar xvfz xampp-linux[TAB] -C /opt
Hitting the tab key will autocomplete the line with the true file name. (If the xampp-linux* file is in the directory you are currently in.)

And, yes. /opt is protected. You don't need to be logged in as root to access it though. Hit Alt-F2 and type in "gksudo nautilus" to start up a root file browser. Be careful though, don't delete or move anything else or you'll seriously screw up your computer.

Tell me if you get it working.

GordonWright
August 31st, 2006, 06:02 PM
OK thanks for the help. I still get the error running in the terminal but used nautilus to copy and paste it across and it is now running, but...

Trying to get the control panel to work I get this message in the terminal when running the following code


gedit ~/.local/share/applications/xampp-control-panel.desktop

** (gedit:6078 ): WARNING **: Hit unhandled case 1 (File not found) in gedit_unrecoverable_saving_error_message_area_new.


So although it opens the file for pasting the text when it comes to saving it says file doesn't exist. It's no real biggie though next step for me is to decide on Joomla, Mambo, Drupla or a.n.other...

Many thanks for your help petervk:)

petervk
August 31st, 2006, 06:28 PM
Your welcome.

I guess the only disclaimer I have is that I hope you are just using xampp for just developing a website. It is really easy to setup and everything but the official ubuntu packages for mysql, php, apache, perl, and Drupla (http://packages.ubuntu.com/dapper/web/drupal) are the best way to do a public server. They have security measures in place (unlike xampp which is wide open) and will automatically upgrade with ubuntu.

But anyways, have fun!

az
August 31st, 2006, 07:25 PM
azz[/B]:
Could you help clear this up? Is there any reason that for louieb php & apache didn't get setup right?

I dunno. It works out-of-the-box. It's packaged that way.

You cannot have both php4 and php5 using apache at the same time. Perhaps if someone tries to do that, they will get into trouble.

But if all you do is install a fresh Dapper box and run
sudo aptitude install apache2 php5-mysql libapache2-mod-php5 mysql-server
sudo aptitude install of phpmyadmin

all you have to do is set the mysql password and you are done.

And the download is about 40 megs or so, which is downloaded and installed in about two minutes. I don't know why it took 30 minutes to download for him.

petervk
August 31st, 2006, 07:36 PM
azz:
Thanks. I can't currently try it but thanks for replying.

GordonWright
August 31st, 2006, 09:15 PM
Your welcome.

I guess the only disclaimer I have is that I hope you are just using xampp for just developing a website.

:lol: Yeah just developing something locally. Thanks for all your help, I'm sure as I get to grips with Ubuntu that I'll solve the control panel issue. Am enjoying the change from M$! Learning all the time.

Started passing the Edubuntu CDs around tech support staff for all the schools in the area :p

ice60
August 31st, 2006, 10:42 PM
hi, to secure everything i had to run

sudo /opt/lampp/lampp security
not

/opt/lampp/lampp security

thanks for the HowTo :)

az
September 1st, 2006, 04:10 AM
azz:
Thanks. I can't currently try it but thanks for replying.


This is from a 600 Mhz pentium III box:

andy@andy-desktop:~$ sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server phpmyadmin
Reading package lists... 6%
andy@andy-desktop:~$ time sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server phpmyadmin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apache2-common apache2-mpm-prefork apache2-utils libapr0 libdbd-mysql-perl
libdbi-perl libnet-daemon-perl libpcre3 libplrpc-perl mysql-client-5.0
mysql-server-5.0 php5-cgi php5-common php5-mysqli
Suggested packages:
apache2-doc php-pear dbishell libcompress-zlib-perl
Recommended packages:
mailx php5-mcrypt php4-mcrypt php5-gd php4-gd
The following NEW packages will be installed:
apache2 apache2-common apache2-mpm-prefork apache2-utils libapache2-mod-php5
libapr0 libdbd-mysql-perl libdbi-perl libnet-daemon-perl libpcre3
libplrpc-perl mysql-client-5.0 mysql-server mysql-server-5.0 php5-cgi
php5-common php5-mysql php5-mysqli phpmyadmin
0 upgraded, 19 newly installed, 0 to remove and 40 not upgraded.
Need to get 40.4MB of archives.
After unpacking, 100MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ca.archive.ubuntu.com edgy/main libapr0 2.0.55-4ubuntu2 [132kB]
Get:2 http://ca.archive.ubuntu.com edgy/main libpcre3 6.4-2ubuntu1 [174kB]
Get:3 http://ca.archive.ubuntu.com edgy/main apache2-utils 2.0.55-4ubuntu2 [91.6kB]
Get:4 http://ca.archive.ubuntu.com edgy/main apache2-common 2.0.55-4ubuntu2 [786kB]
Get:5 http://ca.archive.ubuntu.com edgy/main apache2-mpm-prefork 2.0.55-4ubuntu2 [198kB]
Get:6 http://ca.archive.ubuntu.com edgy/main apache2 2.0.55-4ubuntu2 [35.6kB]
Get:7 http://ca.archive.ubuntu.com edgy/main php5-common 5.1.4-0.1ubuntu1 [138kB]
Get:8 http://ca.archive.ubuntu.com edgy/main libapache2-mod-php5 5.1.4-0.1ubuntu1 [2271kB]
Get:9 http://ca.archive.ubuntu.com edgy/main libnet-daemon-perl 0.38-1.1 [45.9kB]
Get:10 http://ca.archive.ubuntu.com edgy/main libplrpc-perl 0.2017-1.1 [35.0kB]
Get:11 http://ca.archive.ubuntu.com edgy/main libdbi-perl 1.51-2 [640kB]
Get:12 http://ca.archive.ubuntu.com edgy/main libdbd-mysql-perl 3.0006-1 [138kB]
Get:13 http://ca.archive.ubuntu.com edgy/main mysql-client-5.0 5.0.22-3ubuntu1 [6285kB]
Get:14 http://ca.archive.ubuntu.com edgy/main mysql-server-5.0 5.0.22-3ubuntu1 [21.2MB]
Get:15 http://ca.archive.ubuntu.com edgy/main mysql-server 5.0.22-3ubuntu1 [36.6kB]
Get:16 http://ca.archive.ubuntu.com edgy/main php5-cgi 5.1.4-0.1ubuntu1 [4481kB]
Get:17 http://ca.archive.ubuntu.com edgy/main php5-mysqli 5.1.4-0.1ubuntu1 [38.0kB]
Get:18 http://ca.archive.ubuntu.com edgy/main php5-mysql 5.1.4-0.1ubuntu1 [22.2kB]
Get:19 http://ca.archive.ubuntu.com edgy/universe phpmyadmin 4:2.8.1-1 [3607kB]
Fetched 40.4MB in 1m9s (583kB/s)
Preconfiguring packages ...
Selecting previously deselected package libapr0.
(Reading database ... 104838 files and directories currently installed.)
Unpacking libapr0 (from .../libapr0_2.0.55-4ubuntu2_i386.deb) ...
Selecting previously deselected package libpcre3.
Unpacking libpcre3 (from .../libpcre3_6.4-2ubuntu1_i386.deb) ...
Selecting previously deselected package apache2-utils.
Unpacking apache2-utils (from .../apache2-utils_2.0.55-4ubuntu2_i386.deb) ...
Selecting previously deselected package apache2-common.
Unpacking apache2-common (from .../apache2-common_2.0.55-4ubuntu2_i386.deb) ...
Selecting previously deselected package apache2-mpm-prefork.
Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.0.55-4ubuntu2_i386.deb) ...
Selecting previously deselected package apache2.
Unpacking apache2 (from .../apache2_2.0.55-4ubuntu2_i386.deb) ...
Selecting previously deselected package php5-common.
Unpacking php5-common (from .../php5-common_5.1.4-0.1ubuntu1_i386.deb) ...
Selecting previously deselected package libapache2-mod-php5.
Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.1.4-0.1ubuntu1_i386.deb) ...
Selecting previously deselected package libnet-daemon-perl.
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.38-1.1_all.deb) ...
Selecting previously deselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2017-1.1_all.deb) ...
Selecting previously deselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.51-2_i386.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_3.0006-1_i386.deb) ...
Selecting previously deselected package mysql-client-5.0.
Unpacking mysql-client-5.0 (from .../mysql-client-5.0_5.0.22-3ubuntu1_i386.deb) ...
Selecting previously deselected package mysql-server-5.0.
Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.0.22-3ubuntu1_i386.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.0.22-3ubuntu1_all.deb) ...
Selecting previously deselected package php5-cgi.
Unpacking php5-cgi (from .../php5-cgi_5.1.4-0.1ubuntu1_i386.deb) ...
Selecting previously deselected package php5-mysqli.
Unpacking php5-mysqli (from .../php5-mysqli_5.1.4-0.1ubuntu1_i386.deb) ...
Selecting previously deselected package php5-mysql.
Unpacking php5-mysql (from .../php5-mysql_5.1.4-0.1ubuntu1_i386.deb) ...
Selecting previously deselected package phpmyadmin.
Unpacking phpmyadmin (from .../phpmyadmin_4%3a2.8.1-1_all.deb) ...
Setting up libapr0 (2.0.55-4ubuntu2) ...
Setting up libpcre3 (6.4-2ubuntu1) ...
Setting up apache2-utils (2.0.55-4ubuntu2) ...
Setting up apache2-common (2.0.55-4ubuntu2) ...
Setting Apache2 to Listen on port 80. If this is not desired, please edit /etc/apache2/ports.conf as desired. Note that the Port directive no longer works.
Module userdir installed; run /etc/init.d/apache2 force-reload to enable.
Setting up apache2-mpm-prefork (2.0.55-4ubuntu2) ...
* Starting apache 2.0 web server... apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ ok ]
Setting up apache2 (2.0.55-4ubuntu2) ...
Setting up php5-common (5.1.4-0.1ubuntu1) ...
Setting up libapache2-mod-php5 (5.1.4-0.1ubuntu1) ...
* Forcing reload of apache 2.0 web server... apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ ok ]
Setting up libnet-daemon-perl (0.38-1.1) ...
Setting up libplrpc-perl (0.2017-1.1) ...
Setting up libdbi-perl (1.51-2) ...
Setting up libdbd-mysql-perl (3.0006-1) ...
Setting up mysql-client-5.0 (5.0.22-3ubuntu1) ...
Setting up mysql-server-5.0 (5.0.22-3ubuntu1) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
.
.
Setting up mysql-server (5.0.22-3ubuntu1) ...
Setting up php5-cgi (5.1.4-0.1ubuntu1) ...
Setting up php5-mysql (5.1.4-0.1ubuntu1) ...
Setting up php5-mysqli (5.1.4-0.1ubuntu1) ...
Setting up phpmyadmin (2.8.1-1) ...
Creating config file /etc/phpmyadmin/apache.conf with new version
Creating config file /etc/phpmyadmin/config.footer.inc.php with new version
Creating config file /etc/phpmyadmin/config.header.inc.php with new version
Creating config file /etc/phpmyadmin/config.inc.php with new version
Creating config file /etc/phpmyadmin/htaccess with new version
real 2m33.077s
user 0m41.011s
sys 0m13.953s
andy@andy-desktop:~$

So that's about two minute thirty seconds. Then I browsed localhost. See screenshots attached:

petervk
September 1st, 2006, 02:41 PM
Wow. Thats impressive. 2m33s to a working *amp server. Amazing.

We need to do some work on the community doc's to reflect how easy this is to do. They currently look much more involved.

Thanks for the great example.

louieb
September 1st, 2006, 11:26 PM
With the idea of setting up a web server for use on my home LAN.
I wiped out the Ubuntu install on the PIII 433 256MB ram and did an install from the Ubuntu 6.06 i386 Server CD. I used the instructions found at http://digg.com/linux_unix/LAMP_on_Ubuntu_6_06_for_Noobs the only difference was I installed the xubuntu-desktop instead of the ubuntu-desktop. This install took about half a day. Don't know why It went so slow, it seem to take forever to install desktop portion. Installation worked. Now I am trying to find the time to setup being able to administrate the server from one of the other P.C's on the LAN.

Azz wondered why my download took 30 min when his took 2.5 min. I am on DSL and all that means is that it faster that dial-up. In fact my provider SBC global now ATT offers 3 different DSL packages with 3 different speeds. When I download here at home the speed reported is around 140 to 160 kbps whatever that means. Whenever I download something very large I try to do it at work or school. Or just start here it and go to Bed. Makes a hell of a difference using a T1 line.

az
September 9th, 2006, 12:30 PM
When I download here at home the speed reported is around 140 to 160 kbps whatever that means. Whenever I download something very large I try to do it at work or school. Or just start here it and go to Bed. Makes a hell of a difference using a T1 line.

"Fetched 40.4MB in 1m9s (583kB/s)"

So for you, that should have been something like four minutes at 150 KB/s instead of 1m9s at 580 KB/s (residential cable)

mustang
September 11th, 2006, 11:18 PM
Very very cool m8.

I've been working on a website that needs PHP + MySQL. As of late I've been using but godawfully slow host, awardspace. Eventually I planned on moving to a paid host once I am done building it but it is a huge pain to build on awardspace. No SSH so everytime you want to modify a file, it takes about 3 clicks and a lot of scrolling.

Now I'll be able to edit in gedit, hit save, and refresh. And refreshs are instant! That cuts so many barriers. Thanks again m8.

toykilla
September 16th, 2006, 05:10 PM
I am trying to move my database into the appropriate directory, but when trying to access:

/opt/lampp/var/mysql/database

I get:

bash: cd: nagtrocforum/: Permission denied

mimine
November 3rd, 2006, 12:39 AM
Hi everyone!

I have a two different problems:

The fist which led me to this how to is using the xampp apache server to display SVG files. I the browsers don't display the graphic and give the svg code instead of that. I made some research and I know that it has maybe relation with the .htaccess file. BUT I DON'T FIND THIS FILE IN XAMPP !!!

The second problem is installing the "sweet" xampp control pannel. The istructions don't give any result. I am using KDE (KUBUNTU) maybe it is not the same procedure for KDE.

Thank you guys!

millo
November 9th, 2006, 01:00 AM
Hi,

I've got a strange problem on my xampp server which is causing me confusion. ](*,)

What I've tried to do is set up virtual hosts, which is pretty much working correctly but every time I go to the virtual host url it always redirects to a relative folder called 'xampp'. So, in effect, if I get www.example.com set up correctly on my web server as a virtual host, configure this url into the etc/hosts file, restart apache and networking and then make request for it via my browser, it will redirect me to the url http://www.example.com/xampp.

Can anyone explain why this could happen?

I've even gotten to the point of leaving xampp shutdown and installed apache2 from synaptic package manager, successfully installed and again set up virtual hosts but it still somehow wants to go into /xampp directory. I've tried different names for the virtual folders and all kinds of things and it appears that the virtual hosts thing is working fine but just this, it always seems to redirect into a relative folder called 'xampp'.

No clue.

Much appreciated if anyone can help.

millo
November 9th, 2006, 01:10 AM
Ahem, gulp. Oops. That was the silly cache on my browser .... Sorry.

Eastex Cruiser
December 8th, 2006, 07:26 PM
WINDOWS XP ------ WORKGROUP SWITCH ------- UBUNTU SERVER

Is it possible for me to write to the local computer through a networked XP computer. I have XAMPP working properly on a new Ubuntu 6.10 install. But I'm now trying to upload a website through a networked XP computer, and the Ubuntu system is telling me I don't have permission. I can, however, access the XAMPP website on the same directory. (I hope this makes sense).

In other words, I have a simple network with (1) Windows XP machine, 1 switch, and 1 Ubuntu 6.10 machine using XAMPP. Can I use FTP through my XP machine to upload my GoLive websites?

amk221
December 9th, 2006, 04:09 PM
I followed the tutorial exactly, and it all works well


My user name is peter so I have /home/peter/public_html linked to /opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I get a listing of all the files/folders in that directory. (As long is there isn't a index.php/html/etc file)

But as soon as I put files in the public_html dir, I get 403 Forbidden at http://localhost/[username]
I expect this is simple to amend, but I don't know how... cheers

rustncogs
December 22nd, 2006, 12:10 AM
1

jcroot
December 25th, 2006, 07:52 PM
I'm having the same problem as the other guy...

I download the XAMPP tar file to my Desktop so I open the terminal and enter this command:

tar xvfz xampp-linux-1.5.5a.tar.gz -C /opt

But it says:

tar: xampp-linux-1.5.3a.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors


----

So, I tried this:

Open Terminal:

cd Desktop

I get this: ~/Desktop$

And then enter:
tar xvfz xampp-linux-1.5.5a.tar.gz -C /opt

And I'm still having the same error message... I wonder why this happen? I hope somebody can give me a hand with this.

5h4rk
December 30th, 2006, 02:35 PM
I got a LAMP installed, I think :S

How can I uninstall it and install XAMPP?

Or shoulnt I be doing that?

:confused:

Gamzarme
January 1st, 2007, 07:35 PM
Great forum thread you have here, Petervk. =)

Quick question: is it possible to set up some form of a control panel with XAMPP on Ubuntu server distribution? I have the server setup and serving so everything works well, although I'd now like the options to add FTP accounts, manage sub-domains and other similar tasks from a remote web interface.

So, in other words, the server I have setup is a command line, headless system that I have setup and it just..runs. Nothing complicated, but I'd like to use my other computer and Firefox to remotely configure the server.

Does XAMPP already have a form of server configuration already included in it's packages that I maybe need to up setup?

-Patrick

Tjoels
January 7th, 2007, 12:14 PM
This was very useful. It's easy to set up and manage, and with this, you have everything in one place. - great howto! :p

I just have a problem with mySQL, cause i want to set up amarok to use mySQL, but when i make a database and user for it, granting all permissions and everything, amarok can only connect 'sometimes', and not even rescan the collection. it's very strange... Are phpMyAdmin the right tool to set up a database for amarok?

pgm8705
January 11th, 2007, 09:33 PM
I have the same problem. going to localhost does nothing. help would be greatly appreciated.

jkeirstead
January 15th, 2007, 12:08 AM
Hi,

I've got the same problem as the recent posters above. Followed all the instructions in the first post (and read the next 9 pages). But http://localhost/user still gives a 403 error (where /opt/lampp/htdocs/user is a sym link to /home/user/pub_html

Thanks

jd4x4
January 17th, 2007, 03:55 AM
Seems like the replies to this thread are dead, but anyway...
I got the same "xampp-linux-1.5.5a.tar.gz: Cannot open: No such file or directory", etc errors as well. After trying to add the full path to the .gz name, etc., I finally moved the file to my dir under home & extracted the files. Then I did terminal and sudo mv on the lampp folder and moved it manually to /opt. But, now when I browse to localhost I get:
"Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/index.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/xampp/index.php:2) in /opt/lampp/htdocs/xampp/index.php on line 4"

I thought maybe all of this had something to do with trying to use XAMPP under XUbuntu, but now I'm not sure.

Anyone been sucessful in using it with XUbuntu 6.10? Or how about success under any 6.10 release??

jd4x4
January 17th, 2007, 04:39 AM
Hmm. Well, something must have changed with 6.10, I guess. I set my firefox default download dir to my dir rather than the default Desktop, and downloaded XAMPP again.

Then, with terminal I did "sudo tar xvfz xampp-linux-1.5.5a.tar.gz -C /opt" and it extracted fine, and localhost now works as it should in the browser!

Just to ease my pain, I also downloaded webmin from
http://prdownloads.sourceforge.net/webadmin/webmin_1.310_all.deb
and then ran (right-click) "Open with GDebi Installer" from Thumber. It too, works as advertized (I'm running XUbuntu 6.10). Now, to figure out how to get the "Sweet" interface in the menu & I'm all set!

Kewl.

jkeirstead
January 17th, 2007, 12:50 PM
Found the problem - the sym link should be the other way around. Not from /opt/lampp/htdocs/user to /home/user/pub_html but vice versa.

The following fixed it.


sudo ln -s /opt/lampp/htdocs/$USER /home/$USER/public_html
sudo chown $USER:$USER /home/$USER/public_html

jammodotnet
January 22nd, 2007, 08:19 AM
Found the problem - the sym link should be the other way around. Not from /opt/lampp/htdocs/user to /home/user/pub_html but vice versa.

The following fixed it.


sudo ln -s /opt/lampp/htdocs/$USER /home/$USER/public_html
sudo chown $USER:$USER /home/$USER/public_html

THANK YOU tremendously.

I reinstalled XAMPP about 3 times last night, and once again today, following all these pages of advice. But your tip was/IS the only one that worked for me.

Now I got my WordPress development site running. :)

erkki70
January 25th, 2007, 01:21 PM
I tried the method you sugested for adding the control panel to a menu, it did not work.
What I wound up doing was going into the alacarte menu editor and open up the group I wanted the xxamp control pannel to be in. Then opened File > New Entry Gave it a name and in the command text box entered:
gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py" Works liked a champ. and I learned how to add a python program to a menu.

Hi there and thanx a lot for the nice tutorial.
To get the control panel working I did some mods and had it working nicely :-)
Just add
Categories=Application;Network; before Comment=... and it will then appear in the Applications menu under Internet.
Here's my mod:

[Desktop Entry]
Categories=Application;Network;
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo /opt/lampp/share/xampp-control-panel/xampp-control-panel.py
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
NoDisplay=false
StartupNotify=true
Terminal=false
Name=XAMPP Control Panel
Comment=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg


I also noticed that Exec=... worked without specifying python "..."

Cheers,

Erkki

neill
January 25th, 2007, 06:42 PM
hi

if i want to use xammp to run gallery 2 on a LAN server only (ie no public face), do i have to worry too much about the security stuff ?

if i do secure the install, however, what difference does that make to the users ?

thanks

neill

erikringmar
January 29th, 2007, 11:13 PM
Hi Peter,

This is a great how-to. However, there is something I'm not doing right. I still get the xampp welcome message as my default for the browser. How to get rid of it?

Erik

jammodotnet
January 29th, 2007, 11:26 PM
Hi Peter,

This is a great how-to. However, there is something I'm not doing right. I still get the xampp welcome message as my default for the browser. How to get rid of it?

Erik
so you've got XAMPP installed right?
follow the directions in your browser. they walk you through the steps to secure your installation. without securing you installation, you are leaving your system open to outside attacks.

erikringmar
January 30th, 2007, 03:54 AM
Hi again Peter,

Thanks. Zampp up and running, but I can't seem to redirect the browser to my home/erik directory. How to do this?

all the best,

Erik

bodhi.zazen
February 4th, 2007, 05:56 AM
Nice How-to

This thread has been added to the UDSF wiki.

XAMPP (http://doc.gwos.org/index.php/XAMPP)

shrek
March 2nd, 2007, 06:07 PM
Thanks for the tutorial. The best part of my attempt to move from XP to Ubuntu is the helpful community postings.

I am trying to setup Joomla on XAMPP and was able to follow the post up to the section on the Sweet XAMPP Control Panel. After entering the command gedit ~/.local/share/applications/xampp-control-panel.desktop in a terminal and pasting the text into the resulting window I get the following error when trying to save the document.

** (gedit:7468): WARNING **: Hit unhandled case 1 (File not found) in gedit_unrecoverable_saving_error_message_area_new.

I see at least one other person also had a problem saving the gedit file but no solution was posted. What do I need to do, manually create the .local/share/applications/xampp-control-panel.desktop file?

bryand
March 15th, 2007, 10:37 AM
1

Raval
March 17th, 2007, 10:14 PM
I got the following errors:

Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/index.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/xampp/index.php:2) in /opt/lampp/htdocs/xampp/index.php on line 4

any help?

Raval
March 18th, 2007, 02:58 PM
I got the following errors:

Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/index.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/xampp/index.php:2) in /opt/lampp/htdocs/xampp/index.php on line 4

any help?

Anyone, please?

ziadoz
March 18th, 2007, 03:50 PM
I followed the tutorial exactly, and it all works well



But as soon as I put files in the public_html dir, I get 403 Forbidden at http://localhost/[username]
I expect this is simple to amend, but I don't know how... cheers

Make sure you have read access to the files. I had exactly the same problem when I copied over all my Windows XP development files. Seemed to sort it out.

vnt87
March 26th, 2007, 06:15 AM
Hi
I just installed XAMPP for my Edgy box using the intrusction above. But somehow when I try to start LAMPP, only Apache and ProFTPD seem to be able to start, MySQL just refuses to work (I looked at the XAMPP Control Panel and the button next to MySQL always read 'Execute' no matter how many time I click it)
Moreover, when I navigate to localhost, I got a 403 error.
Does anybody have an idea of what went wrong here?

unabatedshagie
March 29th, 2007, 03:03 AM
This might be a silly question but I have just installed xampp but how do I get it to start every time I log in?

I can't just add /opt/lampp/lampp start to the startup programs because I need to have sudo infront of it to start it in a terminal.

gmconie
April 12th, 2007, 03:20 AM
Excellent howto.

I had problems with setting up the control panel. Fixed these by:

manually creating the .local/share/applications directories.
And then using the config file posted by erkki70.

Thanks

cius
April 26th, 2007, 08:53 PM
Wonderful HOWTO! I've just started my personal web site and have experimented with setting my own in-house test server on an old computer. I was having trouble when I ran across this HOWTO. Now I have a personal server on my main machine. After going through the "lampp security" and setting up proper passwords for everything, I may now start the heavy lifting on my site design. Thank you again!

unabatedshagie
April 26th, 2007, 10:24 PM
I found the following on the apache friends website. Forgive the stupid question but could someone tell me how to do this with feisty?
After I rebooted my Linux box XAMPP stopped running! How can I fix this?
Correct. That's normal Linux behaviour (which applies to any other Unix-like system. It's the admin's job to make sure a particular application is started at bootup.

There is no real standard way to configure the boot process of a Linux system, but most of them should allow you to start XAMPP at boot time using the following steps.

1. First, find out your default runlevel.
Simply 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 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 carry out the actual configuration by typing:

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.

goodtimetribe
April 27th, 2007, 06:53 PM
So far this post has just under 200 views, So great. If you read this and use it could you leave a reply saying if it was useful/useless? I'd like to keep improving this how-to, so feedback would be good.

Plus, replies bump it up the list.

Haven't used it yet, but it's my plan to after the semester's over.

XTREEM|RAGE
May 15th, 2007, 10:44 AM
Nice almost everything worked :D
except this...


[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg

That didnt work for me ;x

XTREEM|RAGE
May 15th, 2007, 08:17 PM
]

i saw that 2, but didnt work :( .
Does any1 know how we can install this as a server in feisty? So it automatically start when i boot to ubuntu?

jingo811
May 20th, 2007, 11:39 PM
I'm thinking about creating a MySpace like community webpage and I believe Drupal can help me with that without me having to know how to code it myself.

Does anybody have any instructions on how do install Drupal properly for XAMPP?
I couldn't find any straight forward instructions over there :(

jammodotnet
May 21st, 2007, 06:19 PM
I'm thinking about creating a MySpace like community webpage and I believe Drupal can help me with that without me having to know how to code it myself.
impossible.
it doesn't have that ability out of the box.
you would require custom coding.


Does anybody have any instructions on how do install Drupal properly for XAMPP?
I couldn't find any straight forward instructions over there :(
the instructions shouldn't be any different than installing on a server.
i've got activeCollab, WordPress and ExpressionEngine installed on my PC. they work flawlessly.
there is no difference in installation directions.

nousefreak
May 23rd, 2007, 01:51 AM
isn't there any way to make the localhost (http://localhost/) redirect to /home/public_html and not to the XAMPP folder without the use of a subfolder

jnorris235
June 16th, 2007, 07:40 PM
Unbelievable! Saved so much time over the last time I installed them all separately!

However I cannot get the link to appear in the main menu with that gedit script.
Did exactly as you said, honest!

Using feisty.
It all works fine started from terminal (but terminal is a pain if you can have a shortcut!)

edmondt
June 16th, 2007, 11:22 PM
Great HOWTO :) Nice and Easy... Latest file is xampp-linux-1.6.2.tar.gz at http://sourceforge.net/project/showfiles.php?group_id=61776&package_id=60248&release_id=511815

UbuNewbie123
June 17th, 2007, 12:56 PM
Any idea how to make XAMPP auto start on every boot up on Ubuntu Server?

http://www.apachefriends.org/en/faq-xampp-linux.html#fsl

The tutorial above does not seem to apply for Ubuntu Server.

nikkiana
June 21st, 2007, 05:38 PM
I'm thinking about creating a MySpace like community webpage and I believe Drupal can help me with that without me having to know how to code it myself.

Does anybody have any instructions on how do install Drupal properly for XAMPP?
I couldn't find any straight forward instructions over there :(

It's fairly straightforward. Install XAMPP and start it, go to http://localhost/phpmyadmin, create your database, put the drupal files into the linked folder you set up for XAMPP, and then go to localhost/username and then Drupal should step you through the rest.

flaming_monkey
June 21st, 2007, 10:05 PM
Worked great. I've now got a clean Wordpress install to start theme up. Thanks.

pvilleSE
June 24th, 2007, 05:07 PM
Thank you, this was very useful.

Skavenger
June 26th, 2007, 02:00 AM
isn't there any way to make the localhost (http://localhost/) redirect to /home/public_html and not to the XAMPP folder without the use of a subfolder
I want that too

asmweb
June 27th, 2007, 05:30 PM
I want that too

I did uninstall the xampp and installed everything separately ... but now when I type http://localhost it redirects me to http://localhost/xampp which is not. how can i make it not do the redirect. thanks

cosine7
June 30th, 2007, 06:38 AM
Worked Fine first go! Thanks

dkc
July 11th, 2007, 08:22 AM
hi,

i'm new to linux and have just installed feisty. i'm having problems installing the Sweet XAMPP Control Panel.

when i run gedit ~/.local/share/applications/xampp-control-panel.desktop and try to save the fil contents i get the error:
Could not save the file /home/dzikamai/.local/sh…mpp-control-panel.desktop.
Unexpected error: File not found

i'm assuming this directory does not exist in my feisty folder hierarchy.
does anyone know what i need to do to fix this..

regards,

zak

poji23
July 12th, 2007, 04:53 AM
I did uninstall the xampp and installed everything separately ... but now when I type http://localhost it redirects me to http://localhost/xampp which is not. how can i make it not do the redirect. thanks

Look in /opt/lampp/htdocs/index.html and you'll see there's this line of html code:

<meta http-equiv="refresh" content="0;url=/xampp/">

That line redirects to the /xampp folder. Just remove that line and place your files in the /opt/lampp/htdocs/ and you should be good to access http://localhost/

texplorer
August 1st, 2007, 11:00 PM
I cannot see the test page, I am getting the following error. I guess the permission to the folder is not sort out.
I cannot see the control panel either.

Thanks,

Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/index.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/xampp/index.php:2) in /opt/lampp/htdocs/xampp/index.php on line 4

svalley
August 2nd, 2007, 04:18 PM
the instructions that arrived with xampp_ubuntu didn't work; yours worked perfectly

thank you for your perfectly useful posting on installation/running xampp!

guysmiley
August 12th, 2007, 12:56 AM
I too am receiving the error:



~/.local/share/applications/xampp-control-panel.desktop and try to save the fil contents i get the error:
Could not save the file /home/dzikamai/.local/sh…mpp-control-panel.desktop.
Unexpected error: File not found

How can this be fixed?

babacan
August 13th, 2007, 06:45 AM
Hey lads I have 2 questions:
-Does XAMMP open a vulnerable port which is risky?

-I want to edit php.ini but it is under root privilage. How can I fix this so I can edit php.ini?

Cheers

NDPeter
August 14th, 2007, 02:53 AM
Just ran through this in about 10 minutes! Consider it impressive since I've just switched to ubuntu and have the usual aversion to using the terminal...however, I'm not a complete stranger to doing stuff that way. Still very quick and it's all working I think.

Thanks!

christom
August 15th, 2007, 10:22 PM
I too am receiving the error: ...(of not being able to get the menu item for the Control Panel to work) ... How can this be fixed?

I had the same problem, and fixed it by saving the file "xampp-control-panel.desktop" to the folder "/usr/share/applications",which is where all my menu applets are saved (i.e. not in the "~/.local" folder, which does not exist on my installation of feisty; the original instructions involving that directory did not work at all.)


sudo gedit /usr/share/applications/xampp-control-panel.desktop

The code as published on page 1 of this thread did not work either. The code that worked was:


[Desktop Entry]
Encoding=UTF-8
Name=XAMPP Control Panel
Comment=Start and Stop XAMPP
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Terminal=false
Type=Application
Categories=GNOME;Application;Network;
StartupNotify=true

I had to unmark and remark the menu item in Alacarte before it appeared in my Applications|Internet menu. Reloading would likely have accomplished the same.

kingersoll
August 16th, 2007, 10:46 AM
I have this PHP script on my working XAMPP server:

<?php
touch("test.txt");
?>

But no matter what permissions I set that script to (it's currently 777), I can't seem to create that file!

Warning: touch() [function.touch]: Unable to create file test.txt because Permission denied in /opt/lampp/htdocs/test.php on line 2

HELP!

speedy23
August 30th, 2007, 12:47 PM
hello,
I dowloaded xampp 1.6.3b. and when i try to run xampp,
there is an error like: "xampp is currently on availably as 32 bit application. Please use a 32 bit compatibility library for your system".
My system is 64bit, core 2 duo and my ubuntu s also 64 bit. What can I do to start xampp. Thanks in advance...

bjorntheart
August 30th, 2007, 04:27 PM
xampp installs the latest mysql version and gives you the option (after the install) about which version of php you would like run.

Is there a way to switch from MySQL 5.0.45 to 4.0.26 in LAMPP like you can switch between PHP4 and PHP5?

rwizibuntu
September 4th, 2007, 06:57 AM
Thanks for this tutorial the installation was fine, I get all xampp test pages.
However, I have failed to get my local sites in the browser. I copied one of my site folder to myname/public_html, when say http://localhost/mysite i do not get it. Where should i place my site files
thanks

TeaSwigger
September 4th, 2007, 09:13 AM
Hello, I'm not the original poster nor do I profess to be an "expert," but merely someone who has used XAMPP successfully for some time now. Since the questions are seeming to go unanswered I'll attempt to address some starting from most recent.

bjorntheart,

No, but I don't know if it's overly difficult as I've not tried it. If a version difference should make it necessary, say you're using 5x and your host is back in 4x, you can try MySQL's compatibility settings when exporting / importing databases.

rwizibuntu,

Probably getting locations and/or permissions mixed. Which is very easy to do!

The easiest way to go may be as described in the HowTo. But let's try this with a more specific example. Let's say that, like the HowTo instructs, XAMPP was installed in /opt so that it's located at /opt/lampp. Let's say that your user name is oscarmoore. You want the folder containing the web projects to be in your home folder and want it to be called "woodshed." The folder containing your actual project website is named kingcoletrio, inside which is the index or root page for the site.

First you would need to create a folder in your home folder named "woodshed," just like you'd make any new folder. Then you would make "woodshed" into a "symlink" or symbolic link, putting the "real" folder into htdocs. You would have to do this operation using "sudo" (root permission) and associate it with your user in order to have permissions to use that folder, since your user name won't have permissions to manipulate files in /opt by default. To do this you would simply enter the following in a terminal:


sudo ln -s ~/woodshed /opt/lampp/htdocs/$USER

Explanation of example code: "sudo" to have root permissions to put something in /opt, "ln -s" meaning "create a symbolic link," ~/woodshed meaning you want to make the folder "woodshed" into the link ( ~/ means it's located in your home directory) and "/opt/lampp/htdocs/$USER" telling it where to put it, with $USER meaning "name it after my user name and give me permissions within it." Code sure saves a lot of typing lol

So what you'd have is a folder called /home/oscarmoore/woodshed that's really a link to the real folder which is /opt/lampp/htdocs/oscarmoore. Just think, installing a "real" public webserver gets way, way more complicated... :p

Okay, you'd plop your project folder, kingcoletrio, into the woodshed folder. On your computer then it'd be accessible at:
/home/oscarmore/woodshed/kingcoletrio
or at its real location of:
/opt/lampp/htdocs/oscarmoore/kingcoletrio

In the browser you'd access the site at:

http://localhost/oscarmoore/kingcoletrio

Do you see how the layout works now? This stuff takes some getting used to but its amazing technology. Good luck and enjoy webbing :)

TeaSwigger
September 4th, 2007, 10:04 AM
hello,
I dowloaded xampp 1.6.3b. and when i try to run xampp,
there is an error like: "xampp is currently on availably as 32 bit application. Please use a 32 bit compatibility library for your system".
My system is 64bit, core 2 duo and my ubuntu s also 64 bit. What can I do to start xampp. Thanks in advance...

Unfortunately XAMPP isn't available for 64 bit architecture. That doesn't mean you couldn't use it somehow; I'm sure it can be done. You'll have to search for information regarding running 32bit apps on 64bit systems or perhaps inquire in the 64bit focused forum here.

TeaSwigger
September 4th, 2007, 10:14 AM
I have this PHP script on my working XAMPP server:

<?php
touch("test.txt");
?>

But no matter what permissions I set that script to (it's currently 777), I can't seem to create that file!

Quote:
Warning: touch() [function.touch]: Unable to create file test.txt because Permission denied in /opt/lampp/htdocs/test.php on line 2
HELP!

Ah kinda hard to say from here... Have you checked that you have write access in the /opt/lampp/htdocs directory? Wouldn't by default. Suggest you have all relevant files for the project incl. that test.php file in a subdirectory which your user owns. Also make sure the database files aren't read only. Not sure what else to suggest with info provided.

niceguy123
September 4th, 2007, 01:49 PM
Extract the archive to /opt using sudo: (make sure you are in the directory that you downloaded the archive to)
sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt
[/LIST]

Sorry for obvious situation - I am very new to Unubtu:

What do you mean
(make sure you are in the directory that you downloaded the archive to)

I downloaded the gz to a folder myname/downloads

I tried running
sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt and got
tar: xampp-linux-1.5.3a.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors


What do I do from here?

===sorry about this, I figured it out=== (Would have deleted the whole post, but that option I couldn't find.

niceguy123
September 4th, 2007, 02:49 PM
OK, now its running on my system. Localhost shows the test page. But after doing through the below stages I still don't see the XAMPP control panel.

Any ideas?


Sweet XAMPP Control Panel

http://img108.imageshack.us/img108/5647/screenshotxamppcontrolpanelfj6.png

To use the sweet gtk/python control panel:

Run in a terminal:
gedit ~/.local/share/applications/xampp-control-panel.desktop

Paste the following into the open file and save and exit.

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg
"XAMPP Control Panel" will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.

Test to see if XAMPP is running

Once XAMPP is up and running open firefox and go to: http://localhost/

You should see the XAMPP test page:

http://static.apachefriends.org/images/380.jpg

TeaSwigger
September 4th, 2007, 11:11 PM
OK, now its running on my system. Localhost shows the test page. But after doing through the below stages I still don't see the XAMPP control panel.

Any ideas?

Hello,

If you mean that you have used the menu entry and it won't open, please do the following:

Open a terminal and enter:


gksudo python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py

The reason for this is that there may be certain things needed to display the control panel that are not yet installed on your system. By entering that command in the terminal, it will try to open it and may give us error messages that we can use to find out what is missing.

In the meantime you can run XAMPP just fine without it by entering this in a terminal:


/opt/lampp/lampp start

It will tell you it's starting the three main components. Once it's started you can close the terminal and enjoy your new XAMPP. To stop it you do the same, just enter stop in place of start :)

There are other commands you can use listed at their web page:
http://www.apachefriends.org/en/xampp-linux.html

:guitar:

niceguy123
September 5th, 2007, 07:57 AM
[QUOTE=TeaSwigger;3310599]Hello,

If you mean that you have used the menu entry and it won't open, please do the following:

Open a terminal and enter:


gksudo python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py

OK, I did that and the XAMPP Control Panel opened up on my screen - Great - Thanks.

Next question - I'd like to have a icon under Applications>internet

TeaSwigger
September 6th, 2007, 01:25 AM
OK, I did that and the XAMPP Control Panel opened up on my screen - Great - Thanks.

Next question - I'd like to have a icon under Applications>internet

Excellent, everything's already installed for you then. Okay to make an entry in Applications > Internet in ubuntu:

Go to System > Preferences > Main Menu. A handy menu editor will come up. Select the Internet list. If it isn't already there, you can make an entry for it. Select New Item. A box will come up. Select Application and enter the name, XAMPP Control Panel. In command, put this:


gksudo python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py

Icon and comments are optional. XAMPP has a .gif icon in /opt/lampp/htdocs that you could use, or if it has to be .xpm or .png format it should be a snap to convert it in GIMP or some such. Hope that does the trick. :)

webtroy
September 6th, 2007, 06:44 PM
...

wildgene789
September 26th, 2007, 11:22 AM
nice tutorial but im getting stuck at "sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt" now i web into desktop on terminal desktop and did the command. This is wat i get

crossfire@CrossfiresServer:~/Desktop$ su tar xvfz xampp-linux-1.6.3b.tar.gz -C /opt
su: invalid option -- C
Usage: su [options] [LOGIN]

Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login make the shell a login shell
-m, -p,
--preserve-environment do not reset environment variables, and keep
the same shell
-s, --shell SHELL use SHELL instead of the default in passwd

crossfire@CrossfiresServer:~/Desktop$

UbuNewbie123
September 26th, 2007, 03:16 PM
Try sudo instead of su.

Kangeek
October 15th, 2007, 10:33 AM
:guitar: YO. This is me first message here!
Nice and easy, about all I love with Ubuntu. The GUI part didn't work bot I still can't understand why I tried it in a first place.

On the 6 security points mentionned the 1st 3 are covered with
$sudo /opt/lampp/lampp security
Wot about the others?... boah, don't care anyway, still 10M times more secure than MS lost yourself.

Thanks again Peter, and now, how can I have a database up and running in 5mn?:)
SAFE

latheesan
October 22nd, 2007, 03:59 AM
quick question, does the xampp automatically start on system reboot?

Beanz
October 27th, 2007, 02:20 PM
I got the following errors:

Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/index.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/xampp/index.php:2) in /opt/lampp/htdocs/xampp/index.php on line 4

any help?

I got a similar error when I first installed using these instructions when trying to include files. I managed to fix it by changing the permissions of the public_html folder to allow others to read the files within that folder. I'm not sure what security risks this opens up, but as I'm the only user on my computer, I hope I'll be OK.

GodsDead
October 27th, 2007, 06:38 PM
HEYA wow i dont hav eth time to scroll through all this thread, but i installed XAMPP to the latest version of Ubuntu (7.10 gusty)
Im new to ubuntu, but not to xampp, i have used it on many windows systems, i want it to run on my Ubuntu machine, RIGHT! go tthat working, i cant get that "menu" thing to work at all =[ (first page)

and i cant create any bloody files in /opt/lampp/htdocs/ unless i go through teh bloody terminal (or logon to my windows machine & Go through FTP) which is stupid since the machines sitting next to me! i wanna move my entire load of files over to this new machine, IF I CAN GE TIT TO WORk, AND even though i have removed the index.htm file that origionally comes with XAMPP htdocs directory, i created anotehr index.html file, but it still redirects to localhost/xampp!?
Im goign to be useing this machine to host some files for my mates etc etc.


=]

mech7
November 5th, 2007, 05:34 PM
THe control panel does not show up with me ? anbybody know what to do :(

Takster
November 6th, 2007, 02:33 PM
I want that too


I did uninstall the xampp and installed everything separately ... but now when I type http://localhost it redirects me to http://localhost/xampp which is not. how can i make it not do the redirect. thanks
Hey there.

I can explain this method i use for virtual hosts, i like to keep the xampp folder and my website folders well apart from each other, and it makes things easier in my opinion.

So what i want to do is move all my websites away into any other folder i want. I will be using the path


/home/tak/www/htdocs/

to store all my websites, arranged in subfolders, that have a specific domain name pointing to them. You can have as many as you like.

localhost.vbulletin.com >goes to> /home/tak/www/htdocs/vbulletin
localhost.testbed.com >goes to> /home/tak/www/htdocs/testbed

I have also set up another domain using localhost.main.com, this link is set up to direct me to the xampp folder/frontend in /opt/lampp/htdocs/

What you do is...

sudo gedit /opt/lampp/etc/httpd.conf

make sure these are uncommented (near the bottom)

# Virtual hosts
Include etc/extra/httpd-vhosts.conf
# Various default settings
Include etc/extra/httpd-default.conf
# XAMPP
Include etc/extra/httpd-xampp.conf

save. Now,

sudo gedit /opt/lampp/etc/extra/httpd-vhosts.conf

paste all this (you can change folder names later to suit yourself, my example will get you up and running first)



NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost.main.com
ServerAlias localhost.main.com *.localhost.main.com
DocumentRoot "/opt/lampp/htdocs/"
ServerAdmin admin@localhost
</VirtualHost>

<VirtualHost *:80>
ServerName localhost.vbulletin.com
ServerAlias localhost.vbulletin.com *.localhost.vbulletin.com
ServerAdmin admin@domain1.co.uk
DocumentRoot "/home/YOU/www/htdocs/vbulletin/"
<Directory "/home/YOU/www/htdocs/vbulletin/">
Options ExecCGI Includes FollowSymLinks
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName localhost.testbed.com
ServerAlias localhost.testbed.com *.localhost.testbed.com
ServerAdmin admin@domain1.co.uk
DocumentRoot "/home/YOU/www/htdocs/testbed/"
<Directory "/home/YOU/www/htdocs/testbed/">
Options ExecCGI Includes FollowSymLinks
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


save. Close it.

Now, make folder/s that you want for the 'server'.

I made


/home/tak/www/htdocs/
inside 'htdocs' folder i make 2 more folders, vbulletin and testbed, inside each of these i put on blank index.html page for now.

This will be as above:


localhost.vbulletin.com >goes to> /home/tak/www/htdocs/vbulletin/index.html
localhost.testbed.com >goes to> /home/tak/www/htdocs/testbed/index.html

Now we open

sudo gedit /etc/hosts

we add the localhost IP plus all domains for folders we are making, like so.


127.0.0.1 localhost
127.0.1.1 Ubuntu

127.0.1.1 localhost.vbulletin.com
127.0.1.1 localhost.main.com
127.0.1.1 localhost.testbed.com

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Now, we restart xampp server, maybe clean browser cache, and point to
localhost.vbulletin.com > go to blank index page
localhost.testbed.com > also blank index.html page we make before
localhost.main.com > xampp control/information pages.

To add more sites:

we add a new container for another site in virtual host:

<VirtualHost *:80>
ServerName localhost.newfolder.com
ServerAlias localhost.newfolder.com *.localhost.newfolder.com
ServerAdmin admin@domain1.co.uk
DocumentRoot "/home/YOU/www/htdocs/newfolder/"
<Directory "/home/YOU/www/htdocs/newfolder/">
Options ExecCGI Includes FollowSymLinks
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

we make folder
'newfolder' in / www/htdocs/'newfolder'

we add again in host file

127.0.1.1 localhost.newfolder.com

restart xampp, navigate to new URL 'localhost.newfolder.com'.
That is it. A little complicated but well worth it at the end.

chalewa
November 6th, 2007, 08:08 PM
Installed all of this last night, which was a breeze. Thanks a lot for the howto.

My ultimate goal is to be able to get zussaweb or another nzb webui running. Can I do this with this type of server set up?

I am very new to using a webserver, so I am basically forging my way as I go along. Thanks

odysseyes
December 8th, 2007, 03:32 PM
I don't know if this is adressed before but I still have a small question about the setup of teh web root.

I use Ubuntu 6.06.1 on my desktop mini PC.
I managed to setup, and it works OK!

The hardware is just a MB and a 4GB IDE flash disk. (no moving parts that is)
So now I would like to set up my webroot to link to a shared volume on or network storage device.

I tried with the command:

sudo ln -s smb://nas-01/htdocs/ /opt/lampp/htdocs/


Where nas-01 is the network name of our network storage, and htdocs the name of the shared volume on it created for use as webroot

i'm relatively new to linux so I'm not really familiar with the whole idea behind ths system.

What would be the best way to archieve this ?

Thanks for helping me out!!

Xiong Chiamiov
December 11th, 2007, 12:45 AM
Just a btw, the part that adds the control panel to the menu obviously doesn't work for those using KDE. You might want to make a note of that, and tell them how to add things to the menu.

McNee
December 12th, 2007, 05:23 AM
Nice tutorial, everything set up just fine... except the control panel isn't showing up. I'll have to finish reading through the replies, maybe there's a hint in there...

pcjunkie
December 13th, 2007, 05:51 AM
I am getting errors.

unpacked to /opt
ran start command

got this

/opt/lampp/lampp: line 74: arch: command not found
Starting XAMPP for Linux 1.6.4...
/opt/lampp/lampp: line 74: arch: command not found
/opt/lampp/lampp: line 74: arch: command not found
XAMPP: Starting Apache with SSL (and PHP5)...
/opt/lampp/lampp: line 74: arch: command not found
XAMPP: Starting MySQL...
/opt/lampp/lampp: line 74: arch: command not found

Starting XAMPP for Linux 1.6.4...

Its working fine though, so far.
Thanx guys, it was a pinch

dhani99
December 14th, 2007, 11:35 PM
sudo /opt/lampp/lampp start
/opt/lampp/lampp: line 74: arch: command not found
Starting XAMPP for Linux 1.6.4...
/opt/lampp/lampp: line 74: arch: command not found
/opt/lampp/lampp: line 74: arch: command not found
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/
/opt/lampp/lampp: line 74: arch: command not found
XAMPP: Starting MySQL...
/opt/lampp/lampp: line 74: arch: command not found
XAMPP: Starting ProFTPD...
XAMPP: - warning: unable to determine IP address of 'desktop_ubuntu'
- error: no valid servers configured
- Fatal: error processing configuration file '/opt/lampp/etc/proftpd.conf'
XAMPP: Error 1! Couln't start ProFTPD!
XAMPP for Linux started.
keval@desktop ubuntu:~$ test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator

Apache couldn't start.. and gives me this error.. any Idea...??

adrianmak
December 16th, 2007, 05:35 AM
i installed apache, mysq, php thru synatic manager,
does the Sweet XAMPP Control Panel work too ?

Furious87
December 16th, 2007, 09:13 AM
im using ubuntu gutsy gibbon server edition and running it as a router (via iptables) and im trying to setup a webserver on it. i have followed your guide and the server seem to start. but i can not connect to it. do you think that this might have something to do with my iptabels or anyhting else.

oh and y btw. somehow i dont have the lo loopback interface on the comp so i cant access it from 127.0.0.1 i rather is trying to access the webserver from the ip of the interface eth1 (internal interface) witch is 10.10.10.1. dunno if this has somthing to do with it either

McNee
December 16th, 2007, 04:33 PM
i installed apache, mysq, php thru synatic manager, does the Sweet XAMPP Control Panel work too ?

I would imagine it does - the instructions given just set up a menu link for it. I had to reboot to get it to show up... but on 7.10 if you right click on the Applications menu (or anywhere on the menubar) you can choose Edit Menu and add items that way as well.

I do have a question too... how do I get XAMPP to start when the computer starts so I don't have to open the control panel all the time?

nieldw
December 18th, 2007, 09:02 AM
This was very helpful - espesially after two days of trying to setup xampp aliasses and virtual hosts. Thank you.

pannerrammer
December 21st, 2007, 05:52 PM
I found the following on the apache friends website. Forgive the stupid question but could someone tell me how to do this with feisty?
After I rebooted my Linux box XAMPP stopped running! How can I fix this?
Correct. That's normal Linux behaviour (which applies to any other Unix-like system. It's the admin's job to make sure a particular application is started at bootup.

There is no real standard way to configure the boot process of a Linux system, but most of them should allow you to start XAMPP at boot time using the following steps.

1. First, find out your default runlevel.
Simply 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 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 carry out the actual configuration by typing:

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.

Not sure if you've sorted this yet! On Gutsy, do the 2 commands in /etc/rcS.d

dondad
December 22nd, 2007, 03:32 AM
"XAMPP by default uses /opt/lampp/htdocs as the root web directory."

How can I change this to be opt/lampp ?

McNee
December 27th, 2007, 10:54 PM
"XAMPP by default uses /opt/lampp/htdocs as the root web directory."

How can I change this to be opt/lampp ?

In the first posting, it describes how to link to a folder under your home folder - I suppose you could change that to point to opt/lampp instead.

dondad
December 28th, 2007, 02:00 AM
In the first posting, it describes how to link to a folder under your home folder - I suppose you could change that to point to opt/lampp instead.

Thanks, I figured out how to do what I was trying. What I wanted was to be able to ftp into the server at the top level so I could access cgi-bin etc. I got proftpd set up so I could do that. I want to duplicate the environment of a website that I have some dealings with so that I can play around without messing anything up on the actual server. I should be able to do that now. Thanks to all of the replies.

m@@dL3s
January 2nd, 2008, 01:30 AM
Hi, Peter,
Just wanted to say thanks for this xampp thread, it was exactly what I was looking for, and esp. the help getting XAMPP listed in Applications and linking to a folder. I'm new at ubuntu and would not have known even to ask about linking. I haven' t used all the xampp features but can work on WordPress now without being online.

:KS:KS:KS

papuccino1
January 6th, 2008, 09:46 PM
I had the same problem, and fixed it by saving the file "xampp-control-panel.desktop" to the folder "/usr/share/applications",which is where all my menu applets are saved (i.e. not in the "~/.local" folder, which does not exist on my installation of feisty; the original instructions involving that directory did not work at all.)


sudo gedit /usr/share/applications/xampp-control-panel.desktop

The code as published on page 1 of this thread did not work either. The code that worked was:


[Desktop Entry]
Encoding=UTF-8
Name=XAMPP Control Panel
Comment=Start and Stop XAMPP
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Terminal=false
Type=Application
Categories=GNOME;Application;Network;
StartupNotify=true

I had to unmark and remark the menu item in Alacarte before it appeared in my Applications|Internet menu. Reloading would likely have accomplished the same.

christom you saved my *** :D
Thanks mate this was a really good guide indeed.

unabatedshagie
January 12th, 2008, 06:14 PM
Just freshly installed gutsy and downloaded the latest version of xampp (1.6.5a), "installed" fine and works fine.

Now previously I have been able to run the following command
sudo ln -s /home/alex/WebDesign /opt/lampp/htdocs/%USER and type localhost/alex into firefox to view the files in the folder.

Now I'm getting an error saying that I don't have permission to access the files on the server.

As far as I can tell I have the correct permissions on the folder (I haven't changed the permission on the WebDesign folder since I backed it up and restored it)

martin_n_c
January 12th, 2008, 08:31 PM
Hey, I've got the same problem. I followed this howto and it worked fine under Feisty, Now I'm with a fresh install of Gutsy I can't get at my files!

martin_n_c
January 14th, 2008, 09:23 PM
I found a partial way round it. It's not great, but you can see your documents in home (public_html in this thread's tutorial). I had to change the Apache config file:


sudo gedit /opt/lampp/etc/httpd.conf

I changed the line:

User nobody

to:

User Myusername

(see the following post for my httpd.conf file)

The downside is that I can't get the default Xampp splashscreen because now I don't have permission to view that :-(

martin_n_c
January 14th, 2008, 09:28 PM
Here's the httpd.conf file.


EDIT: I sorted this one out. It wasn't anything to do with config files. It was me importing .html files. I've put the details in a different thread here (http://ubuntuforums.org/showthread.php?t=665487&page=4) (#32).

darck
January 17th, 2008, 11:43 PM
it was pretty working, but stopped. Now Appache and Pro FTPD doesn't want to start. I haven't changed anything. I installed firestarter, but it sholdn't be a case, because i tried to stop them - didn't help. I also installed regular ubuntu updates, but am not sure when it stopped working, because i used it rarely.

now i get:


sudo /opt/lampp/lampp start
Starting XAMPP for Linux 1.6.5a...
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/
XAMPP: XAMPP-MySQL is already running.
XAMPP: Starting ProFTPD...
XAMPP: - warning: unable to determine IP address of 'darck'
- error: no valid servers configured
- Fatal: error processing configuration file '/opt/lampp/etc/proftpd.conf'
XAMPP: Error 1! Couln't start ProFTPD!
XAMPP for Linux started.
darck@darck:~$




darck@darck:~$ tail -2 /opt/lampp/logs/error_log
[Thu Jan 17 23:38:09 2008] [alert] (EAI 5)No address associated with hostname: mod_unique_id: unable to find IPv4 address of "darck"
Configuration Failed

bynary
February 2nd, 2008, 09:24 PM
I followed the tutorial and everything installed fine. Here's the problem: when I open my home.html file in firefox without going through localhost, it looks like this

http://myweb.cableone.net/ajbynum/Kidzone_good.png

When I view it through localhost, it looks like this

http://myweb.cableone.net/ajbynum/Kidzone_bad.png

Does anyone have any idea what's going on?

banago
February 5th, 2008, 02:14 PM
Hi all!

As a newly and happy ubuntu convert, I have a question that is driving me mad.

After a long attempt to install xampp and wordpress on ubunto, the latest following the HowTo of Petervk, I got the following error when I opened it in the browser (see IMG)

http://www.superalb.com/Screenshot-Mozilla%20Firefox.png

How can I resolve the problem?

Thank you in advance!

Banago

banago
February 5th, 2008, 03:53 PM
Can anyone give me an answer please?

Banago

banago
February 6th, 2008, 10:17 AM
No replay yet. :(

banago
February 6th, 2008, 06:33 PM
PILIzzzzzzzzzzzzzzzz!

hnprashanth
February 7th, 2008, 06:03 PM
Tanks buddy!
works perfectly in first shot!

techstop
February 11th, 2008, 11:55 AM
The command in the first post doesn´t work to make the control panel. Correct command found in this post;

http://ubuntuforums.org/showpost.php?p=3195778&postcount=130

Can the OP please update their post to a working version? It seems like a lot of people have trouble adding the menu link to the control panel.

Cheers...

gally66
February 16th, 2008, 12:47 AM
Nice howto - I have used the XAMPP site a number of time but they are not as "direct" as you are, don't tell you about "Sweet" and of course you are specific to Ubuntu. And the link idea is great, especially for folks like me who are not "real good" Linux users/dev. Thanks, Graham

Dangerous2505
February 17th, 2008, 10:32 PM
Hi everyone.

I haven't seen anyone post with this problem so I'm going to ask.
Please note that I'm totally new to linux and Ubuntu.

I have downloaded the file to my desktop, but when I use terminal
to install it I keep getting an error.(See below)

I change to the Desktop directory, then type;

sudo tar xvfz xampp-linux-1.6.6.tar.gz -c /opt

(Latest version, As per the instructions.)

Then I get this message;

tar: You may not specify more then one '-Acdtrux' option.


Does anyone know what is causing this, or what I'm doing wrong?
It seems to not like the "xvfz" part as far as I can tell.

Any help would be greatly useful as I have been trying for a couple
of days to get this installed. ](*,)

Thanks in advance for any help.

Dangerous Dan


PS: Where in the heck is my spell checker? I can't type anything
without it. :roll:

techstop
February 17th, 2008, 10:47 PM
Hi everyone.

I haven't seen anyone post with this problem so I'm going to ask.
Please note that I'm totally new to linux and Ubuntu.

I have downloaded the file to my desktop, but when I use terminal
to install it I keep getting an error.(See below)

I change to the Desktop directory, then type;

sudo tar xvfz xampp-linux-1.6.6.tar.gz -c /opt

(Latest version, As per the instructions.)

Then I get this message;

tar: You may not specify more then one '-Acdtrux' option.


Does anyone know what is causing this, or what I'm doing wrong?
It seems to not like the "xvfz" part as far as I can tell.

Any help would be greatly useful as I have been trying for a couple
of days to get this installed. ](*,)

Thanks in advance for any help.

Dangerous Dan


PS: Where in the heck is my spell checker? I can't type anything
without it. :roll:

You should be using a capital C, not lower case in the command, eg

sudo tar zxvf archive.tar.gz -C /opt

A lower case tells to tar to create an archive, and you want to be extracting one.

Dangerous2505
February 17th, 2008, 11:51 PM
Thanks a bunch, techstop. *Smacks self on head.*

Maybe I need new glasses.

If I knew how, I'd give you an offical "Thanks"

Again, thanks.

Dangerous Dan

Edit: I found the thanks tag.

Krunktor
February 20th, 2008, 02:54 AM
I've skimmed through all of the pages here, but it's a lot of posts so forgive me if this has been asked/solved before.

I've installed XAMPP 1.6.6 to Gutsy Gibbon, tested it by going to http://localhost/ and it works perfectly. I also made a folder in my home directory and successfully linked it into the htdocs folder. However, when I try to access http://localhost/kent/ (my name being Kent, of course), I'm given this error:


Forbidden

You don't have permission to access /kent on this server.
Apache/2.2.8 (Unix) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8e PHP/5.2.5 mod_apreq2-20051231/2.6.0 mod_perl/2.0.2 Perl/v5.10.0 Server at localhost Port 80

It's the same for any other folder I try to place either in my linked folder or directly in htdocs with sudo mv. I'm guessing it has something to do with file permissions, but I'm not positive how to edit them or what to edit them to. I've tried just right-clicking and going through the folder properties (classic Windows solution, I know), but that didn't help at all.

I really need to get XAMPP up and running soon so that I can complete a project due next week, so any help would be greatly appreciated.

EDIT: I just tried the solution in this thread (http://ubuntuforums.org/showthread.php?t=665487&page=4), but still am having no luck whatsoever. :(

EDIT Deux: I tried the "sudo gedit /opt/lampp/etc/httpd.conf" thing and it works now, and apparently didn't screw up the default XAMPP splash screen like it did for others. So... thanks... I guess?

abcprabhu
February 28th, 2008, 11:08 AM
Actually i had installed the xammp in ubuntu. but i can't access the opt folder & also can not create any folder inside the htdoc & not able to save any file in htdoc.

pls help some one!!!

Lord_c

eheyl
March 19th, 2008, 06:14 PM
The control panel blips in and out when I try to launch it. Does anyone have a workaround? I'm on ubuntu 7.10

eheyl
March 22nd, 2008, 05:23 AM
So I erased the first .desktop file I created as per instructions and did everything from the gui and pasted the commads in. It works! YAY!

cozmicharlie
March 22nd, 2008, 05:40 PM
Actually i had installed the xammp in ubuntu. but i can't access the opt folder & also can not create any folder inside the htdoc & not able to save any file in htdoc.

pls help some one!!!

Lord_c

You need to be in nautilus as root. Open a terminal and type or cut and paste the following

sudo nautilus
enter your password and now you are in Nautilus as root and you should be able to cut and paste or add folders to /opt/

sandclock
March 24th, 2008, 09:29 AM
Hi
I read most of the posts in this thread and many other threads too. But couldnt find what i needed.
Here is what i want to do.
1. I have small network on 4 pcs
2. 3 on ubuntu 1 on winxp
3. I want to setup another pc which will be host to all these pcs
4. I want to install xampp on 5th pc and i want other 4 pcs to use it as development server is it possible?
Sorry if this is already covered and i missed something
Regards
NIk

slackmaster
March 25th, 2008, 01:39 PM
Hello,

Thanks for the tutorial. I got XAMPP up and working nicely. So I see that I can access files through my browser. Now how do I take it to the next step and permit other users with the right username and password to access my files from the internet?

Thanks for your help.

Geowilky
March 26th, 2008, 03:12 AM
I finally got Xampp to load to the /opt directory, but when I went to start it I got this below:



XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.

Where and how can I get the compatibility library?

linuxtony
March 27th, 2008, 05:39 PM
Nice tutorial. On my Gutsy Gibbon setup the install went smoothly, but the script to set up a link to the python control panel produced an error message of file not found.

Anyhow, thanks for the quick install notes -- now to install Joomla

BlizzofOZ
March 31st, 2008, 04:02 PM
I posted this over at Apache Friends forum, but thought I'd try here also, in case someone had encountered this before:

I had just got XAMPP to work... I had some problems accessing via the internet because I was trying to port forward the app. I found a thread here that showed the conf file to change (I have the link at home), where you would change the port. After doing that, it worked!

This moring, after a reboot, I tried to stop and start XAMPP and recieved the following error:

Error 1! Couldnt start Apache!
Starting Diagnosis ...
Sorry, Ive no idea whats wrong.


Any idea what is causing this?

kemphp
April 2nd, 2008, 05:27 AM
Excellent instructions. Worked perfect under ubuntu 7.10 with xampp 1.6.6. One 'gotcha' for a noob (like me) might be that if you already have an apache service running, you need to shut it off before you can get the apache that is with xampp to start.

jlhaslip
April 18th, 2008, 01:22 AM
New Ubuntu User. WUBI Ubuntu 8.04. Dual Booted with Window XP SP2
Used this Tutorial and have the LAMPP set up on my Laptop. Built the public_html folders and used the provided code to set them as user-level defaults (I think).
Admin level user can start/stop the Server okay, and phpinfo runs from the default Xampp start page for both an Admin user and a regular (non-admin user) using "localhost" in the Browser address bar, however, I can't get a php file in the public_html folder to operate properly in the Browser. If I ask for "file > open" and point to the php file in the public_html folder, it wants to download the file. If I click on the file directly, it opens in a text editor.
I have XAMPP on this Laptop under the ******* XP, so I am cool with the operation of XAMPP, but this is likely a Linux (user) issue? Or it might be that the Terminal commands I issued were not recognized? How to tell? What to check for? Where is it located on the machine. Apache has been stopped/started several times, no change.
One method I attempted was to add the ApplicationType Handlers to the httpd file, but even the Admin level user was denied permissions, so any replies should consider that I am very new to Linux, although I have used Console-based O/S's in the past and am not totally green to them. Thanks.

*edit*

Not sure why, but it is all working well now. Thanks much for this informative Topic... I have learned lots...

neodare
April 19th, 2008, 07:21 AM
thanks a lot man .....u write wat i need ..i was confusing how to save my file in xampp root ..u made it easy

bcnaat
April 22nd, 2008, 05:20 PM
THANKS! This worked great. I have a fresh install of Hardy and followed these instructions (used them for my install of Fiesty). The only difference this time is that I had to create the ./local/applications folder before it would add the file for the shortcut in the menu.

I also have a folder named WWW that I use instead of a Public_html folder. Same instructions, just different name. I did find that I had to change the permissions on my folder before it would allow me to view the files, but I think that may have been because I copied the file over from another drive. Seems to happen a lot to my folders when I store them on my MyBook drive.

Again, thank you so much for these instructions since I only wanted a local server to test my web pages on, and to do some ruby programming.

karq
April 24th, 2008, 07:44 PM
So I installed xampp and got it running. I can see the test page, but when I try to run my own files, then it says

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Fatal error: Unknown: Failed opening required '/opt/lampp/htdocs/proov/loops.php' (include_path='.:/opt/lampp/lib/php') in Unknown on line 0

rouge568
May 3rd, 2008, 04:11 AM
Hello.

I am trying to set up lampp with htdocs as a symbolic link. It links to a copy of htdocs on a usb stick (which also has xampp on it so I can access my server on the go!). Anyways, it isn't liking my symbolic links, and keeps shooting me a 403 forbidden and this in the error log:
[Fri May 02 23:06:15 2008] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /opt/lampp/htdocs I have allowed access to /opt/lampp and /media/disk/xampp and subfolders (chmod -R 777). I have also gone into httpd.conf and edited it to try and allow symbolic links. (attached)
Anybody have any clues as to what could be going on/ how to fix this? Thanks in advance.

ajboesch71
May 3rd, 2008, 09:55 PM
awesome walkthrough, even I have it up and running...lol

drdanield@gmail.com
May 5th, 2008, 03:31 AM
Excellent. Thank you. I made a quick svg icon using Incscape for the menu
http://nohair.com/code/_media/computers:xamppicon.png?cache=cache
See quick notes and download the svg icon at:
http://nohair.com/code/computers:ubuntu_linux#use_xampp
After clicking on above site, scroll down to see it.

LeeU
May 5th, 2008, 04:31 AM
@Takster,

Sweet! Works just fine, and I don't have to follow a long path to get to my files. Thanks!

myharshdesigner
May 8th, 2008, 04:03 AM
This is a how-to for setting up a web development environment easily. This guide will install the XAMPP lampp stack into /opt, setup an easy way to start it up and shut it down, and link a folder in your home directory to the webserver.

WARNING
This guide is aimed at a development environment only and should not be used as a public webserver. To setup a public webserver follow the directions on the Ubuntu wiki https://help.ubuntu.com/community/ApacheMySQLPHP

As this is Ubuntu, all the major parts of a typical web server are included (in the main repo, or on the Ubuntu Server CD) and this is a great way to setup a server. The ubuntu developers have prepared a great web server and have made the process as seemless as possible.

But what if even the official way is still to complicated? What if you just want a quick web server for development?

Fortunately there is the XAMPP project: http://www.apachefriends.org/en/xampp.html. The XAMPP project bundles Apache, PHP4 & 5, Perl, mySQL, and a bunch of other utilities/applications into an simple package for Mac OSX, Windows, Solaris, and Linux. Obviously this HOWTO only deals with the linux version.

For those of you with already existing Apache/mySQL/php installations it installs everything into /opt so it doesn't conflict with any other installation, and it is completely setup and ready to run.

Install XAMPP

Two easy steps:

Download the most recent version of XAMPP: (at time of writing 1.5.3a)
http://prdownloads.sourceforge.net/xampp/xampp-linux-1.5.3a.tar.gz?download
(Source URL: http://www.apachefriends.org/en/xampp-linux.html#374)
Extract the archive to /opt using sudo: (make sure you are in the directory that you downloaded the archive to)
sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt


Start XAMPP

To start it up, open a terminal and type this:

sudo /opt/lampp/lampp start

Stop XAMPP

To stop it, open a terminal and type this:

sudo /opt/lampp/lampp stop

Additional XAMPP commands

To see additional commands, open a terminal and type this:

sudo /opt/lampp/lampp

Sweet XAMPP Control Panel

http://img108.imageshack.us/img108/5647/screenshotxamppcontrolpanelfj6.png

To use the sweet gtk/python control panel:

Run in a terminal:
gedit ~/.local/share/applications/xampp-control-panel.desktop

Paste the following into the open file and save and exit.

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg
"XAMPP Control Panel" will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.

Test to see if XAMPP is running

Once XAMPP is up and running open firefox and go to: http://localhost/

You should see the XAMPP test page:

http://static.apachefriends.org/images/380.jpg

Location of files and uploading

XAMPP by default uses /opt/lampp/htdocs as the root web directory. The easiest way to start working on files is to link a folder in your home directory into this directory.
My user name is peter so I have /home/peter/public_html linked to /opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I get a listing of all the files/folders in that directory. (As long is there isn't a index.php/html/etc file)
To set this up, run in a terminal:

Make public_html directory in home directory:
mkdir ~/public_html
Link to /opt/lampp/htdocs
sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

Now any files and folders you place in ~/public_html will be published to your personal webserver.

Bookmark http://localhost/username to make this easy to access.

WARNING - SECURITY
http://www.apachefriends.org/en/xampp-linux.html#381
Open holes:

The MySQL administrator (root) has no password.
The MySQL daemon is accessible via network.
ProFTPD uses the password "lampp" for user "nobody".
PhpMyAdmin is accessible via network.
Examples are accessible via network.
MySQL and Apache running under the same user (nobody).

This doesn't leave your whole system wide open, but someone could hack your XAMPP installation, so be wary.
To fix most of the security weaknesses open a terminal and run:
sudo /opt/lampp/lampp security

Feedback
Please read this post (http://www.ubuntuforums.org/showpost.php?p=1310039&postcount=5).

---- EDIT - July 28, 2006 ----
Minor Edits

---- EDIT - August 1, 2006 ----
Re-did xampp control panel shortcut to make it easier.

---- EDIT - August 16, 2006 ----
Added warning for public web servers and edited intro to make it more accurate.

---- EDIT - September 1, 2006 ----
Added sudo to security command.

i like it :)

bro
May 8th, 2008, 03:53 PM
Howto make php email functions work? If I say, install wordpress and try to email via a form, it doesn't work. It is lacking or not finding sentmail?

bro
May 8th, 2008, 04:03 PM
That was one of my smartest questions ever! I installed sendmail, problem solved.

eisenklopf
May 9th, 2008, 07:53 PM
on mine mysql will not initiate. I am coming from a windows environment for using xampp so any pointers would be greatly appreciated. although not entirely ignorant to linux I am having some problems so treat me as if I am. when going to localhost I get an error of permission denied on line 2 of /opt/lampp/htdocs/xampp/index.php. If I comment out the if statement it then brings me to the splash screen asking me which language which then brings me to another error of permission denied and so on and so on. Thank you in advance.

bro
May 11th, 2008, 11:17 AM
Okay, so actually installing sendmail gives many other problems. It is not really working and takes ages to start probably because my /etc/hosts is not what is should be (though I didn't touch it).
How are you emailing from XAMPP powered apps/sites?

dwardwarbinx
May 21st, 2008, 08:33 AM
xampp installs the latest mysql version and gives you the option (after the install) about which version of php you would like run.

where do you get to choose which php version to use? im such a linux/ubuntu NOOB! :(

Lektorvis
May 29th, 2008, 11:32 PM
Xampp-control-panel doesn't show up in the menu.

I followed this guide http://http://ubuntuforums.org/showthread.php?t=223410 and everything went smudge but the control-panel. I did exactly like this:

To use the sweet gtk/python control panel:

Run in a terminal:
Code:

gedit ~/.local/share/applications/xampp-control-panel.desktop

Paste the following into the open file and save and exit.
Code:

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg

"XAMPP Control Panel" will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.


I've tried to change the path of the icon, as it is in an other achive on my system, but that didn't solve the problem.
Any suggestions are welcome.

moonshinerat
June 17th, 2008, 02:36 AM
Okay, I read somewhere in this thread that to get rid of the Xampp test page I just had to remove the redirect from the index.html

So I've removed the redirect, I have written my own index.html and also tried index.php. I have tried removing the whole of the original index.html with the redirect in it. I have been up and down httpd.conf and checked DocumentRoot and everything. I even tried deleting the Xampp folder which results in a 404.

My Xampp keeps redirecting to http://localhost/xampp/ and giving me the test page.

How do I get this thing to see my own webpage. I have tried installing this on four different distro's now with the same problem. Nobody else seems to be suffering from it. I just want to put my pages in htdocs and have done.

Can someone please tell me what to do to get rid of the test page because writing this post without bad language was really, really hard.

Thank you so much in advance.

bro
June 17th, 2008, 01:53 PM
Hi,


Okay, I read somewhere in this thread that to get rid of the Xampp test page I just had to remove the redirect from the index.html
That is definitely not the easiest way.


How do I get this thing to see my own webpage. I have tried installing this on four different distro's now with the same problem. Nobody else seems to be suffering from it. I just want to put my pages in htdocs and have done.
Can someone please tell me what to do to get rid of the test page because writing this post without bad language was really, really hard.


xampp has this nice orange screen for you when you go to http://localhost/ and you where redirected. ignore this. Think of a directory where you have easy access to. Say /home/moonshinerat/mySitesAreHere/

I assume you have installed xampp in /opt/lampp
On the commandline type:

sudo ln -s /home/moonshinerat/mySitesAreHere/ /opt/lampp/htdocs/mysite

This will create a symbolic link (MS users say 'shortcut') in your htdocs that links to your 'mySitesAreHere' directory. place your .php 's and .html in that dir and go to http://localhost/mysite.

Good luck with your mental hygiene (keep out the bad words)

moonshinerat
June 17th, 2008, 02:31 PM
Bro, you just made the last three weeks of my life worth it. Cheers fella.

I think maybe someone should try to produce a manual for Xampp to explain these things a bit better. A bunch of 'important' directory lists doesn't actually help that much.

It's great software and it doesn't need a 200 page manual but a few directions might be nice.

Once again, thanks.

bro
June 17th, 2008, 04:01 PM
And the cool thing is, it'll work in all 4 distro's you tried in with. ;)

cleardensity
July 11th, 2008, 12:21 AM
So far this post has just under 200 views, So great. If you read this and use it could you leave a reply saying if it was useful/useless?

VERY Useful! Thanks alot for putting this together - took just under 2 minutes after the download and I'm up and running my development server... very cool.

You :guitar:

chipw
July 11th, 2008, 03:50 AM
This is fantastic. Thanks. I've been doing it the hard way for years on various FreeBSD boxes. I'm really liking ubuntu and how easy everything works.

ruzt
July 14th, 2008, 06:12 AM
Please help me..:confused:
when i'm extract xampp-linux.1.6.6.tar.gz with command line,

sudo tar xvfz xampp-linux.1.6.6.tar.gz -C /opt

request password..but, i have message error bellow :

password for ruzt:
tar: xampp-linux.1.6.6.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
ruzt@ruzt:~$

Please, can give me any solution...thank!:confused:

sassur
July 14th, 2008, 07:55 AM
You aren't in the same directory as the file "xampp-linux.1.6.6.tar.gz". Change directory to the directory where you downloaded the file and try the same command again.

ruzt
July 14th, 2008, 09:13 AM
You aren't in the same directory as the file "xampp-linux.1.6.6.tar.gz". Change directory to the directory where you downloaded the file and try the same command again.
oke! thank:):):)
I'll try again!

Zogug
July 23rd, 2008, 06:27 PM
Ok here is my problem. Its about the default xampp page... I wan't to set up a dns from dyndns, but I keep getting the xampp page... I deleted the index.html in the htdocs and made a new one, but it keeps comming. Yes, I tried that sudo mysite link stuff. It does not accept IP/mysite. So I made a dns to the ip. And tried to use that one (eg. blabla.mine.nu/mysite), but dyndns does not accept that either. And it kinda sucks to have to tell people, hey go to blabla.mine.nu/mysite, when I could be telling them go to blabla.mine.nu. But as it is right now that takes us to the xampp default. The only way i want to access the xampp page is by typing blabla.mine.nu/xampp or localhost/xampp. How do I do this?? Please help.

Zogug

hezuo
July 28th, 2008, 06:39 PM
great tutorial, thanks a lot!

itaworld
August 7th, 2008, 01:53 AM
Very helpful tutorial, thanks a lot ):P

edmondt
August 21st, 2008, 08:23 PM
To start xampp as a service just do the following:

sudo ln -s /opt/lampp/lampp /etc/init.d/lampp
sudo update-rc.d -f lampp defaults

powerof2
September 1st, 2008, 01:54 AM
When I copied and saved this code, the "executable" was in Applications/Other.

No big deal, but I panicked, as I often do with this new OS, when it didn't show up.

Thanks for the clear instructions.

j


Paste the following into the open file and save and exit.
Code:

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg

"XAMPP Control Panel" will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.

DroBuddy
September 19th, 2008, 12:34 AM
This is a great thread and it got me up and running in a matter of minutes.

The only problem I ran into was...

Run in a terminal:
Code:

gedit ~/.local/share/applications/xampp-control-panel.desktop

Paste the following into the open file and save and exit.
Code:

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg

Didn't work for me.... Here's the error mesg:

"Could not save the file /home/dro/.local/share/a…mpp-control-panel.desktop.

Unexpected error: File not found"

I'm running Hardy Heron and i386 (w/ a fresh install and all updates applied), so... I dunno, I'm not exactly sure why this isn't working. Any insight?

Also, what's the cmd to start XAMPP on startup? I'm always doing work, so it would be nice if it was waiting in the background for me. ;)

Once again, this is a great guide. Thanks for your help, man.


Peace,



Dro Buddy

techstop
September 19th, 2008, 01:09 AM
This is a great thread and it got me up and running in a matter of minutes.

<SNIP>

"Could not save the file /home/dro/.local/share/a…mpp-control-panel.desktop.

Unexpected error: File not found"

I'm running Hardy Heron and i386 (w/ a fresh install and all updates applied), so... I dunno, I'm not exactly sure why this isn't working. Any insight?

Also, what's the cmd to start XAMPP on startup? I'm always doing work, so it would be nice if it was waiting in the background for me. ;)

Once again, this is a great guide. Thanks for your help, man.

Peace,

Dro Buddy

This was posted a few pages back, have you tried it?

http://ubuntuforums.org/showpost.php?p=3195778&postcount=130

shcKr-
September 30th, 2008, 01:30 PM
right.. im after some help please, i have xampp setup on my ubuntu machine, and can access it via typing localhost in the address bar, and on another computer typing the IP address of the computer running xampp to access it, but is there anyway, rather than typing '192.168.1.1' to type 'www' and it will go to the directory on the ubuntu computer 'localhost/intranet/'
thanks in advance

goldstar1
October 8th, 2008, 10:31 PM
Thank you very very much...This is just what the Doctor ordered!

ubuking
October 11th, 2008, 01:53 PM
Works like a Charm, thank you!

effec
October 11th, 2008, 07:57 PM
Starting XAMPP for Linux 1.6.8a...
XAMPP: Another web server daemon is already running.
XAMPP: Another MySQL daemon is already running.
XAMPP: Starting ProFTPD...
XAMPP: - warning: unable to determine IP address of 'Mars'
- error: no valid servers configured
- Fatal: error processing configuration file '/opt/lampp/etc/proftpd.conf'
XAMPP: Error 1! Couln't start ProFTPD!
XAMPP for Linux started.


I ran int this problem and dont know how to fix it. Any suggestions?

Wickd
October 12th, 2008, 12:15 AM
Hi there thank you very much! This helped quite alot. I am new to this so gotta go study my sql and php, but this was great

Thanks

elfuegodiego
October 16th, 2008, 06:29 PM
Thanks for the guide.

Worked like a charm!

ramadha
November 6th, 2008, 12:16 PM
thank you very much!
:)

ramadha

mendozaro
November 8th, 2008, 12:35 AM
Works perfectly.

I want to suggest this icon (http://www.lestarte.com/blog/wp-content/uploads/2007/12/xampp-objectdock.png) for the XAMPP Control Panel.

CaseWestern
November 9th, 2008, 09:39 PM
Any idea why I am unable to access mysql database from the terminal after installing xampp?

I can access the database using PHPMyAdmin, but somehow I cant see the databases from the terminal when I enter mysql -u root



bash: mysql: command not found

What I supposed is, the process is looking for the mysql command in the PATH variable, but my /opt/lampp where the XAMPP is installed is not in the path. Any idea how to do that? or Do you think there is a different approach for this.

Melindrea
November 13th, 2008, 05:53 PM
And since I don't seem to be able to find how to do it... How do I setup so I can use CGI? I found a cgi-bin in the lampp folder, but can't seem to be able to access the ones in it. I'd prefer if the cgi-bin that is usable is the one in my public_html folder.

Thank you,
Marie

Melindrea
November 15th, 2008, 06:29 PM
Just a quick bump, for me and the person posting right above me. =)

Suncoaster
November 28th, 2008, 04:06 AM
Thanks for the instructions:KS. It is working fine

Dave

Jodha
December 27th, 2008, 02:54 PM
All in all very useful for setting up Xampp; had no problems at all through the entire process. However... (!)

I've run the security check and added passwords all over the place where is prompted.

Now I dont have "Create DataBase" privileges it seems.

I'm a bit new to Linux and Ubuntu, I've considered uninstalling Xampp and reinstalling it, but I cant find it in the add/remove programs section. And to be honest, I'd just like to turn that privilege back on so I can get on with stuff.

Any advice?

Thanks :)

Dssnz
January 6th, 2009, 01:48 PM
Thank you,
You made a job I thought would be hard, easy!

javaman1909
January 16th, 2009, 12:37 PM
After I link my ~/public_html to /opt/lampp/htdocs/norton, I can't view my public_html on FF. It says that "You don't have permission to access /norton on this server."
What's wrong with this, anyone?
Thanks.

Cicer
January 19th, 2009, 01:29 AM
After I link my ~/public_html to /opt/lampp/htdocs/norton, I can't view my public_html on FF. It says that "You don't have permission to access /norton on this server."
What's wrong with this, anyone?
Thanks.

Did you check if the link you've made is broken? I don't know how to check it with Terminal, but if you go to the folder with nautilus it will tell you with the icon and under the "type" column. I had the same problem as you and was changing permissions left and right until I realized I had a miscapitalization between the ~/Public_html folder I had created and the ~/public_html folder I had addressed the link to.

PaulWhipp
January 19th, 2009, 03:50 AM
Very handy.

Here is a little addition that might be useful:

Once you have lampp running on your system there will come a time when you want command line access to the mysql databases, for backup or perhaps for something that is too much trouble in phpmyadmin.

You can use synaptic package manager to install the mysql-client meta package.

Once installed, you can point it at your lampp mysql database by creating a .my.cnf file in your home directory and setting up its contents as follows (use your real username/password as appropriate):


[client]
user=root
password=secret
socket=/opt/lampp/var/mysql/mysql.sock


This allows you to use mysqldump etc. from the command line and have it act on your databases in lampp. For example:

$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 36
Server version: 5.0.67 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| names |
| orders |
+----------------+
2 rows in set (0.00 sec)

mysql> select * from names;
+-------+
| name |
+-------+
| **** |
| harry |
| tom |
+-------+
3 rows in set (0.00 sec)

mysql> quit
Bye



mysqldump is great for backups, mysqlimport is handy for large data imports and there are a number of other handy utilities in mysql-client just


apropos mysql

and use man to check them out.

xihad76
January 23rd, 2009, 10:13 AM
Thank u very much bro.. it was really very very helpful :-)

cheers!!

kodemind
January 30th, 2009, 04:40 AM
... If you read this and use it could you leave a reply saying if it was useful/useless? I'd like to keep improving this how-to, so feedback would be good.

Plus, replies bump it up the list.

Thank for the tut, very precise. I was wondering if you could add more info about running xampp as a single user...

Its default is to run as 'nobody'. Some users have had success by..

chown nobody:user *
chmod 0775 *

Possibly adding directions to run as single user so they can chmod files to 0755 or similar for better security.

Again great work!:)

jlhaslip
February 24th, 2009, 08:15 PM
Thanks for the Tutorial on XAMPP. Worked great.

sitmex
March 25th, 2009, 09:10 PM
Hi, first of all, thanks for posting this helpful guide.

How can I set it up so it start automatically when startup.

Using: Ubuntu 8.10
Experience: newbie.

I've tried to set it at: the sessions application but no luck.

PaulWhipp
March 27th, 2009, 11:58 PM
To start lampp automatically when you start the session

gksudo gedit /etc/rc.local
Then add the following line somewhere after the comments and before
the exit 0 statement at the end of the file:


/opt/lampp/lampp start

Treat rc.local with care, all commands here executed as the super user and we need that to start lampp.

For normal automatic startup items you were right to look to the Administration > Services or Preferences > Sessions menu options.

duffboy
April 13th, 2009, 08:23 PM
I went through this tutorial and do thank you, it is well done.

However, when I go to access my localhost/username folder I get a 403 forbidden error.

The link to the public_html folder in the /opt/lampp/htdocs folder is working.

I am not too sure how to handle this. I am a Ubuntu novice with some understanding, but that is about the extent of it. On the bright side, once I can figure this out, I will be one major step closer to leaving Windows behind me for good!

PaulWhipp
April 14th, 2009, 02:07 AM
When you create local websites on your machine under the /opt/lampp/htdocs folder you need to set the file access permissions to be appropriate for general web access otherwise you may see permission errors such as 403.

You need to ensure that the file permissions on your website files allow the user 'nobody' access because this is the user that apache uses to access your web site files when it gets asked to serve up the page by your browser.

For this its probably easiest to give everyone ('others' in Unix speak) read and execute access on the directories and files as appropriate:

Change directory to the relevant website folder (~/websites/test for example) and execute the following:


~/websites/test $ find . -type d -exec chmod o+x {} \;
~/websites/test $ find . -type f -exec chmod o+r {} \;


The first command finds each file of type 'directory' and gives 'other' users the ability to execute (cd to) the directory.

The second command finds each file of type 'file' and gives 'other' users the ability to read the file.

Also, be sure to take the read access off any files that contain configuration information (such as usernames and passwords to access databases). For example:


~/websites/test $ chmod o-r configuration.php


You might wonder how come you can take the read access off a file like configuration.php but can't take it off a file like index.php. I certainly did.

I believe that this is the reason:
When apache accesses the site file it does so as 'nobody'. However, when the php script executes to generate the html for the browser it executes as the php script owner. Thus configuration.php is protected against someone trying to directly access it but it can still be accessed by your php files.

duffboy
April 14th, 2009, 04:14 AM
Thank you so very much. Worked like a charm.

That was my last major hurdle as I am now, effectively, Windows free!