Error 1! Couln'd start Apache!

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Postby tomsivesind » 28. June 2005 11:21

For me, a "permanent" fix was to edit:

/etc/selinux/config

...comment all lines and adding:

SELINUX=disabled

Why? No idea, but it worked.
tomsivesind
 
Posts: 5
Joined: 11. April 2005 16:57

Postby pneumoboy » 21. August 2005 19:32

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.
pneumoboy
 
Posts: 7
Joined: 21. August 2005 17:27
Location: New York, USA

Postby Oswald » 22. August 2005 11:47

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
User avatar
Oswald
Apache Friends
 
Posts: 2718
Joined: 26. December 2002 19:51
Location: Berlin, Germany
Operating System: Linux

Chcon did not work ...

Postby Roxie » 22. August 2005 15:49

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.
Roxie
 
Posts: 7
Joined: 16. June 2005 16:25

chcon...

Postby pneumoboy » 22. August 2005 18:24

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
pneumoboy
 
Posts: 7
Joined: 21. August 2005 17:27
Location: New York, USA

Chcon did not work ... (v2)

Postby Roxie » 22. August 2005 18:29

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

And got:
chcon: too few arguments
Roxie
 
Posts: 7
Joined: 16. June 2005 16:25

Need some more info

Postby pneumoboy » 22. August 2005 20:35

Roxie:

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

Thanks,
Will Licata
"pneumoboy"
pneumoboy
 
Posts: 7
Joined: 21. August 2005 17:27
Location: New York, USA

Further info

Postby Roxie » 22. August 2005 20:54

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
Roxie
 
Posts: 7
Joined: 16. June 2005 16:25

FC3

Postby pneumoboy » 23. August 2005 01:11

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!
Will Licata
"pneumoboy"
pneumoboy
 
Posts: 7
Joined: 21. August 2005 17:27
Location: New York, USA

Two other things to note....

Postby pneumoboy » 24. August 2005 00:48

(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).
Will Licata
"pneumoboy"
pneumoboy
 
Posts: 7
Joined: 21. August 2005 17:27
Location: New York, USA

Postby Oswald » 26. August 2005 09:32

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
User avatar
Oswald
Apache Friends
 
Posts: 2718
Joined: 26. December 2002 19:51
Location: Berlin, Germany
Operating System: Linux

Postby pneumoboy » 05. September 2005 17:12

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.
Will Licata
"pneumoboy"
pneumoboy
 
Posts: 7
Joined: 21. August 2005 17:27
Location: New York, USA

Postby ageex » 01. October 2005 18:22

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
-ageex
ageex
 
Posts: 1
Joined: 01. October 2005 18:07

Postby tristanlee85 » 15. October 2005 08:40

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?
tristanlee85
 
Posts: 11
Joined: 15. October 2005 08:16
Location: Columbus, OH

Postby Zyankali05 » 19. October 2005 14:14

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?
Zyankali05
 
Posts: 1
Joined: 19. October 2005 14:05
Location: Haseluenne / Germany

PreviousNext

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 68 guests