Mandrake PHP/SQL Support

djdrastic

Senior member
Dec 4, 2002
441
0
0
Can someone tell me how to compile , mysql support into php opn Mandrake 9 ? Sorry if this is a stupid question but I can't figure out what I have to do , to get mysql support . The only documentation that I've seen suggests going to the extensions directory and then configuring something


Sorry for being such a noob :eek::disgust::D
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
MySQL and PHP are 2 seperate things (although they commonly get used together).

Follow the compile/install documentation and install each of them seperatly.

-Spy
 

calpha

Golden Member
Mar 7, 2001
1,287
0
0
Originally posted by: BingBongWongFooey
I would figure mandrake would already have it. Look for an rpm.
This works w/ 8.2....havean't used 9.x yet:

They definitely do:

Just su to root and run rpmdrake....damn my vnc on my mandrake box is cracked. Crimminy.

Just using RPM Drake, you need to have the following packages installed:
Apache xx
Php
php-mysql
mysql

Let rpmdrake select your dependencies

Alternatively, you can download the sources for apache, php, and mysql. You won't be able (to my knowledge) compile just php+mysql to get it to work on an RPM of Apache. It's been a while since I compiled my latest version of apache, but if I remember right you have to compile mysql first, then compile php, then compile apache. I'm still a bit of a middle skilled linux user......so if that's wrong sorry. I made myself learn how to install stuff from the sources, and i don't regret it. But I've not figured out how to keep everyhting up to date on my compiled stuff.

Just do a google for mysql + php + apache + compile or something like that.....

But if you do it this way, you want to make sure to use rpmdrake and remove all occurances of apache, mysql and php. Now, if you do install it from the source, you'll have another pita b/c you'll then have to figure out how to add apache & mysql to the startup.........

Either way is pretty simple, but the rpm's offer you the least bit of hassle....but no pleasure in having dug through the trenches.
 

djdrastic

Senior member
Dec 4, 2002
441
0
0
I'll try that out today , I'm used to Redhat where it comes with out of the box support from php in mysql . If I'm not mistaken , the Mandrake CD 2 has all those rpm's, so I don't think I'd have to download anything.
 

eklass

Golden Member
Mar 19, 2001
1,218
0
0
steps for installing php/mysql/apache:

install apache
install mysql
install php

custom builds from source are best, but you can install from rpm if you have to, and you may want to try it with mysql... make sure you take off any other databases running on the box (such as postgresql) otherwise you WILL have problems
 

Buddha Bart

Diamond Member
Oct 11, 1999
3,064
0
0
custom builds from source are best
bzzzzt try again

make sure you take off any other databases running on the box (such as postgresql) otherwise you WILL have problems
bzzzzt only if you messed up your compiles. which of course would not be a problem with a properly compiled and installed and tested setup like.. oh I dunno.. a distro provides in their package management system

bart
 

eklass

Golden Member
Mar 19, 2001
1,218
0
0
Originally posted by: Buddha Bart
custom builds from source are best
bzzzzt try again
make sure you take off any other databases running on the box (such as postgresql) otherwise you WILL have problems
bzzzzt only if you messed up your compiles. which of course would not be a problem with a properly compiled and installed and tested setup like.. oh I dunno.. a distro provides in their package management system bart

yeah, cause i don't know what i'm talking about admin'ing 4 production servers... 1st you say that compiling from source is not best? then you talk about building from source if done properly, blahblahblah...

well which is it? source or not?

let us refer to the pizza analogy... using an rpm is like getting a pizza kit... sure it might go together just fine, but it'll never be exactly how a frezy pizza can be...


BZZZZZZZZT the price is wrong bob!
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
1. Why would running mysql and postgres together cause problems?

2. What is the advantage of compiling apache and/or php and/or mysql yourself, if the packaged versions offer everything you require, and have no obvious negative side effects?
 

djdrastic

Senior member
Dec 4, 2002
441
0
0
Shucks , it still doesn't want to compile mysql supoort into php , I must be doing something wrong. I'm not a huge fan of installing sources, they tend to always stuff up something when I do them . I'll try messing with my system later today again ; otherwise back to redhat :disgust::Q:confused::frown::eek:
 

calpha

Golden Member
Mar 7, 2001
1,287
0
0
Here you go:

http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page1.html

Apache, SSL (you can skip it), Php, and mysql.

Basically, this creates a pre-compiled binary of the apache module with php, and mysql support built in. The steps in the article are pretty solid, as they look just like the steps that I followed for my working install of postgres, mysql, ssl, apache, front page extensions, php, mod_perl...a.nd a few others all from sources.

PS.
Don't ever mess around with front page extensions. By far the hardest thing I've ever tried to configure on a *nix box.
 

Buddha Bart

Diamond Member
Oct 11, 1999
3,064
0
0
yeah, cause i don't know what i'm talking about admin'ing 4 production servers.
Good thing your employer doesn't understand how much time you're wasting.
1st you say that compiling from source is not best? then you talk about building from source if done properly
Re-read the sentance, it makes perfect sense. If it still doesnt, try this.
let us refer to the pizza analogy... using an rpm is like getting a pizza kit...
Not quite. Using an rpm is like buying a pizza from the local pizza-place. Made by the guy who's been in the business for most of his life. Made by the guy who feeds his children based on the sales of his pizza.
Building from source is like buying a pizza kit. Pretty much everything is proveded for you, its just up to you to stitch it all together and come up with the finished product. You're honestly telling me damn near any of us could make a better boboli than the local guy's pizza?

