Third-party PHP extensions

Ryan Schmidt ryandesign at macports.org
Wed Sep 2 00:35:32 PDT 2009


On Sep 1, 2009, at 12:22, 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.


P.S: You shouldn't start a new thread on a mailing list by replying to  
an unrelated message. This messes up threaded mail readers and the  
mail archive. Instead, please use the New Message function in your  
email program and then address the message to the mailing list's  
address.




More information about the macports-users mailing list