Third-party PHP extensions
Ryan Schmidt
ryandesign at macports.org
Wed Sep 2 09:56:44 PDT 2009
On Sep 2, 2009, at 11:49, John Korchok wrote:
> > > I have a third party (not installed by MacPorts) php extension
> > > module "libpdf_php.so" that I formerly called using the
> > > extension_dir and extension settings in php.ini. When I upgraded
> to
> > > php 5.3 plus php-oracle and php-mysql, the installation warned
> me to
> > > remove the extension_dir setting, or my MacPorts-installed
> > > extensions would not work. I finally figured out that the new
> > > MacPorts extensions were in opt/local/lib/php/extensions/no-debug-
> > > non-zts-20090626/, so I copied my third-party extension to that
> > > directory and also to opt/local/lib/php/extensions/, just for good
> > > measure.
> > >
> > > Unfortunately, php is not able to find the extension in the new
> > > location. I am not clear where I can install third-party
> extensions
> > > now that I cannot use the extension_dir setting.
> >
> > /opt/local/lib/php/extensions/no-debug-non-zts-20090626/ is the
> > correct place to put your extension. You then need to write a text
> > file in /opt/local/var/db/php5/ (for example libpdf_php.ini)
> > containing the following line:
> >
> > extension=libpdf_php.so
> >
> > Or, I think you can put that line in your main php.ini if you
> prefer.
>
> - I already had "extension=libpdf_php.so" in php.ini. That doesn't
> work.
> - I created libpdf_php.ini in /opt/local/var/db/php5/ and put the
> same line in there, but that doesn't work either.
> - I removed libpdf_php.ini, added the extension line back into
> php.ini and also added extension_dir = "opt/local/lib/php/extensions/
> no-debug-non-zts-20090626/" to php.ini. That doesn't work.
>
> It looks to me like the ability to add modules is broken, but I am
> open to further instructions or suggestions.
But the oracle and mysql modules you installed are working, right?
They're not doing anything special; you can read their .ini files in /
opt/local/var/db/php5/.
How was libpdf_php.so compiled? Did you compile it or is it a binary
distribution? Is it compatible with PHP 5.3? Does the error log say
anything?
More information about the macports-users
mailing list