Which is the appropriate forum

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
griffinmt
Forum Commoner
Posts: 35
Joined: Sun Jul 16, 2006 8:37 pm
Location: Michigan

Which is the appropriate forum

Post by griffinmt »

I have a Fedora Linux system with Apache (2.0.51), MySql (4.0.21) and PHP (4.3.11)
The problem is that PHP is not built with the correct MySql support (EG: mysql_connect() etc cannot be found).
I don't have the source kits for any of these, but do have PHP 4.3.4 source kit.

I want to add the php support for mysql, but don't really know where to start and
want to make any disruption to the system as minimal as possible for now.

It seems that the products were installed in some unusual way (locations) as part of the original build and
continued maintenance, and I frankly get lost trying to navigate through the stuff and directory layouts.

Can someone help educate me and make me a little more dangerous :P
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

You pretty much just need to recompile php with MySQL support.

If it already is, which you can check with:

Code: Select all

<?php
phpinfo();
?>
then the module isn't being loaded.

Here are some tutorials that might help you...

http://www.mjmwired.net/resources/mjm-fedora-php4.html
http://www.hostlibrary.com/installing_a ... p_on_linux
griffinmt
Forum Commoner
Posts: 35
Joined: Sun Jul 16, 2006 8:37 pm
Location: Michigan

Post by griffinmt »

After checking the links that you provided, I decided to 'byte the bullet' and upgrade the whole system.

So a migrated the current website onto a different WXP system and got it up and running for the users. It is a bit sluggish, but ok for a few days.

The original system was still on version 1 of Fedora. I downloaded and built the 6 CDs for V5, and am in the process of doing a clean build on reformatted disks. Once I have all the needed parts running and the associated config files adjusted, I will slide the site back and proceed. Not the way I wanted to spend the next few days, but it was needed sooner or later!

Thanks,
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Bear in mind that PHP does not come with mysql support by default anymore (I belive as of PHP5). I think now it is the mysqli faimly of functions. So even upgrading the entire system does not ensure that you will have access to mysql. You may still need to set that extension up yourself.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

PHP5 does not include the mysql library of functions.
griffinmt
Forum Commoner
Posts: 35
Joined: Sun Jul 16, 2006 8:37 pm
Location: Michigan

Post by griffinmt »

So, it looks like I am still in need of adding the PHP-MySql marriage, but at least with an up to date environment.

Once all the updates have finished their application and I have the rest of the Apache/MySql/PHP etc setup done, I will come back and try to sort this out.

Thanks,
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Good luck, and keep us posted
griffinmt
Forum Commoner
Posts: 35
Joined: Sun Jul 16, 2006 8:37 pm
Location: Michigan

Post by griffinmt »

Ok, all the updates have been applied and ready (I think :roll: ) to proceed. Of course, right in the middle of all this, on Monday night, a storm came our way and I was lucky enough to be one of the 200,000 Michigan residents that lost power, right in the middle of applying the updates. It took about 19 hours, but we finally got power back. It took another 24 hrs to get the network connection running!

Anyway, just what do I need to do to get the correct module to enable MySql (v5.0.22) from PHP (v5)?

Be gentle, this (approach) is all foreign to me :wink:

Thanks,
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You can have mysql_* and mysqli_* functions enabled at the same time. Just uncomment their extension lines in php.ini.
griffinmt
Forum Commoner
Posts: 35
Joined: Sun Jul 16, 2006 8:37 pm
Location: Michigan

Post by griffinmt »

Thanks!

Ok, that was straight forward enough (and I guess I already new the answer but wanted confirmation :? ).

Now for the awkward part. Getting Apache V2.2 to interact with PHP V5.

I don't want (need) any CGI capability, and I alread have the http.conf set to handle php extensions and look for index.php etc

What i really need is the module referenced by the 'correct' LoadModule command, and where that module comes from, or how do I have to build it. :oops:
griffinmt
Forum Commoner
Posts: 35
Joined: Sun Jul 16, 2006 8:37 pm
Location: Michigan

Post by griffinmt »

It would seem that I have been searching for the wrong module. After some more digging, I found that the correct name is libphp5.so

This I have and now I have it all working (barring any unforseen items I may have forgotten :oops: )

Thanks for your patience.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Congrats.
Post Reply