Jump to content

Archived

This topic is now archived and is closed to further replies.

mentalageof2

Recompiling PHP - Fedora 4

Recommended Posts

Hi All,

I have a new server with a fresh install of Fedora Core 4. I need the use of mysql extensions but the original php build has been compiled with these extensions off.

I understand that I need to recompile php on the server but am having problems finding information on this on the web.

I do of course have the instalation instructions for php but am unsure of what I need to do in preparation.

Can anyone give me a quick step by step, I'm not sure if I have the binaries either. I have some knowledge of Linux environments but am by no means an expert.

TIA

Share this post


Link to post
Share on other sites
if you're not too fond of doing it manually, i believe FC has  a program called "Frog"? Or you can even use yum I believe.
That way you can do it via a GUI...although you would learn more if you did it by hand in which case you would find this thread very useful:
[url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]Call To Undefinded Function mysql_connect[/url]

Share this post


Link to post
Share on other sites
as far as i know, yum is CLI. sorry I forgot to mention that in my previous post.

You should have tried google :)
[url=http://www.mjmwired.net/resources/mjm-php4-fc4.html]PHP4 on Fedora Core 4[/url]
[url=http://stanton-finley.net/fedora_core_4_installation_notes.html#Yum]Fedora Core 4 Linux Installation Notes: Yum[/url]

some of those steps require super user permissions...but if you have the ability to edit ~/.bashrc you should be able to install all these programs in your home directory where you should have absolute access.
Section 1.2 should help you on [url=http://wiki.housni.org/index.php?title=Compiling_and_Installing_Vim_7.0_per_user_on_%2Anix&mwiki_session=fad89bb61c0e7345d6f96cae2637ac10#Set_up_the_environment]my wiki[/url]


but really, you would save yourself some time if you attempted the suggestions in the link i posted previously. or maybe you already attempted them, but you haven't told me if you have and my jedi powers haven't developed to a level where i can read minds...yet :)

Share this post


Link to post
Share on other sites
Hi,

Yes thanks yum is indeed cli and a wonderful little bit if kit, however it doesn't allow me to configure the instalation (as far as I know) and as php5 is installed by default with mysql off, it hasn't helped me directly.

I did soldier on and do a full compile of php5 with the options i need. Everything seemed to go ok in the build but when I restarted apache, I have no php support.
Bummer.

Removing php and replacing it via yum works fine but of course I still can't use mysql, is it possible to configure yum install to do a non standard instalation?

Am still fiddling with it, any advice greatly appreciated.

Share this post


Link to post
Share on other sites
Hi,

No worries have resolve the issue.

very very simple:

$yum remove php
$yum install php-mysql

Job done

Is amazing I spent 3-4 hours on that yesterday! Just goes to show a little knowledge goes a long way. Thanks for the replies anyway!

Share this post


Link to post
Share on other sites
google works wonders :)

glad you got it sorted.

Share this post


Link to post
Share on other sites
:EDIT: ocrrected spelling mistake. Debian's package manager is APT and not PAT


[quote author=mentalageof2 link=topic=99871.msg395257#msg395257 date=1152635636]
Yes!

And completely without sarcastic replies, amazing  8)
[/quote]

haha apart from that post, i suspect :)

package managers are wonderful things.

i'm guessing you have no say in what OS to choose. i generally avoid RPM based distros like RedHat, Fedora, SuSE, etc.

i love anything based on apt (debian, ubuntu, etc), or ports (gentoo, FreeBSD, etc) because they are very easy to manage.

Share this post


Link to post
Share on other sites
;)

When you say easier to manage do you mean more hands on, or more hands off.

I love the control of being able to compile to order however this is not fun when you come home drunk or something. A good balance and choice is what I would go for, any recommendations?

Share this post


Link to post
Share on other sites
also it isn't fun when you have no time to compile and satisfy every dependency. i was installing a program a month ago on a remote server and i had to satisfy some 20+ library dependencies and let me tell you it was NOT fun!

basically, apt and emerge check for dependencies. for example, if you install something like vim editor, you will need some ncurses libraries and emerge and apt will tell you that you need those libraries when you attempt to install vim and if you allow it to, it will even satisfy those dependenceis for you which is awesome if you're pressed for time.

i prefer compiling from source to using RPM's.

most...or at least a good make file (in a source installation) will let you do this:
[code]
make check
[/code]
(which is the step after you 'make' and before you 'make install') which will inform you of dependencies.


generally, compiling from source consists of the following commands:
[code]
$ cd /path/to/source
$ ./configure --with-myOption --with-otherOptions --with-moreOptions
$ make
$ make check #optional but recommended
$ make install
[/code]

you would need super user status (su or sudo, depending on the distro) for 'make install' if you're installing the program on the entire system.

Share this post


Link to post
Share on other sites
Cool cheers mate,

I am still trying to decide on a home linux distro tho and that's been helpfull.
I am quite familiar with makefiles though as I am used to working at a much lower level.

Many thanks



Share this post


Link to post
Share on other sites
you might enjoy this thead then: [url=http://www.phpfreaks.com/forums/index.php/topic,100080.0.html]good free linux OS[/url]

since you say you are familiar with Linux CLI, why not go for Gentoo? Anyway, check out that thread.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.