Deploying binary PHP extension
am 06.01.2008 14:26:30 von Chris
I have written a PHP extension that I want to be able to sell (as part
of a solution) and deploy in binary form. All examples and tutorials I
have found describes the process of deploying open-source extensions.
I have tried copying the library into the extensions directory defined
in php.ini and added an extension entry for it there as well. This
does however not appear to be sufficient. Is there any other step that
I have missed? Can someone help point me in the right direction?
Re: Deploying binary PHP extension
am 06.01.2008 15:11:05 von Shion
Chris wrote:
> I have written a PHP extension that I want to be able to sell (as part
> of a solution) and deploy in binary form. All examples and tutorials I
> have found describes the process of deploying open-source extensions.
>
> I have tried copying the library into the extensions directory defined
> in php.ini and added an extension entry for it there as well. This
> does however not appear to be sufficient. Is there any other step that
> I have missed? Can someone help point me in the right direction?
Check that all the recurred libraries that your extension depends on are
installed on the machines on which you are installing the extension.
Also see to that the extension has been compiled against the same minor
version of php as the one running on the new machine.
See to that you edit the right php.ini, some systems has two different
php.ini, one for the web server, another for cli.
--
//Aho
Re: Deploying binary PHP extension
am 06.01.2008 21:57:10 von Chris
On 6 Jan, 14:11, "J.O. Aho" wrote:
> Chris wrote:
> > I have written a PHP extension that I want to be able to sell (as part
> > of a solution) and deploy in binary form. All examples and tutorials I
> > have found describes the process of deploying open-source extensions.
>
> > I have tried copying the library into the extensions directory defined
> > in php.ini and added an extension entry for it there as well. This
> > does however not appear to be sufficient. Is there any other step that
> > I have missed? Can someone help point me in the right direction?
>
> Check that all the recurred libraries that your extension depends on are
> installed on the machines on which you are installing the extension.
> Also see to that the extension has been compiled against the same minor
> version of php as the one running on the new machine.
> See to that you edit the right php.ini, some systems has two different
> php.ini, one for the web server, another for cli.
>
> --
>
> //Aho
Thanks for the advice.
The current version of the extension has no dependencies on libraries,
so that should not be the problem.
The extension I was trying had been compiled against PHP 5.2.5, while
the server was running 5.2.4. I recompiled for PHP 5.2.4, but that has
not solved the problem.
I also updated ALL php.ini files I could find on the server with the
new settings, but this did not help either.
When I run php_info() I can not see the extension or the extension
parameters. Do I need to reconfigure/recompile PHP in order to start
using a new extension? (The installation of Apache/PHP on the server
is binary only. I did not build it from source there.)
//Christian
Re: Deploying binary PHP extension
am 06.01.2008 22:28:41 von Shion
Chris wrote:
> The extension I was trying had been compiled against PHP 5.2.5, while
> the server was running 5.2.4. I recompiled for PHP 5.2.4, but that has
> not solved the problem.
> I also updated ALL php.ini files I could find on the server with the
> new settings, but this did not help either.
I assume this works on your home machine.
You running the same OS on both machines?
> When I run php_info() I can not see the extension or the extension
> parameters. Do I need to reconfigure/recompile PHP in order to start
> using a new extension?
No you shouldn't have to do that. PECL is a common tool to add extra
extensions to a current installed PHP
You will need to restart Apache before the new settings will be enforced.
> (The installation of Apache/PHP on the server
> is binary only. I did not build it from source there.)
If your extension is dynamically linked, then it can be that the location of
those libraries are different on the two machines, try to compile a static
version instead.
--
//Aho