hi,

Just for the history : I am a new to apache. And I am responsible for this new server.

um... I don't know if this is the right section to post my questions or not. Howere, here they are:

1. some libraries or packages installation instruction says : you need to compile php with <package name> support.

how do I do that ? I mean recompiling php to support somthing . forget about Gd and Mysql. those are very easy as long as easyapache is working.

I am talking about custom libraries ( like pgsql for example ).
which is not exist in easyapache list.
without losing my old configuration.

that leads me to the second question.

2. How can I add this custom library to easyapache list?
for fast compiling in the future .

sorry if I made a language mistake.

I need your help.

I have read lots of howtos where was instructions about recompilations to support some kind of 'libraries'.
But lot of those instructions was written just for case 'if it is not compiled with it already'.
The most of it I already have, all I needed to find out was if it is there and use it the right way.

It really depends on your OS.

What OS do you have?

Here is what I know about compilation:

You have the source code of some software (for example in C, or C++ programming language). From this source you need to create executable files which can be run on your underlying system (OS).
This is the compilation.
Now if this application (apache) needs to use some other application (php), which is already part of your system, you need to let know it, where it has its files: libraries, executables.
So, that when it wants to use them it can find them in those locations.
This is done before compilation when you need to run its 'configuration' scripts and give it those locations.
The configure script includes this paths into the source code.
Then compile the source code into executable with the 'make' command.
Now the apache knows where to find the needed libraries for PHP.

This is how I understand it for now. If somebody finds some mistakes in this description, please correct me.

What OS?

Most will have a binary package for PHP etc... instead of you needing to compile it

I have read lots of howtos where was instructions about recompilations to support some kind of 'libraries'.
But lot of those instructions was written just for case 'if it is not compiled with it already'.
The most of it I already have, all I needed to find out was if it is there and use it the right way.

It really depends on your OS.

What OS do you have?

Here is what I know about compilation:

You have the source code of some software (for example in C, or C++ programming language). From this source you need to create executable files which can be run on your underlying system (OS).
This is the compilation.
Now if this application (apache) needs to use some other application (php), which is already part of your system, you need to let know it, where it has its files: libraries, executables.
So, that when it wants to use them it can find them in those locations.
This is done before compilation when you need to run its 'configuration' scripts and give it those locations.
The configure script includes this paths into the source code.
Then compile the source code into executable with the 'make' command.
Now the apache knows where to find the needed libraries for PHP.

This is how I understand it for now. If somebody finds some mistakes in this description, please correct me.

thanks for replying.
My OS is : Linux - Centos 5.
the package I want to install is : Fribidi.
from here :
http://www.php.net/fribidi

Your explanation is exactly what I am used to :
I have the source package of course ( which written in c++),
then, Inside the directory that contains the source, I run these commands :

phpize // ( for PECL packages which I am asking for)
./configure --with-something
make
make install
make clean

After that I can find excutable files and libraries in /usr directory,
as usual.

And to be sure, I type in shell/ as root : fribidi --version <Enter>
then I get this in return :
Fribidi version 0.10.9 .
Copyright stuff.... etc.

Which means one thing, that this package is Installed successfully.

What happes is : that php function which I need is in that package is still missing, and my php site keep giving me "Call to undefined function" Error.

I need this function "fribidi_log2vis()" so badly, I can playaround with php codes until I create a similar function, but this can be a time wasting while we have existing one.

one of my friends gave me some commands to run, like :
yum install fribidi-devel.i368 ====>> this is run successfully too.
and
pecl fribidi =====> this returns : permission denied.

In my phpinfo(), I can't fine "--with-fribidi=/usr" in configrue command tab.

Because I couldn't compile php to support fribidi. I just installed it.

About my second question, I just figured it out how to.
I saw some insturction in cPanel website on how to add custom flags.
I did that instruction.
Now my phpinfo() shows "--with-fribidi=/usr" in configure command.
But I am still having "undefined function" Error.

now you know everything I made, so If my OS can't accecpt pecl's, that would be another thing.

thank you very much slacke.

What OS?

Most will have a binary package for PHP etc... instead of you needing to compile it

thank you for replying sir bennet.
My OS is : Linux - Centos 5.
And I am sure that I need to compile it from source.
It's not a default lib in Centos 5 , I believe.
Will Fribidi package from PECL run in my OS ?

If you use an PEC extension to PHP you need to compile your php with support of this extension.

After you installed the fribidi, at this point your system (OS) knows the fribidi libraries.
This means if your php was not copiled with this extension before, you need to recompile your php now, when your system knows the fribidi.

But I don't no so much php. Sometimes it is enough to load the libraries in the php.ini.

Try to post it in web development > php forum. There are many php gurus there.
I can check this extension a litle more later...

I tried to copy fribidi.so to my extension lib's directory, but still not working.

I think it's all about how to recompile php with fribidi support now.

I'm gonna post a link to this thread in development > php forum.

BTW: don't bother yourself with this problem. I think it's going to be a bigger than recompiling. if no one give me a solution in that forum, I'm gonna forget about it , tring to figure a new way.

I don't know how to thank you slacke.

You are welcome.
Let us know if you solved it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.