Page 1 of 1

Problem With XAMPP in Ubuntu

PostPosted: 20. October 2008 18:30
by abi3719
Hi all,

Im new to Xampp+Ubuntu. Ive used Xampp in Windows, it ws smooth.. But, this thing,i couldnt manage to start itself.. Im gettin this error:

Forbidden

You don't have permission to access /ShivkutTrials on this server.
Apache/2.2.9 (Unix) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8h PHP/5.2.6 mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 Server at localhost Port 80


/etc/hosts gives Permission denied

egrep :initdefault: /etc/inittab gives No such file or directory


Its jus breaking my head.. :oops:

Anyone, pleaseeeeeeeee help me......

Thanx in Advance.. Expectin ur early response..

Re: Problem With XAMPP in Ubuntu

PostPosted: 20. October 2008 18:47
by glitzi85
abi3719 wrote:/etc/hosts gives Permission denied

That is not a command, it is a text file. So use this:

Code: Select all
cat /etc/hosts


instead.

abi3719 wrote:egrep :initdefault: /etc/inittab gives No such file or directory

IIRC this file does not exists on Ubuntu. It uses another bootscript program.

How did you install XAMPP?

Please post the output of the following command:

Code: Select all
ls -l /opt/lampp/htdocs/


glitzi

PostPosted: 20. October 2008 18:54
by abi3719
total 56
-rw-r--r-- 1 root root 30894 2007-05-11 18:10 favicon.ico
drwx------ 2 root root 4096 2008-10-14 11:23 HFJavaScript
-rw-r--r-- 1 nobody root 163 2003-11-01 02:45 index.html
drwx------ 2 root root 4096 2008-10-14 11:26 myorkut
drwx------ 3 root root 4096 2008-10-14 11:24 ShivkutTrials
drwxr-xr-x 2 nobody root 4096 2004-12-26 16:00 webalizer
drwxr-xr-x 7 root root 4096 2008-10-19 00:01 xampp


This is the response, wherein, HFJavaScript, ShivkutTrials, myorkut are my folders

Thanx fr ur fastest response... Plz do help me in fixin tis...

PostPosted: 20. October 2008 18:59
by abi3719
I installed as mentioned in the following link:

http://alanedwardes.com/posts/installin ... ple-guide/

This workd great for extraction w/o error.. and, wen i use the /opt/lampp/lampp start im gettin like this:

XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.


So, obviously, i find no. prob. in this..

[/b]

PostPosted: 20. October 2008 19:17
by glitzi85
Yes, XAMPP is starting without problems. Your Problem are the rights of your folders.

The XAMPP Apache is running as nobody/nogroup by default. Your folders are owned by user root and group root. Only user root has full access to the folder, all other users have absolutely no access to the folders (including apache).

This should help:

Code: Select all
sudo chown -R nobody HFJavaScript myorkut ShivkutTrials


The other solution would be to adjust the rights of the folders so that they are world-readable. The problem there is that only folders have to be world-executable, files not. BTW: Does somebody know an command to set the executable-bit for folders recursive?

glitzi

PostPosted: 20. October 2008 19:40
by Wiedmann
Does somebody know an command to set the executable-bit for folders recursive?

Should be something like:
Code: Select all
find . -type d -exec chmod +X {} \;

PostPosted: 20. October 2008 20:20
by glitzi85
Wiedmann wrote:
Does somebody know an command to set the executable-bit for folders recursive?

Should be something like:
Code: Select all
find . -type d -exec chmod +X {} \;

Cool, funktioniert. Vielen Dank!

PostPosted: 21. October 2008 19:20
by abi3719
Hi,

Thanx alot.. I fixed tat prob, jus nw.. its workin fine.. Bt, want to ask smthn more.. The folder architecture seems to be different inside lampp, from Xampp.. Coz, inside, xampp, (Windows version), i had htdocs, apache, mysql etc.. and, i used to backup data from mysql , by just opening the data folder inside mysql and copying the whole content. This way, i was able to use it everywhere. Bt, i dono hw to use those database here, where is mysql folder, and will the same method, work here toooo??

By d way, i specially thank the two guys, who enthusiastically helped me.. Thanks again..

PostPosted: 21. October 2008 20:25
by glitzi85
Yes, the folder structure is different.

To Backup MySQL i would use the mysql command line tool mysqldump:

/opt/lampp/bin/mysqldump -A --user=username --password=password > backup.sql

Then you have the complete Database in the backup.sql file and you will be able to use it absolutely everywhere, even on a Windows MySQL Server.

glitzi

PostPosted: 22. October 2008 15:56
by Dave_L
For the Linux version of XAMPP, the MySQL databases are in /opt/lampp/var/mysql. Those files can be backed up, just as on Windows. However, you have to be careful to preserve the file permissions and file owner/group when backing up and restoring.

But I agree that backing up MySQL databases using mysqldump (or phpMyAdmin) is a more portable option.