Third-party PHP extensions - Solved

John Korchok jkorchok at hotmail.com
Wed Sep 2 12:59:11 PDT 2009


> > > > 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?
> 
Thank you very much for the help, libpdf_php.so comes as a binary distribution. I downloaded the the newest version from the PDFlib site and it works either with extension=libpdf_php.so in php.ini or in /opt/local/var/db/php5/libpdf_php.ini.

Could I suggest that when the php5.3 installation detects that extension_dir in php.ini is set to something else, that the user be told where to copy their extension(s) in addition to the request to disable extension_dir?

_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_facebook:082009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20090902/e92b0946/attachment.html>


More information about the macports-users mailing list