1

There are a lot of questions about how to get extension X for PHP Version Y on Linux Distro Z running.

What I'm missing out there are comprehensive general tutorials about how PHP on Linux works.

As an example: I am currently trying to get mysqli working and I know I can either compile PHP with mysqli or include the extension. Well yeah, but how do I exactly compile PHP with a certain extension, where do I get the necessary files for my Linux Distro and if I want to include it as extension.so, where do I get this? Also if I look at my phpInfo() I see that PHP 5.2.14 is running but if I do yum info php, it tells me that the version is PHP 5.1.6. How come, do I have two differen PHP versions running, what would I do to get clarity into this... etc.

What I need is a clear description of the general mechanisms, something like a tutorial called: How to enable PHP extensions on Linux servers.

Any part-tutorials or links to such things are greatly appreciated!

3
  • Edit: PHP 5 of course, not 3. Commented Nov 14, 2010 at 7:17
  • @Zoredache: centos-5.5-x86_64 Commented Nov 14, 2010 at 7:20
  • But I'm really rather looking for general advice. Commented Nov 14, 2010 at 7:21

1 Answer 1

1

With recent distros almost every standard PHP module is available as a package that you can just install. For non-standard modules if you have all the appropriate libraries available you should be able to build the module without rebuilding PHP.

I see that PHP 5.2.14 is running but if I do yum info php, it tells me that the version is PHP 5.1.6. How come, do I have two differen PHP versions running,

It is likely that you or someone installed the system and it came with PHP 5.1.6, and then they build a newer version from source, but they didn't remove the packaged version, confusing your package manager and making a bit of a mess.

1
  • Thanks for the answer, I meant PHP 5 all along but the problem remains the same. Sorry for the confusion. How can I clean up the 5.1.6 parts... Commented Nov 14, 2010 at 7:19

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.