Jump to content


Photo

Recompiling PHP - Fedora 4


  • Please log in to reply
12 replies to this topic

#1 mentalageof2

mentalageof2
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 08 July 2006 - 01:47 PM

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

#2 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 08 July 2006 - 02:07 PM

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:
Call To Undefinded Function mysql_connect

#3 mentalageof2

mentalageof2
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 08 July 2006 - 02:22 PM

Thanks for the reply,

Unfortunately at present I only have ssh access to the server so CLI only pls.

#4 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 08 July 2006 - 07:37 PM

as far as i know, yum is CLI. sorry I forgot to mention that in my previous post.

You should have tried google :)
PHP4 on Fedora Core 4
Fedora Core 4 Linux Installation Notes: Yum

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 my wiki


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 :)

#5 mentalageof2

mentalageof2
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 10 July 2006 - 06:48 PM

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.

#6 mentalageof2

mentalageof2
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 10 July 2006 - 07:18 PM

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!

#7 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 10 July 2006 - 07:26 PM

google works wonders :)

glad you got it sorted.

#8 mentalageof2

mentalageof2
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 11 July 2006 - 04:33 PM

Yes!

And completely without sarcastic replies, amazing  8)

#9 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 11 July 2006 - 05:31 PM

:EDIT: ocrrected spelling mistake. Debian's package manager is APT and not PAT


Yes!

And completely without sarcastic replies, amazing  8)


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.

#10 mentalageof2

mentalageof2
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 11 July 2006 - 05:49 PM

;)

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?

#11 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 11 July 2006 - 06:10 PM

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:
make check
(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:
$ cd /path/to/source
$ ./configure --with-myOption --with-otherOptions --with-moreOptions
$ make
$ make check #optional but recommended
$ make install

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.

#12 mentalageof2

mentalageof2
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 11 July 2006 - 08:12 PM

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





#13 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 11 July 2006 - 08:18 PM

you might enjoy this thead then: good free linux OS

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users