Plus we're just talking about installing. When custom-source-build installations really kick you in the ass is un-installing and upgrading (with the exception of ports-based systems). We all know the tricks, sometimes you can do a make-uninstall, sometimes you can diff an updatedb before and after, but all of it is a waste of time compared to a package manager that will remove all applicable files, make a backup copy of all config files, and install all the new binaries in a single command.

Building from source is almost always a waste of time. You waste time downloading all the patches and modules you want, you waste time patching the source tree, you waste time compiling. For something like apache+php+mysql to build it all from source would take at least an hour (assuming a respectible broadband download and a relativly new/fast machine to compile on). In that same hour I can spend about 10min installing the rpm's on a test machine, 20min running httperf on it, check the error log for any segfaults, and another 5 to scp it to the production machine and install it. Based on time alone any IT department that allows linux into their datacenter should force their dimmer server admins to stick to the distro's package management system. Not to mention reliability. The people at RedHat & SuSE have hundreds of test servers, thousands of example-configs, and full-time dedicated staff to running that package through every possible scenario making sure it doesnt conflict/crash/segfault/etc. Even debian, with no dedicated staff or hardware, manages to test the bejezus out of its packages through a slower release cycle and a gigantic install base.

There's nothing 37337 about running ./configure && make && make install

(the exception to some of my compiling comments are ports-based systems.)

bart
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
The people at RedHat & SuSE have hundreds of test servers, thousands of example-configs, and full-time dedicated staff to running that package through every possible scenario making sure it doesnt conflict/crash/segfault/etc
Doesn't always make much of a difference, redhat et al still have plenty of bugs, even on their best releases.

There's nothing 37337 about running ./configure && make && make install
Eteet? :p
 

Firus

Senior member
Nov 16, 2001
525
0
0
So back to the question...how DO you install php+apache+mySql from rpms? I have been trying for a while to compile from source so that all three will work together but with no luck...Bart, please help me(and others) out by telling us. Because I always thought that the with teh rpm packages you could not integrate the 3, for say building dynamic webpages and the like...can you please prove me wrong? :)
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
Originally posted by: Buddha Bart
Sorry my leet-speak is rusty, its been a while since I was on an aol chatroom ;)

bart
The kids in the AOL chatrooms know this stuff and I dont? Man I feel out of touch...
rolleye.gif


-Spy
 

calpha

Golden Member
Mar 7, 2001
1,287
0
0
Originally posted by: Firus
So back to the question...how DO you install php+apache+mySql from rpms? I have been trying for a while to compile from source so that all three will work together but with no luck...Bart, please help me(and others) out by telling us. Because I always thought that the with teh rpm packages you could not integrate the 3, for say building dynamic webpages and the like...can you please prove me wrong? :)

Two more links for you for by sources:
1. By Hand:
Apache 2.0 & Php

2. Just let it run: Script based install from sources which includes downloading necessary modules auto:
ApacheToolbox

If you want to use RPMs, first make sure you got apache working, and then make sure you got php working. You may have to add some directives to your Httpd.conf to get php working with apache. you can then just put <? phpinfo();?> in a test.php file under your <webroot> dir.

Someone else will have to answer regarding what rpm is needed for php/apache to mysql, and whether or not you need mod_php, and mod_mysql. I don't remember to be honest.....as I'm just a do by the source guy. I think you do need mod_php, but I think mod_mysql is for using mysql as an authorization backend.....dunno.

But either way you wnat to do it, it can be done. The simplest way would be to just play around with rpmDrake

PS.
If you've already tried some source compiling.....go to the directories you did and make sure you do a make clean before you try recompiling anything again.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Here's a recommendation: STAY FAR FAR AWAY from rpm-based distros.

/me just got home from an aggravating day at work dealing with something that begins with red and ends with hat :disgust:
 

Buddha Bart

Diamond Member
Oct 11, 1999
3,064
0
0
So back to the question
Sorry for the rant :)

Personally I've spent a grand total of 15 minutes logged into a mandrake system, so I can't be of much help. However i'll explain how one would do it in redhat, and since they're both rpm based systems I imagine its very similar.

First off you need the two stand-alone systems. Apache, and MySQL. Which probably means this guy and this guy.

Now you want to add php support to apache. This is done using mod_php (actually there's otherways, but you probably want mod_php).

I'm not 100% sure on how mandrake breaks php down, but I think the first package you'll need is this however that isn't a pre-compiled rpm, its a source rpm. Rpmfind doent seem to have a pre-compiled one. I bet if you find some mandrake 9 mirror you'll find a precompiled one there. Otherwise you can just "rpm --rebuild package.srpm" and it will compile & install it for you.

Lastly you need to give php support for mysql with this

Some of the packages made mention of dependancies, so I think you'll need these too:
apache-devel
php-devel

tip: download allll the packages, put them in one directory (with nothing else), and run a "rpm -ivh *". RPM will sort out the order they need to be installed in so that each one has the dependencies it needs first. (this won't work with that one Srpm in the mix, so try and find a binary or look into the rpm --recompile command).

caveat: I just walked through the redhat apache+php+mysql process using analagous mandrake packages. For all i know the people at mandrake do things very differently. For instance, i suspect that you won't need normal mod_php because it will be replaced with mod_php-mysql.

good luck,
bart
 

eklass

Golden Member
Mar 19, 2001
1,218
0
0
Originally posted by: Buddha Bart
So back to the question
Sorry for the rant :)

i love flames caused by a difference in opinion or methodology

if you don't like my suggestion, don't knock it, suggest up something else. this is a helping forum - this is what i do to get things working

the first thing the world needs more of is less a'holes