Page 3 of 4

PostPosted: 28. June 2005 11:21
by tomsivesind
For me, a "permanent" fix was to edit:

/etc/selinux/config

...comment all lines and adding:

SELINUX=disabled

Why? No idea, but it worked.

PostPosted: 21. August 2005 19:32
by pneumoboy
I got xampp to work properly on Fedora Core 4 with SELINUX enabled.

SELINUX=disabled - disables SELINUX. It is good for testing to determine that the problem is related to SELinux, but I am uncomfortable running in that mode.

My issue was:

LAMPP: /opt/lampp/bin/php: error while loading shared libraries: /opt/lampp/lib/mysql/libmysqlclient.so.14: cannot restore segment prot after reloc: Permission denied


Here is how I fixed it:

(sudo (to make me root))

sudo chcon -t TYPE /opt/lampp/lib/mysql/libmysqlclient.so.14

Works fine now...

btw: if you disabled SELINUX and decide to re-enable... the first the time the system comes up with SELINUX enabled will be a longer boot up than normal as the security enhancement is applied. The bigger the file system - the longer you wait.

PostPosted: 22. August 2005 11:47
by Oswald
Dear pneumoboy!

pneumoboy wrote:Here is how I fixed it:

(sudo (to make me root))

sudo chcon -t TYPE /opt/lampp/lib/mysql/libmysqlclient.so.14

Works fine now...


Thank you very much for that fine solution. I will include it quickly into our Linux FAQ.

Many greetings from Germany,
Oswald

Chcon did not work ...

PostPosted: 22. August 2005 15:49
by Roxie
I am afraid that the suggested fix (above) did not work for me. I do not know what the error I've received means or why I would get this when the poster did not, but I quote the error message here, for whatever it may be worth to others:

chcon: can't apply partial context to unlabeled file /opt/lampp/lib/mysql/libmysqlclient.so.14

-- Still searching for a solution to re-enable SELINUX on my XAMPP install.

chcon...

PostPosted: 22. August 2005 18:24
by pneumoboy
chcon: can't apply partial context to unlabeled file /opt/lampp/lib/mysql/libmysqlclient.so.14


Looks like an issue with chcon...

Try (as root):

chcon -t /opt/lampp/lib/mysql/libmysqlclient.so.14

(this time leaving out "TYPE")

--Will Licata

Chcon did not work ... (v2)

PostPosted: 22. August 2005 18:29
by Roxie
I tried:
chcon -t /opt/lampp/lib/mysql/libmysqlclient.so.14

And got:
chcon: too few arguments

Need some more info

PostPosted: 22. August 2005 20:35
by pneumoboy
Roxie:

What is your distro and kernel? I did not see it in previous posts...

Thanks,

Further info

PostPosted: 22. August 2005 20:54
by Roxie
It used to be here, I don't know where that info went.

I'm running on Fedora Core 3.

Kernel is: 2.6.12-1.1372_FC3 #1 Fri Jul 15 00:59:10 EDT 2005 i686 i686 i386 GNU/Linux

FC3

PostPosted: 23. August 2005 01:11
by pneumoboy
Roxie:

I just installed xampp 1.4.15 on FC3 with 2.6.12-1.1372_FC3 kernel and it works fine. SELinux is enabled and I did not have to make any modifications to my Security Context with chcon.

My installation is a fresh install of FC3 (not an upgrade of any kind). In any case my chcon version on this box is 5.2.1.

If I could recreate the problem I might be able to provide more assistance... Sorry!

Two other things to note....

PostPosted: 24. August 2005 00:48
by pneumoboy
(1) My config for selinux on FC3 is:

SELINUX=enforcing
SELINUXTYPE=targeted

(2) I have a box running FC4, but the SELINUX config file is not in the standard loaction (/etc/selinux/). I have not attempted to install xampp on this system. The system has been upgraded a few versions (from Red Hat through the Fedoras to FC4).

PostPosted: 26. August 2005 09:32
by Oswald
Dear Friends!

pneumoboy: Are you sure about chcon -t TYPE ...? Isn't it chcon -t texrel_shlib_t ...?

Roxie: As far as I read about this topic, you need SELinux enabled to run chcon. Otherwise you get chcon: can't apply partial context to unlabeled file

But I'm just guessing. I've no Fedora over here and can't test is by myself. (But I will start the download tonight...) ;)

Many greetings from Germany
Oswald

PostPosted: 05. September 2005 17:12
by pneumoboy
I believe the -t TYPE vs -t is depenet on the version on 'chcon' - I was received an error without TYPE specified, as did Roxie.

PostPosted: 01. October 2005 18:22
by ageex
hi, i had the same problem at the begining,
but i solved it just by change 'user' and 'group' directive to a valid user/group. In my case, user and group was set as 'apache' but i realize later that user/group 'apache' doesnt exist in my system.

hope this useful

PostPosted: 15. October 2005 08:40
by tristanlee85
I'm getting the same error as everyone else:

Code: Select all
Starting XAMPP for Linux 1.4.16...
/opt/lampp/bin/php: error while loading shared libraries: /opt/lampp/lib/mysql/libmysqlclient.so.14: cannot restore segment prot after reloc: Permission denied
XAMPP: Starting Apache with SSL ...
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://community.apachefriends.org/f/
XAMPP: XAMPP-MySQL is already running.
XAMPP: Starting ProFTPD...
XAMPP: /opt/lampp/sbin/proftpd: error while loading shared libraries: /opt/lampp/lib/mysql/libmysqlclient.so.14: cannot restore segment prot after reloc: Permission denied
XAMPP: Error 127! Couln't start ProFTPD!
XAMPP for Linux started.


FC4 here. I've tried the 'chcon' syntax with no luck. I'll try the SELinux instructions. Since I already have httpd installed, how exacly do I uninstall/remove it? Would I do it through the GUI or terminal?

PostPosted: 19. October 2005 14:14
by Zyankali05
I've got the same problem. I've been waiting for several days now for an answer to tristanlee85's post. apache does start, when I use the setenforce 0 command. But this can't be the solution.
I'm also running Fedora Core 4 with xampp 1.4.16.

I've installed the classical apache httpd-server before this problem occured to get to know to this single tool. Maybe there is something interfering, though i deleted the apache-httpd-server again.

The error mesage i get is the following:

Code: Select all
Starte XAMPP fuer Linux 1.4.16...
/opt/lampp/bin/php: error while loading shared libraries: /opt/lampp/lib/mysql/libmysqlclient.so.14: cannot restore segment prot after reloc: Permission denied
XAMPP: Starte Apache mit SSL ...
XAMPP: Fehler 1 beim Starten vom Apache!
XAMPP: Starte Diagnose...
XAMPP: Sorry, ich weiss nicht was da schief laeuft.
XAMPP: Bitte wende Dich ans Forum http://community.apachefriends.org/f/
XAMPP: Starte MySQL...
XAMPP: Starte ProFTPD...
XAMPP: /opt/lampp/sbin/proftpd: error while loading shared libraries: /opt/lampp/lib/mysql/libmysqlclient.so.14: cannot restore segment prot after reloc: Permission denied
XAMPP: Fehler 127 beim Starten von ProFTPD!
XAMPP fuer Linux gestartet.

(it's german).

so it's pretty much the same as it's posted before. So, why should there suddenly be a problem with selinux? It wasn't there before, it just occured when I installed the apache-http-server separately (what was a stupid mistake as i realised now...).
The version of lampp didn't change.

So I hope there's a solution. Is it really necessary to disable selinux now or is there another way?