Skip navigation.
Home
Now Shipping Version 7.0

Apache2 + PHP5 + Mysql-5


Posts: 6

I am new to Mepis but I am an old Linux user, I began ages ago with RH 4.0 (on 1996? don't remember anymore). I like Mepis very much, I installed SimplyMEPIS 6.0 on one of my computers and the installation worked flawlessly with a simple CDROM unlike Kubuntu, Gentoo etc....
However I was unable to install Apache2 with PHP5+php5-mysqli; myslq-5 installation instead was OK. Actually apparently Apache2 installs correctly but then the server daemon does not run, without error messages or any useful log files anywhere. Since I have done this stuff many times in other distribution I believe that there is some broken executable, or broken dependency, down there.
I noticed that if you "#apt-get install apache2" SimplyMEPIS gets packages from ubuntu, may be there is some compatibility problem. I believe that may be it is a good idea to go back to Debian.
Any idea ?

Best regards

Daniel Liscia

MEPIS 6 and 6.5 are based on

MEPIS 6 and 6.5 are based on Ubuntu. So the fact that the packages come from Ubuntu makes sense.

However, what does not make sense is the fact that it does not work. I have done various installs of Apache/PHP/Mysql in MEPIS, and they all work flawlessly. What happens when you open a console, su to root and do '/etc/init.d/apache2 start'?

EDIT
MEPIS 7 will be based on Debian by the way, so your wish (and that of many others) will be fulfilled....

Newbie or not Newbie, there's always a question

Apache2 + PHP5 + Mysql-5

'/etc/init.d/apache2 start' does absolutely nothing, that is, it seems that that everything is fine, no error messages whatsoever, but then if you check whether the apache/httpd daemon is there with 'ps -ax' you don't find it, and if you test with a browser the http://localhost URL nothing happens. I removed and reinstalled apache2 and php5 with apt-get several times without success. Maybe I should try a more recent version of SymplyMepis.

Best regards

Daniel Liscia

Check if it installed the

Check if it installed the package apache2-mpm-prefork.

If you do this as root: /sbin/apache2. What do you get then?

Newbie or not Newbie, there's always a question

Jon Du Quesne's picture

HOW Did You Install These Packages?

Daniel, how exactly did you install these packages? Did you use synaptic, kpackage, or apt-get to put them on your box, or did you grab a tar file or some other source from some place and try to do "make", etc. on it?

Because Mepis has a pretty good repository list, and loading each of those items should be only a couple clicks (or choices) away in synaptic or apt. That way, all of the init scripts, config files and other fluff are put in the right places.

And just to be thorough, the rest of the box works fine right?

Jon

The ability to comfortably use a computer is directly proportional to desire to listen, learn, and experiment, and is inversely proportional to the fear, anger, and stubbornness that you show.

Apache2 + PHP5 + Mysql-5

Jon,

first I usually check what package is installed this way (for apache as an example):
# dpkg -l apache*
Then I install with:
# apt-get install apache2
This way, I suppose, I am fishing packages from the default repository list.
If something went wrong, as often I experienced, I remove packages with --purge this way:
# apt-get --purge remove apache*

Is that OK?

Regards
Daniel Liscia

Have you tried starting via

Have you tried starting via sbin/apache2 as I suggested earlier? Is the prefork package installed?

On a sidenote: Are you sure you wish to publish your email address? It surely already has been harvested by robots and you will get spammed beyond belief....

Newbie or not Newbie, there's always a question

About Apache2

First of all thanks for your suggestion about spam mail, I want stick my address anymore. However mine is a very old email address and never had serious problems with it.

About "sbin/apache2" now I don't remeber if I did, I don't have that PC at hand right now. I'll let you know this week-end, but I think I might better download the last release of SimplyMepis, burn it and try to install that one instead.

Best regards

Daniel

/usr/sbin/apache2

/usr/sbin/apache2
gives me the following:
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

Looks like you already have

Looks like you already have a webserver running. What if you try to connect to http://localhost?

Newbie or not Newbie, there's always a question

Apache2 php5 problems

I finally got apache2 and php5 working in SimplyMepis 6.5_02_32. I tested it with

in index.php of the DocumentRoot directory.

In my configuration file /etc/apache2/apache2.conf I added this line:

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
together with the following:
AddHandler php5-script php
AddType application/x-tar .tgz

# And the following:
AddType text/html php
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
--------------------------------------
Now, normally apache2 should be able to find the libphp5.so module if a simpler path such as
LoadModule php5_module modules/libphp5.so
as indicated in the canonical manual of apache2 and php5
but "libphp5.so" in Mepis is in the /usr/lib/apache2/modules/ directory
So you have to tell the OS all the correct path to the library. This is not right, The other Linux distributions and FreeBSD don't do that.

Daniel

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.